update grafico e codice x RawMat
duplicato tutto in package --> ora completo...
This commit is contained in:
@@ -1,41 +1,35 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PackageMan.ascx.cs" Inherits="C2P.WebUserControls.mod_PackageMan" %>
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:Button ID="btnNewRawMat" runat="server" OnClick="btnNewRawMat_Click" CssClass="btn btn-success" />
|
||||
<asp:TextBox ID="txtRawMat" runat="server" placeholder="Insert Alloy" />
|
||||
<asp:LinkButton ID="lbtNew" runat="server" OnClick="lbtNew_Click" CssClass="btn btn-success"><%: traduci("btnNewRawMat") %></asp:LinkButton>
|
||||
<asp:TextBox ID="txtNewVal" runat="server" />
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
DataKeyNames="RawMat" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowEditing="grView_RowEditing">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="RawMat" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered" OnRowEditing="grView_RowEditing">
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbUpdate" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbCancel" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default" Visible="true"><i class="glyphicon glyphicon-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<asp:LinkButton runat="server" ID="lbSelect" CausesValidation="false" CommandName="Select"><i class="fa fa-search fa-2x"></i></asp:LinkButton>--%>
|
||||
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit"><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit" Visible='<%# Eval("RawMat")!="" %>'><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="RawMat" HeaderText="RawMat" ReadOnly="True" SortExpression="RawMat" />
|
||||
<asp:BoundField DataField="ProcCost" HeaderText="ProcCost" SortExpression="ProcCost" />
|
||||
<asp:BoundField DataField="ProcYield" HeaderText="ProcYield" SortExpression="ProcYield" />
|
||||
<asp:BoundField DataField="CSR" HeaderText="CSR" SortExpression="CSR" />
|
||||
<asp:BoundField DataField="SSR" HeaderText="SSR" SortExpression="SSR" />
|
||||
<asp:BoundField DataField="SSVA" HeaderText="SSVA" SortExpression="SSVA" />
|
||||
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" />
|
||||
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" />
|
||||
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" />
|
||||
<asp:BoundField DataField="ProcCost" HeaderText="ProcCost" SortExpression="ProcCost" DataFormatString="{0:C4}" />
|
||||
<asp:BoundField DataField="ProcYield" HeaderText="ProcYield" SortExpression="ProcYield" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="CSR" HeaderText="CSR" SortExpression="CSR" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="SSR" HeaderText="SSR" SortExpression="SSR" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="SSVA" HeaderText="SSVA" SortExpression="SSVA" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" DataFormatString="{0:C4}" />
|
||||
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" DataFormatString="{0:C4}" />
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' Visible='<%# Eval("RawMat")!="" %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -44,10 +38,7 @@
|
||||
</EmptyDataTemplate>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.RawMatDetTableAdapter"
|
||||
UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}"
|
||||
FilterExpression="RawMat LIKE '%{0}%' "
|
||||
OnUpdated="ods_Updated" OnInserted="ods_Inserted" InsertMethod="insertQuery">
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.RawMatDetTableAdapter" UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}" FilterExpression="RawMat LIKE '%{0}%' " InsertMethod="insertQuery">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_RawMat" Type="String" />
|
||||
</DeleteParameters>
|
||||
|
||||
@@ -12,16 +12,6 @@ namespace C2P.WebUserControls
|
||||
{
|
||||
public partial class mod_PackageMan : SteamWare.UserControl
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selezioneValore;
|
||||
public event EventHandler eh_resetSelezione;
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
@@ -29,8 +19,7 @@ namespace C2P.WebUserControls
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
btnNewRawMat.Text = user_std.UtSn.Traduci("btnNewRawMat");
|
||||
txtRawMat.Text = "";
|
||||
txtNewVal.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,23 +28,23 @@ namespace C2P.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNewRawMat_Click(object sender, EventArgs e)
|
||||
protected void lbtNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
creaNuovoRawMat();
|
||||
creaNuovo();
|
||||
}
|
||||
/// <summary>
|
||||
/// creazione nuovo lemma
|
||||
/// </summary>
|
||||
private void creaNuovoRawMat()
|
||||
private void creaNuovo()
|
||||
{
|
||||
if (txtRawMat.Text != "")
|
||||
if (txtNewVal.Text != "")
|
||||
{
|
||||
// inserisco
|
||||
DtProxy.man.taRMD.insertQuery(txtRawMat.Text.Trim());
|
||||
DtProxy.man.taRMD.insertQuery(txtNewVal.Text.Trim());
|
||||
// metto in campo ricerca...
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtRawMat.Text.Trim());
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtRawMat.Text = "";
|
||||
txtNewVal.Text = "";
|
||||
// riparto...
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
@@ -75,7 +64,11 @@ namespace C2P.WebUserControls
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// post bind grView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
@@ -100,69 +93,24 @@ namespace C2P.WebUserControls
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
private void selezionatoValore()
|
||||
{
|
||||
#if false
|
||||
SteamWare.memLayer.ML.setSessionVal("lemma_sel", grView.SelectedDataKey.Values[1]);
|
||||
if (eh_selezioneValore != null)
|
||||
{
|
||||
eh_selezioneValore(this, new EventArgs());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// editing riga
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
// seleziono la riga corrente...
|
||||
grView.SelectedIndex = e.NewEditIndex;
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
DataWrap.DW.resetVocabolario();
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
#if false
|
||||
SteamWare.memLayer.ML.emptySessionVal("lemma_sel");
|
||||
#endif
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void ods_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
#if false
|
||||
DataWrap.DW.resetVocabolario();
|
||||
selezionatoValore();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -13,22 +13,22 @@ namespace C2P.WebUserControls {
|
||||
public partial class mod_PackageMan {
|
||||
|
||||
/// <summary>
|
||||
/// btnNewRawMat control.
|
||||
/// lbtNew 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.Button btnNewRawMat;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtNew;
|
||||
|
||||
/// <summary>
|
||||
/// txtRawMat control.
|
||||
/// txtNewVal 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.TextBox txtRawMat;
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNewVal;
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
|
||||
@@ -1,41 +1,35 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_RawMatMan.ascx.cs" Inherits="C2P.WebUserControls.mod_RawMatMan" %>
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:Button ID="btnNewRawMat" runat="server" OnClick="btnNewRawMat_Click" CssClass="btn btn-success" />
|
||||
<asp:TextBox ID="txtRawMat" runat="server" placeholder="Insert Alloy" />
|
||||
<asp:LinkButton ID="lbtNew" runat="server" OnClick="lbtNew_Click" CssClass="btn btn-success"><%: traduci("btnNewRawMat") %></asp:LinkButton>
|
||||
<asp:TextBox ID="txtNewVal" runat="server" />
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
DataKeyNames="RawMat" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowEditing="grView_RowEditing">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="RawMat" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered" OnRowEditing="grView_RowEditing">
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbUpdate" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbCancel" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default" Visible="true"><i class="glyphicon glyphicon-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<asp:LinkButton runat="server" ID="lbSelect" CausesValidation="false" CommandName="Select"><i class="fa fa-search fa-2x"></i></asp:LinkButton>--%>
|
||||
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit"><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit" Visible='<%# Eval("RawMat")!="" %>'><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="RawMat" HeaderText="RawMat" ReadOnly="True" SortExpression="RawMat" />
|
||||
<asp:BoundField DataField="ProcCost" HeaderText="ProcCost" SortExpression="ProcCost" />
|
||||
<asp:BoundField DataField="ProcYield" HeaderText="ProcYield" SortExpression="ProcYield" />
|
||||
<asp:BoundField DataField="CSR" HeaderText="CSR" SortExpression="CSR" />
|
||||
<asp:BoundField DataField="SSR" HeaderText="SSR" SortExpression="SSR" />
|
||||
<asp:BoundField DataField="SSVA" HeaderText="SSVA" SortExpression="SSVA" />
|
||||
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" />
|
||||
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" />
|
||||
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" />
|
||||
<asp:BoundField DataField="ProcCost" HeaderText="ProcCost" SortExpression="ProcCost" DataFormatString="{0:C4}" />
|
||||
<asp:BoundField DataField="ProcYield" HeaderText="ProcYield" SortExpression="ProcYield" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="CSR" HeaderText="CSR" SortExpression="CSR" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="SSR" HeaderText="SSR" SortExpression="SSR" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="SSVA" HeaderText="SSVA" SortExpression="SSVA" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" DataFormatString="{0:P2}" />
|
||||
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" DataFormatString="{0:C4}" />
|
||||
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" DataFormatString="{0:C4}" />
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' Visible='<%# Eval("RawMat")!="" %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -44,10 +38,7 @@
|
||||
</EmptyDataTemplate>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.RawMatDetTableAdapter"
|
||||
UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}"
|
||||
FilterExpression="RawMat LIKE '%{0}%' "
|
||||
OnUpdated="ods_Updated" OnInserted="ods_Inserted" InsertMethod="insertQuery">
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.RawMatDetTableAdapter" UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}" FilterExpression="RawMat LIKE '%{0}%' " InsertMethod="insertQuery">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_RawMat" Type="String" />
|
||||
</DeleteParameters>
|
||||
|
||||
@@ -11,16 +11,6 @@ namespace C2P.WebUserControls
|
||||
{
|
||||
public partial class mod_RawMatMan : SteamWare.UserControl
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selezioneValore;
|
||||
public event EventHandler eh_resetSelezione;
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
@@ -28,8 +18,7 @@ namespace C2P.WebUserControls
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
btnNewRawMat.Text = user_std.UtSn.Traduci("btnNewRawMat");
|
||||
txtRawMat.Text = "";
|
||||
txtNewVal.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,23 +27,23 @@ namespace C2P.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNewRawMat_Click(object sender, EventArgs e)
|
||||
protected void lbtNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
creaNuovoRawMat();
|
||||
creaNuovo();
|
||||
}
|
||||
/// <summary>
|
||||
/// creazione nuovo lemma
|
||||
/// </summary>
|
||||
private void creaNuovoRawMat()
|
||||
private void creaNuovo()
|
||||
{
|
||||
if (txtRawMat.Text != "")
|
||||
if (txtNewVal.Text != "")
|
||||
{
|
||||
// inserisco
|
||||
DtProxy.man.taRMD.insertQuery(txtRawMat.Text.Trim());
|
||||
DtProxy.man.taRMD.insertQuery(txtNewVal.Text.Trim());
|
||||
// metto in campo ricerca...
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtRawMat.Text.Trim());
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtRawMat.Text = "";
|
||||
txtNewVal.Text = "";
|
||||
// riparto...
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
@@ -74,7 +63,11 @@ namespace C2P.WebUserControls
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// post bind grView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
@@ -99,69 +92,25 @@ namespace C2P.WebUserControls
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
private void selezionatoValore()
|
||||
{
|
||||
#if false
|
||||
SteamWare.memLayer.ML.setSessionVal("lemma_sel", grView.SelectedDataKey.Values[1]);
|
||||
if (eh_selezioneValore != null)
|
||||
{
|
||||
eh_selezioneValore(this, new EventArgs());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// editing riga
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
// seleziono la riga corrente...
|
||||
grView.SelectedIndex = e.NewEditIndex;
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
DataWrap.DW.resetVocabolario();
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
#if false
|
||||
SteamWare.memLayer.ML.emptySessionVal("lemma_sel");
|
||||
#endif
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void ods_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
#if false
|
||||
DataWrap.DW.resetVocabolario();
|
||||
selezionatoValore();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -13,22 +13,22 @@ namespace C2P.WebUserControls {
|
||||
public partial class mod_RawMatMan {
|
||||
|
||||
/// <summary>
|
||||
/// btnNewRawMat control.
|
||||
/// lbtNew 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.Button btnNewRawMat;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtNew;
|
||||
|
||||
/// <summary>
|
||||
/// txtRawMat control.
|
||||
/// txtNewVal 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.TextBox txtRawMat;
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNewVal;
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user