COmpletato editing di base x scheda tecnica
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:GridView runat="server" ID="grView" DataSourceID="ods" CssClass="table table-sm table-striped" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxST,Label,Oggetto">
|
||||
<asp:GridView runat="server" ID="grView" DataSourceID="ods" CssClass="table table-sm table-striped" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxST,Label,Oggetto" OnRowUpdated="grView_RowUpdated">
|
||||
<EditRowStyle CssClass="table-info" />
|
||||
<SelectedRowStyle CssClass="table-info" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
@@ -29,36 +29,36 @@
|
||||
<%--<asp:BoundField DataField="CodGruppo" HeaderText="CodGruppo" SortExpression="CodGruppo" />--%>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<HeaderTemplate>
|
||||
<%--<asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-sm btn-primary" Visible="true" ToolTip="Reset"><i class="fas fa-sync"></i></asp:LinkButton>--%>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<asp:LinkButton ID="lbtSel" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-sm btn-info"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>--%>
|
||||
<asp:LinkButton ID="lbtEdit" runat="server" CausesValidation="False" CommandName="Edit" CssClass="btn btn-sm btn-primary"><i class="fa fa-edit" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="lbtUpdate" runat="server" CausesValidation="True" CommandName="Update" CssClass="btn btn-sm btn-success"><i class="fa fa-check" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton ID="lbtCancel" runat="server" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-sm btn-warning"><i class="fa fa-ban" aria-hidden="true"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="DescGruppo" HeaderText="Gruppo" SortExpression="DescGruppo" />
|
||||
<asp:BoundField DataField="DescGruppo" HeaderText="Gruppo" SortExpression="DescGruppo" ReadOnly="True" />
|
||||
<%--<asp:BoundField DataField="Label" HeaderText="Label" ReadOnly="True" SortExpression="Label" />--%>
|
||||
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
|
||||
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" ReadOnly="True" />
|
||||
<%--<asp:BoundField DataField="CodTipo" HeaderText="CodTipo" SortExpression="CodTipo" />--%>
|
||||
<asp:BoundField DataField="DescTipo" HeaderText="Tipo" SortExpression="DescTipo" />
|
||||
<asp:BoundField DataField="Num" HeaderText="Num" SortExpression="Num" />
|
||||
<asp:BoundField DataField="DescTipo" HeaderText="Tipo" SortExpression="DescTipo" ReadOnly="True" />
|
||||
<asp:BoundField DataField="Num" HeaderText="Num" SortExpression="Num" ReadOnly="True" />
|
||||
<asp:BoundField DataField="Oggetto" HeaderText="Oggetto" ReadOnly="True" SortExpression="Oggetto" />
|
||||
<asp:BoundField DataField="Value" HeaderText="Valore" SortExpression="Value" />
|
||||
<asp:BoundField DataField="CheckType" HeaderText="Check" SortExpression="CheckType" />
|
||||
<asp:CheckBoxField DataField="Required" HeaderText="Req" SortExpression="Required" />
|
||||
<asp:BoundField DataField="Value" HeaderText="Valore" SortExpression="Value" ControlStyle-CssClass="form-control" />
|
||||
<asp:BoundField DataField="CheckType" HeaderText="Check" SortExpression="CheckType" ReadOnly="True" />
|
||||
<asp:CheckBoxField DataField="Required" HeaderText="Req" SortExpression="Required" ReadOnly="True" />
|
||||
<%--<asp:BoundField DataField="ExtCode" HeaderText="ExtCode" SortExpression="ExtCode" />--%>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-sm btn-danger" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmDelete") %>'><i class="fa fa-trash" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="lbtCancel" runat="server" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-sm btn-warning"><i class="fa fa-ban" aria-hidden="true"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByST" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualRowTableAdapter" DeleteMethod="DeleteQuery">
|
||||
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getByST" TypeName="MapoDb.DS_SheetTechTableAdapters.ST_ActualRowTableAdapter" DeleteMethod="DeleteQuery" UpdateMethod="UpdateVal">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxST" Name="IdxST" PropertyName="Value" Type="Int32" />
|
||||
</SelectParameters>
|
||||
@@ -67,6 +67,12 @@
|
||||
<asp:Parameter Name="Original_Label" Type="String" />
|
||||
<asp:Parameter Name="Original_Oggetto" Type="Int32" />
|
||||
</DeleteParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="Original_IdxST" Type="Int32" />
|
||||
<asp:Parameter Name="Original_Label" Type="String" />
|
||||
<asp:Parameter Name="Original_Oggetto" Type="Int32" />
|
||||
<asp:Parameter Name="Value" Type="String" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfIdxST" />
|
||||
</div>
|
||||
|
||||
@@ -40,6 +40,11 @@ namespace MP_ADM.WebUserControls
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
|
||||
{
|
||||
raiseNewVal();
|
||||
}
|
||||
|
||||
protected void lbtAddTemplate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// recupero argomento...
|
||||
|
||||
Generated
+56
-1
@@ -4536,7 +4536,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[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 DescGruppo, DescTipo, IdxST, Label, Oggetto, Num, CodGruppo, CodTip" +
|
||||
@@ -4584,6 +4584,15 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
|
||||
this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure;
|
||||
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("@IdxODL", 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_ST_AR_UpdateVal";
|
||||
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("@Original_IdxST", 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("@Original_Label", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Oggetto", 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("@Value", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
@@ -5111,6 +5120,52 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
[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 UpdateVal(global::System.Nullable<int> Original_IdxST, string Original_Label, global::System.Nullable<int> Original_Oggetto, string Value) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
|
||||
if ((Original_IdxST.HasValue == true)) {
|
||||
command.Parameters[1].Value = ((int)(Original_IdxST.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((Original_Label == null)) {
|
||||
command.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[2].Value = ((string)(Original_Label));
|
||||
}
|
||||
if ((Original_Oggetto.HasValue == true)) {
|
||||
command.Parameters[3].Value = ((int)(Original_Oggetto.Value));
|
||||
}
|
||||
else {
|
||||
command.Parameters[3].Value = global::System.DBNull.Value;
|
||||
}
|
||||
if ((Value == null)) {
|
||||
command.Parameters[4].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[4].Value = ((string)(Value));
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -234,6 +234,20 @@ SELECT IdxST, Label, Oggetto, Num, CodGruppo, CodTipo, Value, CheckType, Require
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_ST_AR_UpdateVal" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="UpdateVal" Modifier="Public" Name="UpdateVal" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="UpdateVal">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_ST_AR_UpdateVal</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="@Original_IdxST" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Original_Label" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_Oggetto" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Value" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</Sources>
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ST_CheckTableAdapter" GeneratorDataComponentClassName="ST_CheckTableAdapter" Name="ST_Check" UserDataComponentName="ST_CheckTableAdapter">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="150" 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="1" X="351" Y="438" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:ST_ActualRow" ZOrder="2" X="368" Y="805" Height="381" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:ST_ActualRow" ZOrder="2" X="368" Y="805" Height="440" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="275" />
|
||||
<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="1137" Y="199" Height="153" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<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" />
|
||||
|
||||
Reference in New Issue
Block a user