Completata approvazione ordini

This commit is contained in:
Samuele E. Locatelli
2019-05-20 15:42:30 +02:00
parent e90ee35be0
commit 9eec20c936
11 changed files with 185 additions and 20 deletions
Vendored
+1 -1
View File
@@ -18,7 +18,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=1195']) {
withEnv(['NEXT_BUILD_NUMBER=1199']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO'
+35
View File
@@ -20,6 +20,41 @@ namespace MP_ADM
#endif
mod_planStats.eh_reset += Mod_planStats_eh_reset;
mod_planStats.eh_selVal += Mod_planStats_eh_selVal;
mod_planCreate.eh_ucev += Mod_planCreate_eh_ucev;
}
private void Mod_planCreate_eh_ucev(object sender, EventArgs e)
{
// se trovo evento select/reset mostro/nascondo dettagli...
ucEvent evento = (ucEvent)e;
switch (evento.tipoEvento)
{
case ucEvType.ReqUpdateParent:
mod_planStats.doReset();
break;
default:
break;
}
#if false
switch (evento.tipoEvento)
{
case ucEvType.Delete:
break;
case ucEvType.Edit:
break;
case ucEvType.New:
break;
case ucEvType.Reset:
break;
case ucEvType.ReqUpdateParent:
break;
case ucEvType.Selected:
break;
default:
break;
}
#endif
}
private void Mod_planStats_eh_selVal(object sender, EventArgs e)
+1
View File
@@ -28,6 +28,7 @@
<add key="DbConfConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
<add key="MoonProConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
<add key="MoonProConnectionStringIS" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro_IS_ColCom;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
<add key="MoonProConnectionStringES3" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro_ES3;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
<add key="PermessiConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
<add key="UtenteCdcConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
<add key="VocabolarioConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
+14 -6
View File
@@ -44,7 +44,7 @@
<asp:Label ID="lblKeyRichiesta" runat="server" Text='<%# Eval("KeyRichiesta") %>'></asp:Label>
</div>
<div class="col-12 small">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("idxPromessa") %>'></asp:Label>
<asp:Label ID="lblIdxPromessa" runat="server" Text='<%# Eval("idxPromessa") %>'></asp:Label>
</div>
</div>
</ItemTemplate>
@@ -114,13 +114,21 @@
</div>
</div>
</div>
<div runat="server" id="divCreaGrp" visible="false">
<asp:LinkButton runat="server" ID="lbtCreaGrp" CssClass="btn btn-success btn-block">CREA PODL Gruppo <i class="fa fa-object-group" aria-hidden="true"></i></asp:LinkButton>
<div runat="server" id="divConfirm" class="my-1">
<asp:LinkButton runat="server" ID="lbtDoPlan" CssClass="btn btn-success btn-block" OnClick="lbtDoPlan_Click" OnClientClick="return confirm('Sei sciuro di voler confermare senza modifica le richieste selezionate?');">
APPROVA e PIANIFICA <i class="fa fa-thumbs-up" aria-hidden="true"></i>
<div class="small">
Approvazione e pianificazione senza modifica delle richieste selezionate
</div>
</asp:LinkButton>
</div>
<div runat="server" id="divCreaGrp" class="my-1">
<asp:LinkButton runat="server" ID="lbtCreaGrp" CssClass="btn btn-info btn-block">RAGGRUPPA RICHIESTE <i class="fa fa-object-group" aria-hidden="true"></i></asp:LinkButton>
Selezionare LA MACCHINA ESATTA su cui creare...
</div>
<div runat="server" id="divSplitOdl" visible="false">
<asp:LinkButton runat="server" ID="lbtSplit" CssClass="btn btn-warning btn-block">SPLIT PODL <i class="fa fa-object-group" aria-hidden="true"></i></asp:LinkButton>
...con split deve chiedere NUM PEZZI...
<div runat="server" id="divSplitOdl" class="my-1">
<asp:LinkButton runat="server" ID="lbtSplit" CssClass="btn btn-warning btn-block">SPLIT RICHIESTA <i class="fa fa-cut" aria-hidden="true"></i></asp:LinkButton>
...con split deve chiedere NUM PEZZI e va a creare promessa splittata approvata (lasciando il rimanente "a monte" da approvare e/o splittare...
</div>
<br />
ricordarsi che deve salvare dati come data/ora creazione + utente creazione
+37 -3
View File
@@ -1,4 +1,5 @@
using System;
using MapoDb;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@@ -12,7 +13,10 @@ namespace MP_ADM.WebUserControls
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
calcTotali();
}
}
public string CodGruppo
{
@@ -137,7 +141,37 @@ namespace MP_ADM.WebUserControls
lblOreTot.Text = $"{tempoMinTot / 60:N2}";
// controllo SE abilitare il crea gruppo o split...
divSplitOdl.Visible = numOrd == 1;
divCreaGrp.Visible = numOrd > 0;
divConfirm.Visible = numOrd > 0;
divCreaGrp.Visible = numOrd > 1;
}
/// <summary>
/// Approva e pianifica richeiste...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtDoPlan_Click(object sender, EventArgs e)
{
int IdxPromessa = 0;
foreach (GridViewRow riga in grView.Rows)
{
DateTime DataRif = DateTime.Now.Date;
if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible)
{
try
{
int.TryParse(((Label)riga.FindControl("lblIdxPromessa")).Text, out IdxPromessa);
// approvo la promessa COPIANDOLA
DataLayer.obj.taPlanRichieste.approvaRich(IdxPromessa, SteamWare.user_std.UtSn.utente);
}
catch
{ }
}
}
// aggiorno grView...
grView.SelectedIndex = -1;
grView.DataBind();
// segnalo update
raiseEvent(SteamWare.ucEvType.ReqUpdateParent);
}
}
}
+18
View File
@@ -111,6 +111,24 @@ namespace MP_ADM.WebUserControls {
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblOreTot;
/// <summary>
/// Controllo divConfirm.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divConfirm;
/// <summary>
/// Controllo lbtDoPlan.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtDoPlan;
/// <summary>
/// Controllo divCreaGrp.
/// </summary>
@@ -42,6 +42,15 @@ namespace MP_ADM.WebUserControls
// salvo in sessione selezione...
memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue);
#endif
}
/// <summary>
/// Reset controllo
/// </summary>
public void doReset()
{
doResetGrp();
doResetMac();
doResetArt();
}
/// <summary>
/// comando reset
+47 -6
View File
@@ -4335,19 +4335,26 @@ namespace MapoDb.DS_PlanTableAdapters {
[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[2];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM dbo.v_Richieste";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
this._commandCollection[1].CommandText = "dbo.stp_Richieste_filt";
this._commandCollection[1].CommandText = "dbo.stp_RICH_approva";
this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserMod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "dbo.stp_Richieste_filt";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -4379,7 +4386,7 @@ namespace MapoDb.DS_PlanTableAdapters {
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
public virtual DS_Plan.RichiesteDataTable getFilt(string CodGruppo, string CodArticolo, string IdxMacchina) {
this.Adapter.SelectCommand = this.CommandCollection[1];
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((CodGruppo == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -4402,6 +4409,40 @@ namespace MapoDb.DS_PlanTableAdapters {
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")]
public virtual int approvaRich(global::System.Nullable<int> idxPromessa, string UserMod) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
if ((idxPromessa.HasValue == true)) {
command.Parameters[1].Value = ((int)(idxPromessa.Value));
}
else {
command.Parameters[1].Value = global::System.DBNull.Value;
}
if ((UserMod == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
else {
command.Parameters[2].Value = ((string)(UserMod));
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
}
/// <summary>
+12
View File
@@ -170,6 +170,18 @@ ORDER BY TotOreRich DESC</CommandText>
<Mapping SourceColumn="TC_type" DataSetColumn="TC_type" />
</Mappings>
<Sources>
<DbSource ConnectionRef="MoonPro_ES3ConnectionString (Settings)" DbObjectName="MoonPro_ES3.dbo.stp_RICH_approva" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="approvaRich" Modifier="Public" Name="approvaRich" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="approvaRich">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_RICH_approva</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="@idxPromessa" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@UserMod" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonPro_ES3ConnectionString (Settings)" DbObjectName="MoonPro_ES3.dbo.stp_Richieste_filt" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getFilt" GetMethodModifier="Public" GetMethodName="getFilt" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getFilt" UserSourceName="getFilt">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
+4 -4
View File
@@ -6,11 +6,11 @@
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:planStatsGlobal" ZOrder="4" X="108" Y="55" Height="227" Width="280" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:planStatsArt" ZOrder="3" X="448" Y="61" Height="250" Width="255" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:planStatsGlobal" ZOrder="1" X="108" Y="55" Height="227" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:planStatsArt" ZOrder="4" X="448" Y="61" Height="250" Width="255" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="168" />
<Shape ID="DesignTable:planStatsGroup" ZOrder="5" X="113" Y="292" Height="204" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:planStatsMacc" ZOrder="2" X="437" Y="357" Height="227" Width="270" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:Richieste" ZOrder="1" X="91" Y="651" Height="388" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
<Shape ID="DesignTable:planStatsMacc" ZOrder="3" X="437" Y="357" Height="227" Width="270" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="145" />
<Shape ID="DesignTable:Richieste" ZOrder="2" X="91" Y="651" Height="411" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="306" />
</Shapes>
<Connectors />
</DiagramLayout>
+7
View File
@@ -57,6 +57,9 @@ namespace MapoDb
public DS_UtilityTableAdapters.v_selODLTableAdapter taSelOdlFree;
public DS_UtilityTableAdapters.CommentiTableAdapter taComm;
// table adapter x planner
public DS_PlanTableAdapters.RichiesteTableAdapter taPlanRichieste;
// tablet adapter x IS
public DS_IntServTableAdapters.IstanzeKITTableAdapter taIstK;
public DS_IntServTableAdapters.ProduzioneAs400TableAdapter taAs400;
@@ -110,6 +113,7 @@ namespace MapoDb
taSelMacc = new DS_UtilityTableAdapters.v_selMacchineTableAdapter();
taSelOdlFree = new DS_UtilityTableAdapters.v_selODLTableAdapter();
taComm = new DS_UtilityTableAdapters.CommentiTableAdapter();
taPlanRichieste = new DS_PlanTableAdapters.RichiesteTableAdapter();
taIstK = new DS_IntServTableAdapters.IstanzeKITTableAdapter();
taAs400 = new DS_IntServTableAdapters.ProduzioneAs400TableAdapter();
taTKS = new DS_IntServTableAdapters.TKS_SearchTableAdapter();
@@ -123,6 +127,7 @@ namespace MapoDb
{
string connectionString = memLayer.ML.confReadString("MoonProConnectionString");
string connectionStringIS = memLayer.ML.confReadString("MoonProConnectionStringIS");
string connectionStringES3 = memLayer.ML.confReadString("MoonProConnectionStringES3");
// connections del db
taAG.Connection.ConnectionString = connectionString;
taMacchine.Connection.ConnectionString = connectionString;
@@ -163,6 +168,8 @@ namespace MapoDb
taSelMacc.Connection.ConnectionString = connectionString;
taSelOdlFree.Connection.ConnectionString = connectionString;
taComm.Connection.ConnectionString = connectionString;
// area planner
taPlanRichieste.Connection.ConnectionString = connectionStringES3;
// area IS
taIS_TrDati.Connection.ConnectionString = connectionStringIS;
taIstK.Connection.ConnectionString = connectionStringIS;