prima release bozza vocabolario (non ancora a posto graficamente ma almeno si vede qualcosa...)
This commit is contained in:
@@ -289,6 +289,8 @@
|
||||
<Content Include="WebUserControls\mod_Q_Header.ascx" />
|
||||
<Content Include="WebUserControls\mod_Q_PackPar.ascx" />
|
||||
<Content Include="WebUserControls\mod_Q_Quot.ascx" />
|
||||
<Content Include="WebUserControls\mod_ricercaGenerica.ascx" />
|
||||
<Content Include="WebUserControls\mod_righePag.ascx" />
|
||||
<Content Include="WebUserControls\mod_selPeriodo.ascx" />
|
||||
<Content Include="WebUserControls\mod_slider.ascx" />
|
||||
<Content Include="WebUserControls\mod_testata.ascx" />
|
||||
@@ -572,6 +574,20 @@
|
||||
<Compile Include="WebUserControls\mod_Q_Quot.ascx.designer.cs">
|
||||
<DependentUpon>mod_Q_Quot.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_ricercaGenerica.ascx.cs">
|
||||
<DependentUpon>mod_ricercaGenerica.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_ricercaGenerica.ascx.designer.cs">
|
||||
<DependentUpon>mod_ricercaGenerica.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_righePag.ascx.cs">
|
||||
<DependentUpon>mod_righePag.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_righePag.ascx.designer.cs">
|
||||
<DependentUpon>mod_righePag.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_selPeriodo.ascx.cs">
|
||||
<DependentUpon>mod_selPeriodo.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
+29
-4
@@ -1,12 +1,37 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.master" AutoEventWireup="true" CodeBehind="Vocabolario.aspx.cs" Inherits="C2P.Vocabolario" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_lemmiVocab.ascx" TagPrefix="uc1" TagName="mod_lemmiVocab" %>
|
||||
<%@ Register src="WebUserControls/mod_vocabolario.ascx" tagname="mod_vocabolario" tagprefix="uc2" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_lemmiVocab.ascx" TagPrefix="uc2" TagName="mod_lemmiVocab" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_vocabolario.ascx" TagName="mod_vocabolario" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc3" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_ricercaGenerica.ascx" TagPrefix="uc4" TagName="mod_ricercaGenerica" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
<%--<uc1:mod_lemmiVocab runat="server" ID="mod_lemmiVocab" />--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<%--<uc2:mod_vocabolario ID="mod_vocabolario1" runat="server" />--%>
|
||||
<div class="container-fluid" style="background-color: #cdcdcd; padding-top: 2px; padding-bottom: 2px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 col-sm-offset-2 text-center">
|
||||
<uc4:mod_ricercaGenerica runat="server" ID="mod_ricercaGenerica" />
|
||||
</div>
|
||||
<div class="col-sm-2 text-right">
|
||||
<uc3:mod_righePag ID="mod_righePag1" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" style="padding-top: 2px; padding-bottom: 2px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<uc1:mod_vocabolario ID="Mod_vocabolario1" runat="server" />
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<uc2:mod_lemmiVocab ID="Mod_lemmiVocab1" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
Generated
+36
@@ -11,5 +11,41 @@ namespace C2P {
|
||||
|
||||
|
||||
public partial class Vocabolario {
|
||||
|
||||
/// <summary>
|
||||
/// mod_ricercaGenerica control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_ricercaGenerica mod_ricercaGenerica;
|
||||
|
||||
/// <summary>
|
||||
/// mod_righePag1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_righePag mod_righePag1;
|
||||
|
||||
/// <summary>
|
||||
/// Mod_vocabolario1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_vocabolario Mod_vocabolario1;
|
||||
|
||||
/// <summary>
|
||||
/// Mod_lemmiVocab1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_lemmiVocab Mod_lemmiVocab1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,93 +52,24 @@
|
||||
<uc1:mod_display ID="mod_display13" runat="server" etichetta='<%# traduci("KeyAMIL") %>' valore='<%# Bind("KeyAMIL") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<%--
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<uc1:mod_display ID="mod_display9" runat="server" etichetta='<%# traduci("Note") %>' valore='<%# Bind("Note") %>' />
|
||||
<div class="col-xs-2 text-left">
|
||||
<uc1:mod_display ID="mod_display14" runat="server" etichetta='<%# traduci("WSR01") %>' valore='<%# Bind("WSR01", "{0:P2}") %>' />
|
||||
</div>
|
||||
</div>--%>
|
||||
<div class="col-xs-2 text-left">
|
||||
<uc1:mod_display ID="mod_display15" runat="server" etichetta='<%# traduci("MSR01") %>' valore='<%# Bind("MSR01", "{0:P2}") %>' />
|
||||
</div>
|
||||
<div class="col-xs-8 text-right">
|
||||
<uc1:mod_display ID="mod_display17" runat="server" etichetta='<%# traduci("NetProd01") %>' valore='<%# Bind("NetProd01", "{0:N2} kg/h") %>' />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<%--<EditItemTemplate>
|
||||
<div class="row bottomLine">
|
||||
<div class="col-xs-6 text-left">
|
||||
<uc1:mod_display ID="mod_display1" runat="server" etichetta='<%# traduci("ProductCode") %>' />
|
||||
<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="odsProducts" DataValueField="value" DataTextField="value" SelectedValue='<%# Bind("CodItem") %>' />
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<uc1:mod_display ID="mod_display2" runat="server" etichetta='<%# traduci("Customer") %>' />
|
||||
<asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="odsCustomers" DataValueField="value" DataTextField="label" SelectedValue='<%# Bind("CodClient") %>' CssClass="text-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bottomLine">
|
||||
<div class="col-xs-6 text-left">
|
||||
<uc1:mod_display ID="mod_display3" runat="server" etichetta='<%# traduci("Alloy") %>' />
|
||||
<asp:DropDownList ID="DropDownList4" runat="server" DataSourceID="odsRawMat" DataValueField="value" DataTextField="label" SelectedValue='<%# Bind("RawMat") %>' />
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<uc1:mod_display ID="mod_display4" runat="server" etichetta='<%# traduci("OrderBatch") %>' />
|
||||
<asp:TextBox Font-Bold="true" ID="TextBox4" runat="server" Text='<%# Bind("BatchQty") %>' CssClass="text-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bottomLine">
|
||||
<div class="col-xs-6 text-left">
|
||||
<uc1:mod_display ID="mod_display5" runat="server" etichetta='<%# traduci("Base6060") %>' />
|
||||
<asp:TextBox Font-Bold="true" ID="TextBox5" runat="server" Text='<%# Bind("RawMatCost","{0:N4}") %>' />
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<uc1:mod_display ID="mod_display6" runat="server" etichetta='<%# traduci("Incoterms") %>' />
|
||||
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="odsIncoterms" DataValueField="value" DataTextField="label" SelectedValue='<%# Bind("CodInco") %>' CssClass="text-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bottomLine">
|
||||
<div class="col-xs-6 text-left">
|
||||
<uc1:mod_display ID="mod_display7" runat="server" etichetta='<%# traduci("ExtraAlloy") %>' />
|
||||
<asp:TextBox Font-Bold="true" ID="TextBox7" runat="server" Text='<%# Bind("RawMatExtraCost","{0:N4}") %>' />
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<uc1:mod_display ID="mod_display8" runat="server" etichetta='<%# traduci("Agency") %>' />
|
||||
<asp:Label Font-Bold="true" ID="TextBox8" runat="server" Text='<%# Eval("ProvvCost","{0:N4}") %>' CssClass="text-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<uc1:mod_display ID="mod_display9" runat="server" etichetta='<%# traduci("Note") %>' />
|
||||
<asp:TextBox Font-Bold="true" ID="TextBox1" runat="server" Text='<%# Bind("Note") %>' TextMode="MultiLine" Width="100%" Height="4em" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-xs-offset-3">
|
||||
<div class="col-xs-6">
|
||||
<asp:LinkButton runat="server" ID="LinkButton1" class="btn btn-success" Width="100%" CausesValidation="true" CommandName="Update"><i class="fa fa-check"></i> <%: traduci("Update") %></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<asp:LinkButton runat="server" ID="LinkButton2" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo"></i> <%: traduci("Cancel") %></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</EditItemTemplate>--%>
|
||||
</asp:FormView>
|
||||
<asp:ObjectDataSource ID="odsQuotes" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByKey" TypeName="C2P_Data.DS_QuotesTableAdapters.QuoteFull_QTableAdapter" UpdateMethod="updateHeaders">
|
||||
<asp:ObjectDataSource ID="odsQuotes" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByKey" TypeName="C2P_Data.DS_QuotesTableAdapters.QuoteFull_QTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="QuoteType" QueryStringField="QuoteType" Type="String" />
|
||||
<asp:QueryStringParameter Name="CodQuote" QueryStringField="CodQuote" Type="Int64" />
|
||||
<asp:QueryStringParameter Name="QuoteRev" QueryStringField="QuoteRev" Type="Int32" />
|
||||
<asp:Parameter DefaultValue="Y" Name="DoUpdate" Type="String" />
|
||||
</SelectParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="Original_QuoteType" Type="String" />
|
||||
<asp:Parameter Name="Original_CodQuote" Type="Int64" />
|
||||
<asp:Parameter Name="Original_QuoteRev" Type="Int32" />
|
||||
<asp:Parameter Name="CodClient" Type="String" />
|
||||
<asp:Parameter Name="CodItem" Type="String" />
|
||||
<asp:Parameter Name="RawMat" Type="String" />
|
||||
<asp:Parameter Name="RawMatCost" Type="Decimal" />
|
||||
<asp:Parameter Name="RawMatExtraCost" Type="Decimal" />
|
||||
<asp:Parameter Name="BatchQty" Type="Int32" />
|
||||
<asp:Parameter Name="CodInco" Type="String" />
|
||||
<asp:Parameter Name="Note" Type="String" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<%--<asp:ObjectDataSource ID="odsProducts" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="C2P_Data.DS_UtilityTableAdapters.v_selItemsTableAdapter"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="odsCustomers" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="C2P_Data.DS_UtilityTableAdapters.v_selClientTableAdapter"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="odsRawMat" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="C2P_Data.DS_UtilityTableAdapters.v_selRawMatTableAdapter"></asp:ObjectDataSource>
|
||||
<asp:ObjectDataSource ID="odsIncoterms" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="C2P_Data.DS_UtilityTableAdapters.v_selIncotermsTableAdapter"></asp:ObjectDataSource>--%>
|
||||
|
||||
@@ -1,53 +1,55 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="C2P.WebUserControls.mod_lemmiVocab" Codebehind="mod_lemmiVocab.ascx.cs" %>
|
||||
<table class="txtMini">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound" >
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Lingua" SortExpression="Lingua">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox0" runat="server" Text='<%# Eval("Lingua") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Lingua") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lemma" SortExpression="Lemma" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox2" runat="server" Text='<%# Eval("Lemma") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Lemma") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Traduzione" SortExpression="Traduzione">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Traduzione") %>' Width="500px"
|
||||
TextMode="MultiLine"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Traduzione") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_lemmiVocab" CodeBehind="mod_lemmiVocab.ascx.cs" %>
|
||||
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="C2P_data.selDataVoc"
|
||||
OldValuesParameterFormatString="original_{0}"
|
||||
FilterExpression="Lemma LIKE '%{0}%'">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="lemma_sel" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False"
|
||||
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Lingua" SortExpression="Lingua">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox0" runat="server" Text='<%# Eval("Lingua") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Lingua") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lemma" SortExpression="Lemma" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox2" runat="server" Text='<%# Eval("Lemma") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Lemma") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Traduzione" SortExpression="Traduzione">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Traduzione") %>' Width="500px"
|
||||
TextMode="MultiLine"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Traduzione") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="SteamWare.selDataVoc"
|
||||
OldValuesParameterFormatString="original_{0}"
|
||||
FilterExpression="Lemma LIKE '%{0}%'">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="lemma_sel" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,63 +10,42 @@ using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using SteamWare;
|
||||
|
||||
|
||||
namespace C2P.WebUserControls
|
||||
public partial class mod_lemmiVocab : SteamWare.UserControl
|
||||
{
|
||||
public partial class mod_lemmiVocab : System.Web.UI.UserControl
|
||||
#region protected
|
||||
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
|
||||
#region protected
|
||||
|
||||
//protected override void aggiornaControlliDataGL()
|
||||
//{
|
||||
// base.aggiornaControlliDataGL();
|
||||
// grView.PageSize = _righeDataGridAnagr;
|
||||
//}
|
||||
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} ({1})", grView.Rows.Count, totRecord);
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna i dati mostrati
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
else
|
||||
{
|
||||
ods.DataBind();
|
||||
grView.DataBind();
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna i dati mostrati
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
ods.DataBind();
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
+28
-30
@@ -7,36 +7,34 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace C2P.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_lemmiVocab {
|
||||
|
||||
/// <summary>
|
||||
/// grView 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 grView;
|
||||
|
||||
public partial class mod_lemmiVocab {
|
||||
|
||||
/// <summary>
|
||||
/// grView 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 grView;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec 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;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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 ods;
|
||||
}
|
||||
/// <summary>
|
||||
/// lblNumRec 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;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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 ods;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_ricercaGenerica" CodeBehind="mod_ricercaGenerica.ascx.cs" %>
|
||||
|
||||
<div class="input-group" style="width: 400px; margin: auto; padding-top: 2px; padding-bottom: 2px;">
|
||||
<span class="input-group-addon">
|
||||
<asp:LinkButton runat="server" ID="lbnSearch" OnClick="btnCerca_Click"><i class="glyphicon glyphicon-search"></i> <%: traduci("lbnResearch") %></asp:LinkButton>
|
||||
</span>
|
||||
<asp:TextBox runat="server" ID="txtCerca" OnTextChanged="txtCerca_TextChanged" AccessKey="r" CssClass="searchinput form-control" placeholder="..." AutoPostBack="True" />
|
||||
<span class="input-group-addon">
|
||||
<asp:LinkButton runat="server" ID="lnkReset" Text="X" type="button" OnClick="lnkReset_Click" Font-Size="0.8em" />
|
||||
</span>
|
||||
</div>
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using SteamWare;
|
||||
|
||||
public partial class mod_ricercaGenerica : SteamWare.UserControl
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
|
||||
#endregion
|
||||
|
||||
# region area protected
|
||||
|
||||
#region area ricerche dettaglio specifiche
|
||||
|
||||
protected bool _cercaMatricole = false;
|
||||
protected bool _cercaUsername = false;
|
||||
//protected bool _cercaManufacturer = false;
|
||||
//protected bool _cercaCategorie = false;
|
||||
protected bool _cercaModelli = false;
|
||||
protected bool _cercaMag = false;
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
updateText();
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtCerca.Text = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercato", testoRicerca);
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna il testo cercato
|
||||
/// </summary>
|
||||
public void updateText()
|
||||
{
|
||||
if (SteamWare.memLayer.ML.StringSessionObj("valoreCercato") != "" && !Page.IsPostBack)
|
||||
{
|
||||
testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercato");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_ricercaGenerica {
|
||||
|
||||
/// <summary>
|
||||
/// lbnSearch 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.LinkButton lbnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// txtCerca 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 txtCerca;
|
||||
|
||||
/// <summary>
|
||||
/// lnkReset 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.LinkButton lnkReset;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_righePag.ascx.cs" Inherits="mod_righePag" %>
|
||||
|
||||
<div style="float: right;">
|
||||
<asp:Label runat="server" ID="lblNumRighe" CssClass="didascalia"><%: traduci("righePerPag") %></asp:Label>
|
||||
<asp:TextBox ID="txtNumRighe" runat="server" AutoPostBack="True" OnTextChanged="txtNumRighe_TextChanged" Width="2em" />
|
||||
</div>
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
public partial class mod_righePag : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// indicato (nuovo) numero righe x pagina
|
||||
/// </summary>
|
||||
public event EventHandler eh_newNum;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
numRowReq = numRowPag;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno controllo paginazione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtNumRighe_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo num righe...
|
||||
numRowPag = numRowReq;
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_newNum != null)
|
||||
{
|
||||
eh_newNum(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// numero righe per pagina (in sessione)
|
||||
/// </summary>
|
||||
public int numRowPag
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 10;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("numRowPag");
|
||||
}
|
||||
catch
|
||||
{
|
||||
answ = 10;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("numRowPag", value);
|
||||
numRowReq = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// numero righe gridview da mostrare legato a controllo textbox
|
||||
/// </summary>
|
||||
protected int numRowReq
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = numRowPag;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToInt32(txtNumRighe.Text.Trim());
|
||||
if (answ == 0)
|
||||
{
|
||||
answ = numRowPag;
|
||||
txtNumRighe.Text = answ.ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNumRighe.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_righePag {
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRighe 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 lblNumRighe;
|
||||
|
||||
/// <summary>
|
||||
/// txtNumRighe 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 txtNumRighe;
|
||||
}
|
||||
@@ -1,100 +1,102 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="C2P.WebUserControls.mod_vocabolario" CodeBehind="mod_vocabolario.ascx.cs" %>
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="mod_vocabolario" CodeBehind="mod_vocabolario.ascx.cs" %>
|
||||
|
||||
<table class="txtMini">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowEditing="grView_RowEditing">
|
||||
<FooterStyle CssClass="ctrFooter"></FooterStyle>
|
||||
<RowStyle CssClass="ctrRowStyle"></RowStyle>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<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"
|
||||
ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lingua" SortExpression="Lingua">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox0" runat="server" Text='<%# Eval("Lingua") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Lingua") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lemma" SortExpression="Lemma">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox2" runat="server" Text='<%# Eval("Lemma") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Lemma") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Traduzione" SortExpression="Traduzione">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Traduzione") %>' Width="500px"
|
||||
TextMode="MultiLine" Height="8em"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Traduzione") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
|
||||
ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
|
||||
<%--<asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
|
||||
TargetControlID="imgDelete">
|
||||
</asp:ConfirmButtonExtender>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<PagerStyle HorizontalAlign="Center" CssClass="ctrHeaderPager" ForeColor="White"></PagerStyle>
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle"></SelectedRowStyle>
|
||||
<HeaderStyle CssClass="ctrHeaderPager" Font-Bold="True" ForeColor="White"></HeaderStyle>
|
||||
<EditRowStyle CssClass="ctrEditRowStyle"></EditRowStyle>
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle"></AlternatingRowStyle>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="C2P_data.selDataVoc"
|
||||
UpdateMethod="updateLemmaVoc" DeleteMethod="deleteLemmaVoc" OldValuesParameterFormatString="Original_{0}"
|
||||
FilterExpression="Traduzione LIKE '%{0}%' OR Lemma LIKE '%{0}%' "
|
||||
OnUpdated="ods_Updated">
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="Traduzione" Type="String" />
|
||||
<asp:Parameter Name="Original_Lingua" Type="String" />
|
||||
<asp:Parameter Name="Original_Lemma" Type="String" />
|
||||
</UpdateParameters>
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_Lingua" Type="String" />
|
||||
<asp:Parameter Name="Original_Lemma" Type="String" />
|
||||
</DeleteParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Button ID="btnNewLemma" runat="server" OnClick="btnNewLemma_Click" />
|
||||
<asp:TextBox ID="txtNewLemma" runat="server" />
|
||||
<%--<asp:TextBoxWatermarkExtender ID="TBW_newLemma" runat="server" TargetControlID="txtNewLemma" WatermarkCssClass="watermark">
|
||||
</asp:TextBoxWatermarkExtender>--%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:Button ID="btnNewLemma" runat="server" OnClick="btnNewLemma_Click" CssClass="btn btn-success btn-xs" />
|
||||
<asp:TextBox ID="txtNewLemma" runat="server" placeholder="inserire lemma" />
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
DataKeyNames="Lingua,Lemma" DataSourceID="ods" OnDataBound="grView_DataBound"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowEditing="grView_RowEditing">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LinkButton1" class="btn btn-success" Width="100%" CausesValidation="true" CommandName="Update"><i class="fa fa-check"></i></asp:LinkButton>
|
||||
<%--<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) %>' />--%>
|
||||
<asp:LinkButton runat="server" ID="LinkButton2" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-xs" Visible="true"><i class="glyphicon glyphicon-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LinkButton2" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Select"><i class="fa fa-search"></i></asp:LinkButton>
|
||||
<%--<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"
|
||||
ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />--%>
|
||||
<asp:LinkButton runat="server" ID="LinkButton3" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Edit"><i class="fa fa-edit"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lingua" SortExpression="Lingua">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox0" runat="server" Text='<%# Eval("Lingua") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Lingua") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lemma" SortExpression="Lemma">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox2" runat="server" Text='<%# Eval("Lemma") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Lemma") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Traduzione" SortExpression="Traduzione">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Traduzione") %>' Width="500px"
|
||||
TextMode="MultiLine" Height="8em"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Traduzione") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<EditItemTemplate>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
|
||||
ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' />--%>
|
||||
<asp:LinkButton runat="server" ID="LinkButton3" class="btn btn-danger" Width="100%" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash-o"></i></asp:LinkButton>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="SteamWare.selDataVoc"
|
||||
UpdateMethod="updateLemmaVoc" DeleteMethod="deleteLemmaVoc" OldValuesParameterFormatString="Original_{0}"
|
||||
FilterExpression="Traduzione LIKE '%{0}%' OR Lemma LIKE '%{0}%' "
|
||||
OnUpdated="ods_Updated">
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="Traduzione" Type="String" />
|
||||
<asp:Parameter Name="Original_Lingua" Type="String" />
|
||||
<asp:Parameter Name="Original_Lemma" Type="String" />
|
||||
</UpdateParameters>
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_Lingua" Type="String" />
|
||||
<asp:Parameter Name="Original_Lemma" Type="String" />
|
||||
</DeleteParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,162 +9,148 @@ using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using SteamWare;
|
||||
using C2P_Data;
|
||||
|
||||
|
||||
namespace C2P.WebUserControls
|
||||
public partial class mod_vocabolario : SteamWare.UserControl
|
||||
{
|
||||
public partial class mod_vocabolario : System.Web.UI.UserControl
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selezioneValore;
|
||||
public event EventHandler eh_resetSelezione;
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
protected void Page_Load()
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selezioneValore;
|
||||
public event EventHandler eh_resetSelezione;
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
traduciObj();
|
||||
}
|
||||
aggiornaControlliDataGL();
|
||||
}
|
||||
|
||||
protected void traduciObj()
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
btnNewLemma.Text = user_std.UtSn.Traduci("btnNewLemma");
|
||||
txtNewLemma.Text = "";
|
||||
//TBW_newLemma.WatermarkText = user_std.UtSn.Traduci("insertNewLemma");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// inserisco nel db il nuovo lemma...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNewLemma_Click(object sender, EventArgs e)
|
||||
{
|
||||
creaNuovoLemma();
|
||||
}
|
||||
/// <summary>
|
||||
/// creazione nuovo lemma
|
||||
/// </summary>
|
||||
private void creaNuovoLemma()
|
||||
{
|
||||
if (txtNewLemma.Text != "")
|
||||
{
|
||||
// inserisco
|
||||
DataWrap.DW.creaNuovoLemmaVoc(txtNewLemma.Text.Trim());
|
||||
// metto in campo ricerca...
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewLemma.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtNewLemma.Text = "";
|
||||
// aggiorno il vocabolario in memoria...
|
||||
DataWrap.DW.resetVocabolario();
|
||||
// riparto...
|
||||
Response.Redirect("Vocabolario");
|
||||
}
|
||||
}
|
||||
|
||||
protected void aggiornaControlliDataGL()
|
||||
{
|
||||
//base.aggiornaControlliDataGL();
|
||||
//grView.PageSize = _righeDataGridAnagr;
|
||||
ods.DataBind();
|
||||
}
|
||||
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
private void selezionatoValore()
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("lemma_sel", grView.SelectedDataKey.Values[1]);
|
||||
if (eh_selezioneValore != null)
|
||||
{
|
||||
eh_selezioneValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("lemma_sel");
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// inserisco nel db il nuovo lemma...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNewLemma_Click(object sender, EventArgs e)
|
||||
{
|
||||
creaNuovoLemma();
|
||||
}
|
||||
/// <summary>
|
||||
/// creazione nuovo lemma
|
||||
/// </summary>
|
||||
private void creaNuovoLemma()
|
||||
{
|
||||
if (txtNewLemma.Text != "")
|
||||
{
|
||||
// inserisco
|
||||
DataWrap.DW.creaNuovoLemmaVoc(txtNewLemma.Text.Trim());
|
||||
// metto in campo ricerca...
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewLemma.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtNewLemma.Text = "";
|
||||
// aggiorno il vocabolario in memoria...
|
||||
DataWrap.DW.resetVocabolario();
|
||||
// riparto...
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// dimensione pagina grid view
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return grView.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
private void selezionatoValore()
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("lemma_sel", grView.SelectedDataKey.Values[1]);
|
||||
if (eh_selezioneValore != null)
|
||||
{
|
||||
eh_selezioneValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("lemma_sel");
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
+46
-48
@@ -7,54 +7,52 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace C2P.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_vocabolario {
|
||||
|
||||
/// <summary>
|
||||
/// btnNewLemma 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 btnNewLemma;
|
||||
|
||||
public partial class mod_vocabolario {
|
||||
|
||||
/// <summary>
|
||||
/// grView 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 grView;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec 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;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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 ods;
|
||||
|
||||
/// <summary>
|
||||
/// btnNewLemma 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 btnNewLemma;
|
||||
|
||||
/// <summary>
|
||||
/// txtNewLemma 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 txtNewLemma;
|
||||
}
|
||||
/// <summary>
|
||||
/// txtNewLemma 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 txtNewLemma;
|
||||
|
||||
/// <summary>
|
||||
/// grView 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 grView;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumRec 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;
|
||||
|
||||
/// <summary>
|
||||
/// ods 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 ods;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3031,6 +3031,43 @@
|
||||
testo associato al controllo
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:SteamWare.selDataVoc">
|
||||
<summary>
|
||||
Classe gestione metodi di accesso ai dati embeddati
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:SteamWare.selDataVoc.#ctor">
|
||||
<summary>
|
||||
classe accesso tabelle selettori
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:SteamWare.selDataVoc.getVocabolario">
|
||||
<summary>
|
||||
tabella vocabolario
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:SteamWare.selDataVoc.getLingue">
|
||||
<summary>
|
||||
tabella lingue
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:SteamWare.selDataVoc.updateLemmaVoc(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
faccio update del lemma indicato...
|
||||
</summary>
|
||||
<param name="Traduzione"></param>
|
||||
<param name="Original_Lingua"></param>
|
||||
<param name="Original_Lemma"></param>
|
||||
</member>
|
||||
<member name="M:SteamWare.selDataVoc.deleteLemmaVoc(System.String,System.String)">
|
||||
<summary>
|
||||
cancella il lemma indicato
|
||||
</summary>
|
||||
<param name="Original_Lingua"></param>
|
||||
<param name="Original_Lemma"></param>
|
||||
</member>
|
||||
<member name="T:SteamWare.selettori">
|
||||
<summary>
|
||||
Summary description for selettori
|
||||
|
||||
Reference in New Issue
Block a user