FIx commesse RA
This commit is contained in:
Generated
+31
-1
@@ -9064,7 +9064,7 @@ namespace ETS_Data.DS_utilsProjEtsTableAdapters {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
private void InitCommandCollection() {
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7];
|
||||
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8];
|
||||
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[0].Connection = this.Connection;
|
||||
this._commandCollection[0].CommandText = "SELECT value, label, conditio FROM dbo.v_selCommesse";
|
||||
@@ -9109,6 +9109,13 @@ namespace ETS_Data.DS_utilsProjEtsTableAdapters {
|
||||
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Sett", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand();
|
||||
this._commandCollection[7].Connection = this.Connection;
|
||||
this._commandCollection[7].CommandText = "dbo.stp_VSCom_getShortByIrWeek";
|
||||
this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Sett", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -9260,6 +9267,29 @@ namespace ETS_Data.DS_utilsProjEtsTableAdapters {
|
||||
this.Adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public virtual DS_utilsProjEts.v_selCommesseDataTable getShortByWeekIR(global::System.Nullable<int> Anno, global::System.Nullable<int> Sett) {
|
||||
this.Adapter.SelectCommand = this.CommandCollection[7];
|
||||
if ((Anno.HasValue == true)) {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Anno.Value));
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((Sett.HasValue == true)) {
|
||||
this.Adapter.SelectCommand.Parameters[2].Value = ((int)(Sett.Value));
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
DS_utilsProjEts.v_selCommesseDataTable dataTable = new DS_utilsProjEts.v_selCommesseDataTable();
|
||||
this.Adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -188,6 +188,18 @@
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="ETS_PROJConnectionString (Settings)" DbObjectName="ETS_PROJ.dbo.stp_VSCom_getShortByIrWeek" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getShortByWeekIR" GetMethodModifier="Public" GetMethodName="getShortByWeekIR" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getShortByWeekIR" UserSourceName="getShortByWeekIR">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_VSCom_getShortByIrWeek</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Anno" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Sett" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</Sources>
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="v_selCCTableAdapter" GeneratorDataComponentClassName="v_selCCTableAdapter" Name="v_selCC" UserDataComponentName="v_selCCTableAdapter">
|
||||
|
||||
@@ -445,4 +445,37 @@ SELECT vsc.*
|
||||
FROM v_selCommesseShort vsc
|
||||
INNER JOIN cteFasi cte ON vsc.value = cte.idxFase
|
||||
|
||||
GO
|
||||
|
||||
|
||||
/*************************************
|
||||
* STORED PROCEDURE stp_VSCom_getShortByIrWeek
|
||||
*
|
||||
* elenco commesse con IMPIEGO RISORSE nel periodo
|
||||
*
|
||||
* mod : 2021.10.19
|
||||
* aut : S.E. Locatelli
|
||||
**************************************/
|
||||
CREATE PROCEDURE [dbo].[stp_VSCom_getShortByIrWeek]
|
||||
(
|
||||
@Anno INT = 0,
|
||||
@Sett INT = 0
|
||||
)
|
||||
AS
|
||||
|
||||
SET NOCOUNT ON;
|
||||
|
||||
;WITH cteFasi AS
|
||||
(
|
||||
SELECT DISTINCT idxFase
|
||||
FROM ImpiegoRisorse
|
||||
WHERE Anno = @Anno
|
||||
AND Sett = @Sett
|
||||
)
|
||||
|
||||
SELECT vsc.*
|
||||
FROM v_selCommesseShort vsc
|
||||
INNER JOIN cteFasi cte ON vsc.value = cte.idxFase
|
||||
|
||||
|
||||
GO
|
||||
@@ -200,6 +200,31 @@ namespace PROJ_ETS.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
protected List<int> ListIdxLocked
|
||||
{
|
||||
get
|
||||
{
|
||||
List<int> answ = new List<int>();
|
||||
//cero in redis
|
||||
var rawData = utils.obj.getRSV(userLockTable);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<List<int>>(rawData);
|
||||
}
|
||||
else
|
||||
{
|
||||
var tabDati = DataProxy_ProjEts.DP.taTLB.GetData();
|
||||
answ = tabDati
|
||||
.Select(x => x.idxDipendente)
|
||||
.ToList();
|
||||
rawData = JsonConvert.SerializeObject(answ);
|
||||
utils.obj.setRSV(userLockTable, rawData, 10);
|
||||
}
|
||||
//restituisco...
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// settimana selezionato (wrapper)
|
||||
/// </summary>
|
||||
@@ -985,6 +1010,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
protected bool userIsLocked(int IdxDipendente)
|
||||
{
|
||||
bool answ = false;
|
||||
#if false
|
||||
Ds_ProjEts.TLockBazRADataTable tabDati = null;
|
||||
// cerco in cache
|
||||
var rawData = utils.obj.getRSV(userLockTable);
|
||||
@@ -1006,6 +1032,11 @@ namespace PROJ_ETS.WebUserControls
|
||||
.Where(x => x.idxDipendente == IdxDipendente)
|
||||
.Count() > 0;
|
||||
}
|
||||
#endif
|
||||
if (ListIdxLocked.Count > 0)
|
||||
{
|
||||
answ = (ListIdxLocked.Contains(IdxDipendente));
|
||||
}
|
||||
return answ;
|
||||
//cerco il lock nella tab...
|
||||
//return DataProxy_ProjEts.DP.taTLB.getByDip(IdxDipendente).Rows.Count > 0;
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace PROJ_ETS.WebUserControls
|
||||
// carico TUTTE le celle del Impiego...
|
||||
tabIR = DataProxy_ProjEts.DP.taIR.getFullWeek(anno, settimana);
|
||||
tabComm = DataProxy_ProjEts.DP.taSelCom.GetData(); // leggo tutte commesse...
|
||||
tabCommShort = DataProxy_ProjEts.DP.taSelCom.getCommShort(anno, settimana); // leggo tutte commesse formato short (nickname...)
|
||||
tabCommShort = DataProxy_ProjEts.DP.taSelCom.getShortByWeekIR(anno, settimana); // leggo tutte commesse formato short (nickname...)
|
||||
// calcolo il primo dip
|
||||
idxDip = tabIR[0].idxDipendente;
|
||||
// calcolo num celle totali
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user