Completato fix pagine anagrafiche...

This commit is contained in:
Samuele E. Locatelli
2018-02-14 18:47:28 +01:00
parent f9413d9d6d
commit 599e31bc83
8 changed files with 325 additions and 327 deletions
+37 -37
View File
@@ -11,43 +11,43 @@
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<div class="container-flow">
<div class="row card" style="margin: 4px 8px;">
<div class="card-header">
<div class="row" style="margin: 2px 4px;">
<h3 class="card-title"><%: traduci("SchemaCollFamMacc") %></h3>
</div>
<div class="row" style="font-size: 0.8em; margin: 2px 4px;">
<div class="col-3">
<asp:CheckBox runat="server" ID="chkFilFamMacc" AutoPostBack="True" OnCheckedChanged="chkFilFamMacc_CheckedChanged" />
<uc1:mod_selFamMaccUrl runat="server" ID="mod_selFamMaccUrl" />
</div>
<div class="col-4">
<asp:CheckBox runat="server" ID="chkFiltCodSchedaVers" AutoPostBack="True" OnCheckedChanged="chkFiltCodSchedaVers_CheckedChanged" />
<uc1:mod_selSchedaUrl runat="server" ID="mod_selSchedaUrl" showLinkDoc="False" />
</div>
<div class="col-2">
<asp:Button runat="server" ID="btnAddNew" CssClass="btn btn-success" Text='<%# traduci("btnAddNewFromEmpty") %>' OnClick="btnAddNew_Click" />
<br />
<asp:Label runat="server" ID="lblHelp" ForeColor="Red"><%: traduci("SelectFM_CSV_2ins") %></asp:Label>
</div>
<div class="col-3">
<asp:Button runat="server" ID="btnClonaConfFamMacch" CssClass="btn btn-warning" Text='<%# traduci("btnClonaConfFamMacch") %>' OnClick="btnClonaConfFamMacch_Click" />
<div runat="server" id="divFamMaccFrom">
<div style="float: left;">
<asp:DropDownList runat="server" ID="ddlSelFamMacc" DataSourceID="odsFamMacc" DataTextField="label" DataValueField="value"></asp:DropDownList>
<asp:ObjectDataSource ID="odsFamMacc" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.v_selFamMaccTableAdapter"></asp:ObjectDataSource>
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<uc1:mod_SchemaCollFamMacc runat="server" ID="mod_SchemaCollFamMacc" />
</div>
<div class="col-12 card-footer">
<uc1:mod_righePag ID="mod_righePag" runat="server" />
</div>
<div class="container-flow">
<div class="card" style="margin: 4px 8px;">
<div class="card-header">
<div class="m-0">
<b class="card-title text-uppercase"><%: traduci("SchemaCollFamMacc") %></b>
</div>
<div class="row" style="font-size: 0.8em;">
<div class="col-3">
<asp:CheckBox runat="server" ID="chkFilFamMacc" AutoPostBack="True" OnCheckedChanged="chkFilFamMacc_CheckedChanged" />
<uc1:mod_selFamMaccUrl runat="server" ID="mod_selFamMaccUrl" />
</div>
<div class="col-4">
<asp:CheckBox runat="server" ID="chkFiltCodSchedaVers" AutoPostBack="True" OnCheckedChanged="chkFiltCodSchedaVers_CheckedChanged" />
<uc1:mod_selSchedaUrl runat="server" ID="mod_selSchedaUrl" showLinkDoc="False" />
</div>
<div class="col-2">
<asp:Button runat="server" ID="btnAddNew" CssClass="btn btn-success" Text='<%# traduci("btnAddNewFromEmpty") %>' OnClick="btnAddNew_Click" />
<br />
<asp:Label runat="server" ID="lblHelp" ForeColor="Red"><%: traduci("SelectFM_CSV_2ins") %></asp:Label>
</div>
<div class="col-3">
<asp:Button runat="server" ID="btnClonaConfFamMacch" CssClass="btn btn-warning" Text='<%# traduci("btnClonaConfFamMacch") %>' OnClick="btnClonaConfFamMacch_Click" />
<div runat="server" id="divFamMaccFrom">
<div style="float: left;">
<asp:DropDownList runat="server" ID="ddlSelFamMacc" DataSourceID="odsFamMacc" DataTextField="label" DataValueField="value"></asp:DropDownList>
<asp:ObjectDataSource ID="odsFamMacc" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.v_selFamMaccTableAdapter"></asp:ObjectDataSource>
</div>
</div>
</div>
</div>
</div>
<div class="card-body p-0">
<uc1:mod_SchemaCollFamMacc runat="server" ID="mod_SchemaCollFamMacc" />
</div>
<div class="card-footer">
<uc1:mod_righePag ID="mod_righePag" runat="server" />
</div>
</div>
</div>
</asp:Content>
+110 -111
View File
@@ -4,117 +4,116 @@ using System.Web.UI;
namespace CMS_SC
{
public partial class SchemaCollFamMacc : System.Web.UI.Page
public partial class SchemaCollFamMacc : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
((Bootstrap)this.Master).showSearch = true;
mod_righePag.numRowPag = 20;
mod_SchemaCollFamMacc.pageSize = mod_righePag.numRowPag;
presetChk();
fixChkFilt();
btnAddNew.DataBind();
btnClonaConfFamMacch.DataBind();
}
mod_righePag.eh_newNum += mod_righePag_eh_newNum;
}
private void presetChk()
{
chkFilFamMacc.Checked = memLayer.ML.BoolSessionObj("filtByFamMac");
chkFiltCodSchedaVers.Checked = memLayer.ML.BoolSessionObj("filtByScheda");
}
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// sistema i controlli checkbox di filtraggio
/// </summary>
private void fixChkFilt()
{
// sistemo scritta e visibilità da stato filtrato...
if (chkFilFamMacc.Checked)
{
chkFilFamMacc.Text = traduci("ShowAllFamMacc");
}
else
{
chkFilFamMacc.Text = traduci("SelFamMacc");
}
if (chkFiltCodSchedaVers.Checked)
{
chkFiltCodSchedaVers.Text = traduci("ShowAllSched");
}
else
{
chkFiltCodSchedaVers.Text = traduci("SelSched");
}
memLayer.ML.setSessionVal("filtByFamMac", chkFilFamMacc.Checked);
memLayer.ML.setSessionVal("filtByScheda", chkFiltCodSchedaVers.Checked);
mod_selFamMaccUrl.Visible = chkFilFamMacc.Checked;
mod_selSchedaUrl.Visible = chkFiltCodSchedaVers.Checked;
btnAddNew.Enabled= addNewEnabled;
//btnAddNew.Visible = addNewEnabled;
mod_SchemaCollFamMacc.doUpdate();
// mostro clona SE sto guardando una famiglia...!
btnClonaConfFamMacch.Visible = chkFilFamMacc.Checked;
divFamMaccFrom.Visible = chkFilFamMacc.Checked;
}
void mod_righePag_eh_newNum(object sender, EventArgs e)
{
mod_SchemaCollFamMacc.pageSize = mod_righePag.numRowPag;
}
protected void chkFiltCodSchedaVers_CheckedChanged(object sender, EventArgs e)
{
fixChkFilt();
}
protected void chkFilFamMacc_CheckedChanged(object sender, EventArgs e)
{
fixChkFilt();
}
/// <summary>
/// verifica se si possano aggiungere nuovi record ovvero se selezionata famiglia e scheda...
/// </summary>
public bool addNewEnabled
{
get
{
bool answ = false;
try
{
answ = (memLayer.ML.QSS("CodSchedaVers") != "") && (memLayer.ML.QSS("CodFam") != "") && memLayer.ML.BoolSessionObj("filtByFamMac") && memLayer.ML.BoolSessionObj("filtByScheda");
}
catch
{ }
return answ;
}
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAddNew_Click(object sender, EventArgs e)
{
mod_SchemaCollFamMacc.addNewFromSel(memLayer.ML.QSS("CodSchedaVers"), memLayer.ML.QSS("CodFam"));
}
protected void btnClonaConfFamMacch_Click(object sender, EventArgs e)
{
mod_SchemaCollFamMacc.clonaFamMacc(ddlSelFamMacc.SelectedValue, memLayer.ML.QSS("CodFam"));
}
if (!Page.IsPostBack)
{
((Bootstrap)this.Master).showSearch = true;
mod_righePag.numRowPag = 20;
mod_SchemaCollFamMacc.pageSize = mod_righePag.numRowPag;
presetChk();
fixChkFilt();
btnAddNew.DataBind();
btnClonaConfFamMacch.DataBind();
}
mod_righePag.eh_newNum += mod_righePag_eh_newNum;
}
private void presetChk()
{
chkFilFamMacc.Checked = memLayer.ML.BoolSessionObj("filtByFamMac");
chkFiltCodSchedaVers.Checked = memLayer.ML.BoolSessionObj("filtByScheda");
}
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// sistema i controlli checkbox di filtraggio
/// </summary>
private void fixChkFilt()
{
// sistemo scritta e visibilità da stato filtrato...
if (chkFilFamMacc.Checked)
{
chkFilFamMacc.Text = traduci("ShowAllFamMacc");
}
else
{
chkFilFamMacc.Text = traduci("SelFamMacc");
}
if (chkFiltCodSchedaVers.Checked)
{
chkFiltCodSchedaVers.Text = traduci("ShowAllSched");
}
else
{
chkFiltCodSchedaVers.Text = traduci("SelSched");
}
memLayer.ML.setSessionVal("filtByFamMac", chkFilFamMacc.Checked);
memLayer.ML.setSessionVal("filtByScheda", chkFiltCodSchedaVers.Checked);
mod_selFamMaccUrl.Visible = chkFilFamMacc.Checked;
mod_selSchedaUrl.Visible = chkFiltCodSchedaVers.Checked;
btnAddNew.Enabled = addNewEnabled;
mod_SchemaCollFamMacc.doUpdate();
// mostro clona SE sto guardando una famiglia...!
btnClonaConfFamMacch.Enabled = chkFilFamMacc.Checked;
divFamMaccFrom.Visible = chkFilFamMacc.Checked;
}
void mod_righePag_eh_newNum(object sender, EventArgs e)
{
mod_SchemaCollFamMacc.pageSize = mod_righePag.numRowPag;
}
protected void chkFiltCodSchedaVers_CheckedChanged(object sender, EventArgs e)
{
fixChkFilt();
}
protected void chkFilFamMacc_CheckedChanged(object sender, EventArgs e)
{
fixChkFilt();
}
/// <summary>
/// verifica se si possano aggiungere nuovi record ovvero se selezionata famiglia e scheda...
/// </summary>
public bool addNewEnabled
{
get
{
bool answ = false;
try
{
answ = (memLayer.ML.QSS("CodSchedaVers") != "") && (memLayer.ML.QSS("CodFam") != "") && memLayer.ML.BoolSessionObj("filtByFamMac") && memLayer.ML.BoolSessionObj("filtByScheda");
}
catch
{ }
return answ;
}
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAddNew_Click(object sender, EventArgs e)
{
mod_SchemaCollFamMacc.addNewFromSel(memLayer.ML.QSS("CodSchedaVers"), memLayer.ML.QSS("CodFam"));
}
protected void btnClonaConfFamMacch_Click(object sender, EventArgs e)
{
mod_SchemaCollFamMacc.clonaFamMacc(ddlSelFamMacc.SelectedValue, memLayer.ML.QSS("CodFam"));
}
}
}
+44 -45
View File
@@ -1,123 +1,122 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace CMS_SC
{
namespace CMS_SC {
public partial class SchemaCollFamMacc {
/// <summary>
/// chkFilFamMacc control.
/// Controllo chkFilFamMacc.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.CheckBox chkFilFamMacc;
/// <summary>
/// mod_selFamMaccUrl control.
/// Controllo mod_selFamMaccUrl.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::CMS_SC.WebUserControls.mod_selFamMaccUrl mod_selFamMaccUrl;
/// <summary>
/// chkFiltCodSchedaVers control.
/// Controllo chkFiltCodSchedaVers.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.CheckBox chkFiltCodSchedaVers;
/// <summary>
/// mod_selSchedaUrl control.
/// Controllo mod_selSchedaUrl.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::CMS_SC.WebUserControls.mod_selSchedaUrl mod_selSchedaUrl;
/// <summary>
/// btnAddNew control.
/// Controllo btnAddNew.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.Button btnAddNew;
/// <summary>
/// lblHelp control.
/// Controllo lblHelp.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.Label lblHelp;
/// <summary>
/// btnClonaConfFamMacch control.
/// Controllo btnClonaConfFamMacch.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.Button btnClonaConfFamMacch;
/// <summary>
/// divFamMaccFrom control.
/// Controllo divFamMaccFrom.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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 divFamMaccFrom;
/// <summary>
/// ddlSelFamMacc control.
/// Controllo ddlSelFamMacc.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.DropDownList ddlSelFamMacc;
/// <summary>
/// odsFamMacc control.
/// Controllo odsFamMacc.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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 odsFamMacc;
/// <summary>
/// mod_SchemaCollFamMacc control.
/// Controllo mod_SchemaCollFamMacc.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::CMS_SC.WebUserControls.mod_SchemaCollFamMacc mod_SchemaCollFamMacc;
/// <summary>
/// mod_righePag control.
/// Controllo mod_righePag.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::mod_righePag mod_righePag;
}
+1 -1
View File
@@ -20,7 +20,7 @@
<asp:Button runat="server" ID="btnDown" Text="DOWN" OnClick="btnDown_Click" CssClass="hiddenBtn" />--%>
<asp:Button runat="server" ID="btnSave" Text="S" OnClick="btnSave_Click" CssClass="hiddenBtn" />
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="CodScheda,Vers,CodMisura" DataSourceID="ods" CssClass="table table-striped" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing" onkeydown="enter(this)" onkeyup="enter(this)">
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="CodScheda,Vers,CodMisura" DataSourceID="ods" CssClass="table table-condensed table-sm table-striped m-0" AllowPaging="True" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing" onkeydown="enter(this)" onkeyup="enter(this)">
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="table-info" />
@@ -1,60 +1,62 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_SchemaCollFamMacc.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_SchemaCollFamMacc" %>
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="CodFam,CodSchedaVers" DataSourceID="ods" CssClass="table table-striped" AllowPaging="True" AllowSorting="True" OnRowDataBound="grView_RowDataBound" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="info" />
<EmptyDataTemplate>
<%: traduci("NoRecords") %>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
<EditItemTemplate>
<asp:LinkButton ID="lbUpdate" runat="server" CausesValidation="True" CommandName="Update" ToolTip="Update" CssClass="fa fa-check fa-2x" />
&nbsp;<asp:LinkButton ID="lbCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip="Cancel" CssClass="fa fa-undo fa-2x" />
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Select" CssClass="fa fa-search fa-2x" />
&nbsp;
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="CodFam,CodSchedaVers" DataSourceID="ods" CssClass="table table-condensed table-sm table-striped m-0" AllowPaging="True" AllowSorting="True" OnRowDataBound="grView_RowDataBound" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="table-info" />
<EmptyDataTemplate>
<%: traduci("NoRecords") %>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
<EditItemTemplate>
<asp:LinkButton ID="lbUpdate" runat="server" CausesValidation="True" CommandName="Update" ToolTip="Update" CssClass="fa fa-check fa-2x" />
&nbsp;<asp:LinkButton ID="lbCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip="Cancel" CssClass="fa fa-undo fa-2x" />
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Select" CssClass="fa fa-search fa-2x" />
&nbsp;
<asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip="Edit" CssClass="fa fa-edit fa-2x" />
</ItemTemplate>
<ItemStyle Wrap="False"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="CodFam" SortExpression="CodFam">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="ddlSelFamMacc" DataSourceID="odsFamMacc" DataTextField="label" DataValueField="value" SelectedValue='<%# Bind("CodFam") %>' Font-Size="0.75em"></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("CodFam") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CodScheda" SortExpression="CodScheda">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="ddlSelScheda" DataSourceID="odsScheda" DataTextField="label" DataValueField="value" SelectedValue='<%# Bind("CodSchedaVers") %>' Font-Size="0.75em"></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("CodSchedaVers") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" ItemStyle-Width="90px">
<HeaderTemplate>
<%# traduci("moveMis") %>
</HeaderTemplate>
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<div class="col-6">
<asp:LinkButton ID="lbMoveUp" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="moveUp" OnClick="lb_Click" ToolTip="Move Up" CssClass="fa fa-arrow-up fa-2x" Visible='<%# arrowVisible("UP", Eval("Ordinale")) %>' />
</div>
<div class="col-6">
<asp:LinkButton ID="lbMoveDown" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="moveDown" OnClick="lb_Click" ToolTip="Move Down" CssClass="fa fa-arrow-down fa-2x" Visible='<%# arrowVisible("DOWN", Eval("Ordinale")) %>' />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="opz" HeaderText="opz" SortExpression="opz" ControlStyle-Width="4em" />
<asp:BoundField DataField="NumSchede" HeaderText="#" SortExpression="NumSchede" />
<asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" ControlStyle-Width="100%" />
<%--<asp:TemplateField HeaderText="Descrizione" SortExpression="Descrizione">
</ItemTemplate>
<ItemStyle Wrap="False"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="CodFam" SortExpression="CodFam">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="ddlSelFamMacc" DataSourceID="odsFamMacc" DataTextField="label" DataValueField="value" SelectedValue='<%# Bind("CodFam") %>' Font-Size="0.75em"></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("CodFam") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CodScheda" SortExpression="CodScheda">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="ddlSelScheda" DataSourceID="odsScheda" DataTextField="label" DataValueField="value" SelectedValue='<%# Bind("CodSchedaVers") %>' Font-Size="0.75em"></asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("CodSchedaVers") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<HeaderTemplate>
<%# traduci("moveMis") %>
</HeaderTemplate>
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<div class="row" style="width: 6em;">
<div class="col-6">
<asp:LinkButton ID="lbMoveUp" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="moveUp" OnClick="lb_Click" ToolTip="Move Up" CssClass="fa fa-arrow-up fa-2x" Visible='<%# arrowVisible("UP", Eval("Ordinale")) %>' />
</div>
<div class="col-6">
<asp:LinkButton ID="lbMoveDown" runat="server" CausesValidation="False" CommandName="Select" CommandArgument="moveDown" OnClick="lb_Click" ToolTip="Move Down" CssClass="fa fa-arrow-down fa-2x" Visible='<%# arrowVisible("DOWN", Eval("Ordinale")) %>' />
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="opz" HeaderText="opz" SortExpression="opz" ControlStyle-Width="4em" />
<asp:BoundField DataField="NumSchede" HeaderText="#" SortExpression="NumSchede" />
<asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" ControlStyle-Width="100%" />
<%--<asp:TemplateField HeaderText="Descrizione" SortExpression="Descrizione">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Descrizione") %>' Width="20em" />
</EditItemTemplate>
@@ -62,44 +64,44 @@
<asp:Label ID="Label3" runat="server" Text='<%# Eval("Descrizione") %>' />
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
<HeaderTemplate>
<%--<asp:LinkButton ID="lbAddNew" runat="server" CausesValidation="false" ToolTip="InsNew" CssClass="fa fa-plus fa-2x" OnClick="lbAddNew_Click" />--%>
</HeaderTemplate>
<EditItemTemplate>
<asp:LinkButton ID="lbUpdate2" runat="server" CausesValidation="True" CommandName="Update" ToolTip="Update" CssClass="fa fa-check fa-2x" />
&nbsp;<asp:LinkButton ID="lbCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip="Cancel" CssClass="fa fa-undo fa-2x" />
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete" ToolTip="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' CssClass="fa fa-trash fa-2x" />
</ItemTemplate>
<ItemStyle Wrap="False"></ItemStyle>
</asp:TemplateField>
</Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-Wrap="false">
<HeaderTemplate>
<%--<asp:LinkButton ID="lbAddNew" runat="server" CausesValidation="false" ToolTip="InsNew" CssClass="fa fa-plus fa-2x" OnClick="lbAddNew_Click" />--%>
</HeaderTemplate>
<EditItemTemplate>
<asp:LinkButton ID="lbUpdate2" runat="server" CausesValidation="True" CommandName="Update" ToolTip="Update" CssClass="fa fa-check fa-2x" />
&nbsp;<asp:LinkButton ID="lbCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip="Cancel" CssClass="fa fa-undo fa-2x" />
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandName="Delete" ToolTip="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' CssClass="fa fa-trash fa-2x" />
</ItemTemplate>
<ItemStyle Wrap="False"></ItemStyle>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getBySchedaFamMacc" TypeName="CMS_SC_Data.DS_ApplicazioneTableAdapters.SchemaCollFamMaccTableAdapter" FilterExpression=" CodFam LIKE '%{0}%' OR CodScheda LIKE '%{0}%' OR Descrizione LIKE '%{0}%' " DeleteMethod="deleteQuery" UpdateMethod="updateQuery" OnUpdating="ods_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_CodSchedaVers" Type="String" />
<asp:Parameter Name="Original_CodFam" Type="String" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="searchVal" />
</FilterParameters>
<SelectParameters>
<asp:QueryStringParameter Name="CodSchedaVers" QueryStringField="CodSchedaVers" Type="String" />
<asp:QueryStringParameter Name="CodFam" QueryStringField="CodFam" Type="String" />
<asp:SessionParameter Name="filtByScheda" SessionField="filtByScheda" Type="Boolean" />
<asp:SessionParameter Name="filtByFamMac" SessionField="filtByFamMac" Type="Boolean" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="CodSchedaVers" Type="String" />
<asp:Parameter Name="CodFam" Type="String" />
<asp:Parameter Name="NumSchede" Type="Int32" />
<asp:Parameter Name="Descrizione" Type="String" />
<asp:Parameter Name="opz" Type="String" />
<asp:Parameter Name="Original_CodSchedaVers" Type="String" />
<asp:Parameter Name="Original_CodFam" Type="String" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="Original_CodSchedaVers" Type="String" />
<asp:Parameter Name="Original_CodFam" Type="String" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="searchVal" />
</FilterParameters>
<SelectParameters>
<asp:QueryStringParameter Name="CodSchedaVers" QueryStringField="CodSchedaVers" Type="String" />
<asp:QueryStringParameter Name="CodFam" QueryStringField="CodFam" Type="String" />
<asp:SessionParameter Name="filtByScheda" SessionField="filtByScheda" Type="Boolean" />
<asp:SessionParameter Name="filtByFamMac" SessionField="filtByFamMac" Type="Boolean" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="CodSchedaVers" Type="String" />
<asp:Parameter Name="CodFam" Type="String" />
<asp:Parameter Name="NumSchede" Type="Int32" />
<asp:Parameter Name="Descrizione" Type="String" />
<asp:Parameter Name="opz" Type="String" />
<asp:Parameter Name="Original_CodSchedaVers" Type="String" />
<asp:Parameter Name="Original_CodFam" Type="String" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsScheda" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CMS_SC_Data.DS_UtilityTableAdapters.v_selSchedaTableAdapter"></asp:ObjectDataSource>
+20 -21
View File
@@ -1,51 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace CMS_SC.WebUserControls
{
namespace CMS_SC.WebUserControls {
public partial class mod_SchemaCollFamMacc {
/// <summary>
/// grView control.
/// Controllo grView.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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>
/// ods control.
/// Controllo ods.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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>
/// odsScheda control.
/// Controllo odsScheda.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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 odsScheda;
/// <summary>
/// odsFamMacc control.
/// Controllo odsFamMacc.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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 odsFamMacc;
}
+1 -1
View File
@@ -1,7 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_validVal.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_validVal" %>
<asp:Button runat="server" ID="btnNewFromEmpty" Text='<%# traduci("btnAddNewFromEmpty") %>' OnClick="btnNewFromEmpty_Click" />
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="CodScheda,Vers,CodMisura,MinPar" DataSourceID="ods" CssClass="table table-striped" AllowPaging="False" AllowSorting="True" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing" onkeydown="enter(this)" onkeyup="enter(this)">
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="CodScheda,Vers,CodMisura,MinPar" DataSourceID="ods" CssClass="table table-condensed table-sm table-striped m-0" AllowPaging="False" AllowSorting="True" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing" onkeydown="enter(this)" onkeyup="enter(this)">
<PagerStyle CssClass="active GridPager" />
<PagerSettings Mode="NumericFirstLast" />
<SelectedRowStyle CssClass="info" />
+20 -21
View File
@@ -1,51 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace CMS_SC.WebUserControls
{
namespace CMS_SC.WebUserControls {
public partial class mod_validVal {
/// <summary>
/// btnNewFromEmpty control.
/// Controllo btnNewFromEmpty.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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.Button btnNewFromEmpty;
/// <summary>
/// grView control.
/// Controllo grView.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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>
/// ods control.
/// Controllo ods.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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>
/// hfCodMisura control.
/// Controllo hfCodMisura.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// 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 hfCodMisura;
}