Bopzza dettaglio dati scheda tecnica

This commit is contained in:
Samuele E. Locatelli
2021-01-02 13:03:22 +01:00
parent bc7d862e00
commit be909d0e74
10 changed files with 174 additions and 19 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
</div>
</div>
<div>
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="IdxST" DataSourceID="ods" CssClass="table table-sm table-striped" AllowPaging="True" AllowSorting="True">
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="IdxST" DataSourceID="ods" CssClass="table table-sm table-striped" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<EditRowStyle CssClass="table-info" />
<SelectedRowStyle CssClass="table-info" />
<PagerStyle CssClass="active GridPager" />
@@ -9,8 +9,30 @@ namespace MP_ADM.WebUserControls
{
public partial class cmp_TechSheetArt : BaseUserControl
{
#region Public Properties
public int IdxStSel
{
get
{
int answ = 0;
if (grView.SelectedIndex >= 0)
{
int.TryParse($"{grView.SelectedValue}", out answ);
}
return answ;
}
}
#endregion Public Properties
#region Protected Methods
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
raiseSelNew();
}
/// <summary>
/// comando reset
/// </summary>
@@ -1,3 +1,33 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_TechSheetDetail.ascx.cs" Inherits="MP_ADM.WebUserControls.cmp_TechSheetDetail" %>
Dettaglio singolo articolo
<asp:GridView runat="server" ID="grView" DataSourceID="ods" CssClass="table table-sm table-striped" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxST,Label,Oggetto">
<EditRowStyle CssClass="table-info" />
<SelectedRowStyle CssClass="table-info" />
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<EmptyDataTemplate>
Nessun record trovato
</EmptyDataTemplate>
<Columns>
<%--<asp:BoundField DataField="IdxST" HeaderText="IdxST" ReadOnly="True" SortExpression="IdxST" />--%>
<%--<asp:BoundField DataField="CodGruppo" HeaderText="CodGruppo" SortExpression="CodGruppo" />--%>
<asp:BoundField DataField="DescGruppo" HeaderText="DescGruppo" SortExpression="DescGruppo" />
<%--<asp:BoundField DataField="Label" HeaderText="Label" ReadOnly="True" SortExpression="Label" />--%>
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
<%--<asp:BoundField DataField="CodTipo" HeaderText="CodTipo" SortExpression="CodTipo" />--%>
<asp:BoundField DataField="DescTipo" HeaderText="DescTipo" SortExpression="DescTipo" />
<asp:BoundField DataField="Num" HeaderText="Num" SortExpression="Num" />
<asp:BoundField DataField="Oggetto" HeaderText="Oggetto" ReadOnly="True" SortExpression="Oggetto" />
<asp:BoundField DataField="Value" HeaderText="Value" SortExpression="Value" />
<asp:BoundField DataField="CheckType" HeaderText="CheckType" SortExpression="CheckType" />
<asp:CheckBoxField DataField="Required" HeaderText="Required" SortExpression="Required" />
<%--<asp:BoundField DataField="ExtCode" HeaderText="ExtCode" SortExpression="ExtCode" />--%>
</Columns>
</asp:GridView>
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getByST" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualRowTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="hfIdxST" Name="IdxST" PropertyName="Value" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfIdxST" />
@@ -7,11 +7,43 @@ using System.Web.UI.WebControls;
namespace MP_ADM.WebUserControls
{
public partial class cmp_TechSheetDetail : System.Web.UI.UserControl
public partial class cmp_TechSheetDetail : BaseUserControl
{
#region Public Properties
public int IdxST
{
get
{
int answ = 0;
int.TryParse(hfIdxST.Value, out answ);
return answ;
}
set
{
hfIdxST.Value = $"{value}";
doUpdate();
}
}
#endregion Public Properties
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
}
#endregion Protected Methods
#region Public Methods
public void doUpdate()
{
grView.SelectedIndex = -1;
grView.DataBind();
}
#endregion Public Methods
}
}
@@ -13,5 +13,32 @@ namespace MP_ADM.WebUserControls
public partial class cmp_TechSheetDetail
{
/// <summary>
/// Controllo grView.
/// </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.GridView grView;
/// <summary>
/// Controllo ods.
/// </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.ObjectDataSource ods;
/// <summary>
/// Controllo hfIdxST.
/// </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.HiddenField hfIdxST;
}
}
@@ -9,21 +9,30 @@ namespace MP_ADM.WebUserControls
{
public partial class cmp_TechSheetMan : System.Web.UI.UserControl
{
#region Protected Fields
protected int dummyArt = 0;
#endregion Protected Fields
#region Private Methods
private void Cmp_TechSheetArt_eh_nuovoValore(object sender, EventArgs e)
{
cmp_TechSheetDetail.Visible = true;
cmp_TechSheetDetail.IdxST = dummyArt;
//cmp_TechSheetDetail.Visible = false;
}
private void Cmp_TechSheetArt_eh_resetSelezione(object sender, EventArgs e)
{
cmp_TechSheetDetail.Visible = false;
cmp_TechSheetDetail.IdxST = dummyArt;
//cmp_TechSheetDetail.Visible = false;
}
private void Cmp_TechSheetArt_eh_selValore(object sender, EventArgs e)
{
cmp_TechSheetDetail.Visible = true;
//cmp_TechSheetDetail.Visible = true;
cmp_TechSheetDetail.IdxST = cmp_TechSheetArt.IdxStSel;
}
#endregion Private Methods
@@ -35,7 +44,8 @@ namespace MP_ADM.WebUserControls
if (!Page.IsPostBack)
{
cmp_TechSheetArt.resetSelezione();
cmp_TechSheetDetail.Visible = false;
cmp_TechSheetDetail.IdxST = dummyArt;
//cmp_TechSheetDetail.Visible = false;
}
cmp_TechSheetArt.eh_nuovoValore += Cmp_TechSheetArt_eh_nuovoValore;
cmp_TechSheetArt.eh_selValore += Cmp_TechSheetArt_eh_selValore;
+1 -1
View File
@@ -16,7 +16,7 @@
</AlternatingItemTemplate>
</asp:Repeater>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByCodArt" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualRowTableAdapter">
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByGrpOdl" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualRowTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="hfCodGruppo" DefaultValue="ART" Name="CodGruppo" PropertyName="Value" Type="String" />
<asp:SessionParameter DefaultValue="0" Name="IdxODL" SessionField="idxODL" Type="Int32" />
+28 -5
View File
@@ -4376,7 +4376,7 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
[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[4];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT DescGruppo, DescTipo, IdxST, Label, Oggetto, Num, CodGruppo, CodTip" +
@@ -4399,10 +4399,16 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[3].Connection = this.Connection;
this._commandCollection[3].CommandText = "dbo.stp_ST_AR_getPendingOdl";
this._commandCollection[3].CommandText = "dbo.stp_ST_AR_getByIdxST";
this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxST", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[4].Connection = this.Connection;
this._commandCollection[4].CommandText = "dbo.stp_ST_AR_getPendingOdl";
this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", 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()]
@@ -4493,7 +4499,7 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
[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_SheetTech.ST_ActualRowDataTable getByCodArt(string CodGruppo, global::System.Nullable<int> IdxODL) {
public virtual DS_SheetTech.ST_ActualRowDataTable getByGrpOdl(string CodGruppo, global::System.Nullable<int> IdxODL) {
this.Adapter.SelectCommand = this.CommandCollection[2];
if ((CodGruppo == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
@@ -4516,8 +4522,25 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
[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_SheetTech.ST_ActualRowDataTable getPendingByOdl(global::System.Nullable<int> IdxODL) {
public virtual DS_SheetTech.ST_ActualRowDataTable getByST(global::System.Nullable<int> IdxST) {
this.Adapter.SelectCommand = this.CommandCollection[3];
if ((IdxST.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxST.Value));
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
DS_SheetTech.ST_ActualRowDataTable dataTable = new DS_SheetTech.ST_ActualRowDataTable();
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_SheetTech.ST_ActualRowDataTable getPendingByOdl(global::System.Nullable<int> IdxODL) {
this.Adapter.SelectCommand = this.CommandCollection[4];
if ((IdxODL.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxODL.Value));
}
+12 -1
View File
@@ -148,7 +148,7 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ST_AR_getByGrpArtOdl" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByCodArt" GetMethodModifier="Public" GetMethodName="getByCodArt" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByCodArt" UserSourceName="getByCodArt">
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ST_AR_getByGrpArtOdl" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByGrpOdl" GetMethodModifier="Public" GetMethodName="getByGrpOdl" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByGrpOdl" UserSourceName="getByGrpOdl">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ST_AR_getByGrpArtOdl</CommandText>
@@ -160,6 +160,17 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ST_AR_getByIdxST" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getByST" GetMethodModifier="Public" GetMethodName="getByST" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getByST" UserSourceName="getByST">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ST_AR_getByIdxST</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="@IdxST" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ST_AR_getPendingOdl" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getPendingByOdl" GetMethodModifier="Public" GetMethodName="getPendingByOdl" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getPendingByOdl" UserSourceName="getPendingByOdl">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
+4 -4
View File
@@ -4,10 +4,10 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="164" ViewPortY="58" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="164" ViewPortY="171" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:ST_Actual" ZOrder="2" X="411" Y="505" Height="229" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:ST_ActualRow" ZOrder="3" X="378" Y="789" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ST_Actual" ZOrder="3" X="411" Y="505" Height="229" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:ST_ActualRow" ZOrder="1" X="378" Y="789" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ST_Check" ZOrder="4" X="776" Y="782" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:ST_AnagGruppi" ZOrder="11" X="1140" Y="195" Height="134" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:ST_AnagTipi" ZOrder="10" X="834" Y="220" Height="115" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
@@ -67,7 +67,7 @@
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:ST_Template_ST_Actual" ZOrder="1" LineWidth="11">
<Connector ID="DesignRelation:ST_Template_ST_Actual" ZOrder="2" LineWidth="11">
<RoutePoints>
<Point>
<X>727</X>