Completato editing delete/add tag da magazzino ricambi
This commit is contained in:
+49
-19
@@ -7448,33 +7448,40 @@ namespace GIM_data.DS_MagTableAdapters {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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 TagCode, Class, TagDescr\r\nFROM AnagTags";
|
||||
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_AnTag_deleteQuery";
|
||||
this._commandCollection[1].CommandText = "dbo.stp_AnTag_avail4Item";
|
||||
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("@Original_TagCode", 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("@idxItem", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_AnTag_insertQuery";
|
||||
this._commandCollection[2].CommandText = "dbo.stp_AnTag_deleteQuery";
|
||||
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("@TagCode", 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("@Class", 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("@TagDescr", 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("@Original_TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_AnTag_updateQuery";
|
||||
this._commandCollection[3].CommandText = "dbo.stp_AnTag_insertQuery";
|
||||
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("@TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Class", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_AnTag_updateQuery";
|
||||
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("@TagCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Class", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TagDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
||||
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TagCode", 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()]
|
||||
@@ -7501,6 +7508,23 @@ namespace GIM_data.DS_MagTableAdapters {
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
|
||||
public virtual DS_Mag.AnagTagsDataTable avail4item(global::System.Nullable<int> idxItem) {
|
||||
this.Adapter.SelectCommand = this.CommandCollection[1];
|
||||
if ((idxItem.HasValue == true)) {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxItem.Value));
|
||||
}
|
||||
else {
|
||||
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
DS_Mag.AnagTagsDataTable dataTable = new DS_Mag.AnagTagsDataTable();
|
||||
this.Adapter.Fill(dataTable);
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
@@ -7653,7 +7677,7 @@ namespace GIM_data.DS_MagTableAdapters {
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int deleteQuery(string Original_TagCode) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
|
||||
if ((Original_TagCode == null)) {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
@@ -7681,7 +7705,7 @@ namespace GIM_data.DS_MagTableAdapters {
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int insertQuery(string TagCode, string Class, string TagDescr) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
|
||||
if ((TagCode == null)) {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
@@ -7720,25 +7744,31 @@ namespace GIM_data.DS_MagTableAdapters {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
||||
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
||||
public virtual int updateQuery(string Class, string TagDescr, string Original_TagCode) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
|
||||
if ((Class == null)) {
|
||||
public virtual int updateQuery(string TagCode, string Class, string TagDescr, string Original_TagCode) {
|
||||
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
|
||||
if ((TagCode == null)) {
|
||||
command.Parameters[1].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[1].Value = ((string)(Class));
|
||||
command.Parameters[1].Value = ((string)(TagCode));
|
||||
}
|
||||
if ((TagDescr == null)) {
|
||||
if ((Class == null)) {
|
||||
command.Parameters[2].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[2].Value = ((string)(TagDescr));
|
||||
command.Parameters[2].Value = ((string)(Class));
|
||||
}
|
||||
if ((Original_TagCode == null)) {
|
||||
if ((TagDescr == null)) {
|
||||
command.Parameters[3].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[3].Value = ((string)(Original_TagCode));
|
||||
command.Parameters[3].Value = ((string)(TagDescr));
|
||||
}
|
||||
if ((Original_TagCode == null)) {
|
||||
command.Parameters[4].Value = global::System.DBNull.Value;
|
||||
}
|
||||
else {
|
||||
command.Parameters[4].Value = ((string)(Original_TagCode));
|
||||
}
|
||||
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
|
||||
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
|
||||
|
||||
@@ -386,6 +386,17 @@ FROM AnagTags</CommandText>
|
||||
<Mapping SourceColumn="TagDescr" DataSetColumn="TagDescr" />
|
||||
</Mappings>
|
||||
<Sources>
|
||||
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_AnTag_avail4Item" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="avail4item" GetMethodModifier="Public" GetMethodName="avail4item" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="avail4item" UserSourceName="avail4item">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.stp_AnTag_avail4Item</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="@idxItem" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_AnTag_deleteQuery" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="deleteQuery" Modifier="Public" Name="deleteQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="deleteQuery">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
@@ -416,6 +427,7 @@ FROM AnagTags</CommandText>
|
||||
<CommandText>dbo.stp_AnTag_updateQuery</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="nvarchar" DbType="String" Direction="Input" ParameterName="@TagCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Class" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@TagDescr" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Original_TagCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -41,7 +41,7 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TagCode" HeaderText="TagCode" ReadOnly="True" SortExpression="TagCode" />
|
||||
<asp:BoundField DataField="TagCode" HeaderText="TagCode" ReadOnly="False" SortExpression="TagCode" />
|
||||
<asp:BoundField DataField="Class" HeaderText="Class" SortExpression="Class" />
|
||||
<asp:BoundField DataField="TagDescr" HeaderText="TagDescr" SortExpression="TagDescr" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
@@ -68,6 +68,7 @@
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter" UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}" FilterExpression="TagCode LIKE '%{0}%' OR Class LIKE '%{0}%' OR TagDescr LIKE '%{0}%' " InsertMethod="Insert">
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="TagCode" Type="String" />
|
||||
<asp:Parameter Name="Class" Type="String" />
|
||||
<asp:Parameter Name="TagDescr" Type="String" />
|
||||
<asp:Parameter Name="Original_TagCode" Type="String" />
|
||||
|
||||
@@ -3,9 +3,22 @@
|
||||
|
||||
<asp:HiddenField runat="server" ID="hfTagCode" />
|
||||
<asp:HiddenField runat="server" ID="hfIdxItem" />
|
||||
|
||||
|
||||
<h4><%: traduci("Tags2Item") %></h4>
|
||||
|
||||
<div runat="server" id="divTags">
|
||||
<asp:GridView ID="grViewItem" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20" DataKeyNames="idxItem,TagCode" DataSourceID="odsByItem" OnDataBound="grViewItem_DataBound" OnRowEditing="grViewItem_RowEditing">
|
||||
<div>
|
||||
<asp:LinkButton runat="server" ID="lbtAddNew" OnClick="lbtAddNew_Click"><%: traduci("addNewTag2Item") %></asp:LinkButton>
|
||||
<div style="font-size: 0.8em;">
|
||||
<asp:DropDownList runat="server" ID="ddlTags" DataSourceID="odsTagsAvail" DataTextField="TagCode" DataValueField="TagCode"></asp:DropDownList>
|
||||
<asp:ObjectDataSource runat="server" ID="odsTagsAvail" OldValuesParameterFormatString="original_{0}" SelectMethod="avail4item" TypeName="GIM_data.DS_MagTableAdapters.AnagTagsTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxItem" DefaultValue="0" Name="idxItem" PropertyName="Value" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="grViewTags" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20" DataKeyNames="idxItem,TagCode" DataSourceID="odsByItem" OnDataBound="grViewTags_DataBound" OnRowEditing="grViewTags_RowEditing" OnRowDeleted="grViewTags_RowDeleted">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
@@ -21,53 +34,55 @@
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<%--<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
|
||||
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
|
||||
</EditItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
|
||||
Visible='<%# isWritable() %>' ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>--%>
|
||||
<EditItemTemplate>
|
||||
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
|
||||
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
|
||||
</EditItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
|
||||
Visible='<%# isWritable() %>' ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>--%>
|
||||
<%--<asp:BoundField DataField="idxItem" HeaderText="idxItem" ReadOnly="True" SortExpression="idxItem" />--%>
|
||||
<asp:BoundField DataField="TagCode" HeaderText="TagCode" SortExpression="TagCode" ReadOnly="True" />
|
||||
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />
|
||||
</HeaderTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
|
||||
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete" Visible='<%# isWritable() %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
|
||||
<cc1:confirmbuttonextender id="ConfirmButtonExtender1" runat="server" confirmtext='<%# traduci("confermaDel")%>'
|
||||
targetcontrolid="imgDelete">
|
||||
</cc1:confirmbuttonextender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
<%--<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>' Visible='<%# isWritable() %>' />--%>
|
||||
</HeaderTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
|
||||
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete" Visible='<%# isWritable() %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
|
||||
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="imgDelete"></cc1:ConfirmButtonExtender>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="Label1" runat="server" CssClass="txtMini"></asp:Label>
|
||||
<asp:ObjectDataSource ID="odsByItem" runat="server" SelectMethod="getByItem" TypeName="GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter" OldValuesParameterFormatString="original_{0}">
|
||||
<asp:Label ID="lblNumRecTags" runat="server" CssClass="txtMini"></asp:Label>
|
||||
<asp:ObjectDataSource ID="odsByItem" runat="server" SelectMethod="getByItem" TypeName="GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter" OldValuesParameterFormatString="Original_{0}" DeleteMethod="Delete">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_idxItem" Type="Int32" />
|
||||
<asp:Parameter Name="Original_TagCode" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfIdxItem" Name="idxItem" PropertyName="Value" Type="Int32" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<div runat="server" id="divItems">
|
||||
<asp:GridView ID="grViewTags" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20" DataKeyNames="idxItem,TagCode" DataSourceID="odsByTags" OnDataBound="grViewTags_DataBound" OnRowEditing="grViewTags_RowEditing">
|
||||
<asp:GridView ID="grViewItem" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="20" DataKeyNames="idxItem,TagCode" DataSourceID="odsByTags" OnDataBound="grViewItem_DataBound" OnRowEditing="grViewItem_RowEditing">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
@@ -121,7 +136,7 @@
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
|
||||
<asp:Label ID="lblNumRecItem" runat="server" CssClass="txtMini"></asp:Label>
|
||||
<asp:ObjectDataSource ID="odsByTags" runat="server" SelectMethod="getByTag" TypeName="GIM_data.DS_MagTableAdapters.Tag2ItemTableAdapter" OldValuesParameterFormatString="original_{0}">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfTagCode" Name="TagCode" PropertyName="Value" Type="String" />
|
||||
|
||||
@@ -115,11 +115,11 @@ namespace GIM_site.WebUserControls
|
||||
{ }
|
||||
}
|
||||
int totRecord = grViewItem.Rows.Count + grViewItem.PageSize * (grViewItem.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grViewItem.Rows.Count, totRecord);
|
||||
lblNumRecItem.Text = string.Format("{0} records of ~ {1}", grViewItem.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
lblNumRecItem.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -144,11 +144,11 @@ namespace GIM_site.WebUserControls
|
||||
{ }
|
||||
}
|
||||
int totRecord = grViewTags.Rows.Count + grViewTags.PageSize * (grViewTags.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grViewTags.Rows.Count, totRecord);
|
||||
lblNumRecTags.Text = string.Format("{0} records of ~ {1}", grViewTags.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
lblNumRecTags.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -249,5 +249,27 @@ namespace GIM_site.WebUserControls
|
||||
grViewItem.DataBind();
|
||||
}
|
||||
|
||||
protected void lbtAddNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// aggiunge tag ad item selezionato...
|
||||
int idxItem = 0;
|
||||
try
|
||||
{
|
||||
idxItem = Convert.ToInt32(IdxItem);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if ((ddlTags.SelectedValue != "") && idxItem > 0)
|
||||
{
|
||||
TA_app.obj.taTag2Item.Insert(idxItem, ddlTags.SelectedValue);
|
||||
grViewTags.DataBind();
|
||||
ddlTags.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
protected void grViewTags_RowDeleted(object sender, GridViewDeletedEventArgs e)
|
||||
{
|
||||
ddlTags.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,22 +40,49 @@ namespace GIM_site.WebUserControls {
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTags;
|
||||
|
||||
/// <summary>
|
||||
/// grViewItem control.
|
||||
/// lbtAddNew control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grViewItem;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtAddNew;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 control.
|
||||
/// ddlTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlTags;
|
||||
|
||||
/// <summary>
|
||||
/// odsTagsAvail control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsTagsAvail;
|
||||
|
||||
/// <summary>
|
||||
/// grViewTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grViewTags;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRecTags control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumRecTags;
|
||||
|
||||
/// <summary>
|
||||
/// odsByItem control.
|
||||
@@ -76,22 +103,22 @@ namespace GIM_site.WebUserControls {
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItems;
|
||||
|
||||
/// <summary>
|
||||
/// grViewTags control.
|
||||
/// grViewItem control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grViewTags;
|
||||
protected global::System.Web.UI.WebControls.GridView grViewItem;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec control.
|
||||
/// lblNumRecItem control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumRec;
|
||||
protected global::System.Web.UI.WebControls.Label lblNumRecItem;
|
||||
|
||||
/// <summary>
|
||||
/// odsByTags control.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -52,4 +52,6 @@ exec voc.stp_insNewLemma 'GestioneSinonimi', 'Gestione ricodifica Etichette'
|
||||
exec voc.stp_insNewLemma 'TagCodeOrig', 'Etichetta originale import'
|
||||
exec voc.stp_insNewLemma 'Tag2Macc', 'Macchine associate'
|
||||
exec voc.stp_insNewLemma 'Tag2Item', 'Item associati'
|
||||
exec voc.stp_insNewLemma 'Tags2Item', 'Etichette Associate'
|
||||
exec voc.stp_insNewLemma 'addNewTag2Item', 'Aggiungi Etichetta ad Item'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user