refresh controlli x versione "base"
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="AnagFamMacchine.aspx.cs" Inherits="CMS_SC.AnagFamMacchine" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Featured" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="AnagFasi.aspx.cs" Inherits="CMS_SC.AnagFasi" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Featured" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="AnagMatricole.aspx.cs" Inherits="CMS_SC.AnagMatricole" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Featured" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="AnagMisure.aspx.cs" Inherits="CMS_SC.AnagMisure" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Featured" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="AnagSchedeColl.aspx.cs" Inherits="CMS_SC.AnagSchedeColl" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Featured" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
</asp:Content>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -23,7 +23,7 @@
|
||||
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
|
||||
<asp:ContentPlaceHolder ID="Head" runat="server">
|
||||
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</head>
|
||||
<body>
|
||||
@@ -57,13 +57,13 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="uppFeatured" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:ContentPlaceHolder runat="server" ID="Featured">
|
||||
<asp:ContentPlaceHolder runat="server" ID="FeaturedContent">
|
||||
</asp:ContentPlaceHolder>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="uppContainer" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:ContentPlaceHolder ID="Main" runat="server">
|
||||
<asp:ContentPlaceHolder ID="MainContent" runat="server">
|
||||
<div class="container" role="main">
|
||||
<h1>hello world!</h1>
|
||||
Area main content da customizzare
|
||||
|
||||
Generated
+6
-6
@@ -40,13 +40,13 @@ namespace CMS_SC {
|
||||
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
|
||||
|
||||
/// <summary>
|
||||
/// Head control.
|
||||
/// HeadContent 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.ContentPlaceHolder Head;
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
@@ -94,13 +94,13 @@ namespace CMS_SC {
|
||||
protected global::System.Web.UI.UpdatePanel uppFeatured;
|
||||
|
||||
/// <summary>
|
||||
/// Featured control.
|
||||
/// FeaturedContent 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.ContentPlaceHolder Featured;
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder FeaturedContent;
|
||||
|
||||
/// <summary>
|
||||
/// uppContainer control.
|
||||
@@ -112,13 +112,13 @@ namespace CMS_SC {
|
||||
protected global::System.Web.UI.UpdatePanel uppContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Main control.
|
||||
/// MainContent 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.ContentPlaceHolder Main;
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
|
||||
|
||||
/// <summary>
|
||||
/// uppFooter control.
|
||||
|
||||
@@ -260,6 +260,17 @@
|
||||
</Content>
|
||||
<Content Include="Bootstrap.Master" />
|
||||
<Content Include="Test.aspx" />
|
||||
<Content Include="UpdateVoc.aspx" />
|
||||
<Content Include="UserAdmin.aspx" />
|
||||
<Content Include="Vocabolario.aspx" />
|
||||
<Content Include="WebUserControls\mod_elencoRichResetUtenti.ascx" />
|
||||
<Content Include="WebUserControls\mod_enrollByAuthKey.ascx" />
|
||||
<Content Include="WebUserControls\mod_enrollByEmail.ascx" />
|
||||
<Content Include="WebUserControls\mod_enrollByJumperAuthKey.ascx" />
|
||||
<Content Include="WebUserControls\mod_fileUploader.ascx" />
|
||||
<Content Include="WebUserControls\mod_lemmiVocab.ascx" />
|
||||
<Content Include="WebUserControls\mod_ricercaGenerica.ascx" />
|
||||
<Content Include="WebUserControls\mod_righePag.ascx" />
|
||||
<Content Include="WebUserControls\mod_testata.ascx" />
|
||||
<Content Include="Content\font.less" />
|
||||
<Content Include="Content\Style.less" />
|
||||
@@ -267,8 +278,10 @@
|
||||
<Content Include="fonts\OpenSans_600.woff" />
|
||||
<Content Include="fonts\OpenSans_italic_400.woff" />
|
||||
<Content Include="fonts\OpenSans_italic_600.woff" />
|
||||
<Content Include="WebUserControls\mod_vocabolario.ascx" />
|
||||
<None Include="fonts\Raleway_400.woff" />
|
||||
<None Include="fonts\Raleway_700.woff" />
|
||||
<Content Include="logs\PlaceHolder.file" />
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
@@ -446,6 +459,83 @@
|
||||
<Compile Include="Test.aspx.designer.cs">
|
||||
<DependentUpon>Test.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UpdateVoc.aspx.cs">
|
||||
<DependentUpon>UpdateVoc.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UpdateVoc.aspx.designer.cs">
|
||||
<DependentUpon>UpdateVoc.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserAdmin.aspx.cs">
|
||||
<DependentUpon>UserAdmin.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserAdmin.aspx.designer.cs">
|
||||
<DependentUpon>UserAdmin.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Vocabolario.aspx.cs">
|
||||
<DependentUpon>Vocabolario.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Vocabolario.aspx.designer.cs">
|
||||
<DependentUpon>Vocabolario.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_elencoRichResetUtenti.ascx.cs">
|
||||
<DependentUpon>mod_elencoRichResetUtenti.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_elencoRichResetUtenti.ascx.designer.cs">
|
||||
<DependentUpon>mod_elencoRichResetUtenti.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByAuthKey.ascx.cs">
|
||||
<DependentUpon>mod_enrollByAuthKey.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByAuthKey.ascx.designer.cs">
|
||||
<DependentUpon>mod_enrollByAuthKey.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByEmail.ascx.cs">
|
||||
<DependentUpon>mod_enrollByEmail.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByEmail.ascx.designer.cs">
|
||||
<DependentUpon>mod_enrollByEmail.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByJumperAuthKey.ascx.cs">
|
||||
<DependentUpon>mod_enrollByJumperAuthKey.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_enrollByJumperAuthKey.ascx.designer.cs">
|
||||
<DependentUpon>mod_enrollByJumperAuthKey.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_fileUploader.ascx.cs">
|
||||
<DependentUpon>mod_fileUploader.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_fileUploader.ascx.designer.cs">
|
||||
<DependentUpon>mod_fileUploader.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_lemmiVocab.ascx.cs">
|
||||
<DependentUpon>mod_lemmiVocab.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_lemmiVocab.ascx.designer.cs">
|
||||
<DependentUpon>mod_lemmiVocab.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_testata.ascx.cs">
|
||||
<DependentUpon>mod_testata.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -453,6 +543,13 @@
|
||||
<Compile Include="WebUserControls\mod_testata.ascx.designer.cs">
|
||||
<DependentUpon>mod_testata.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_vocabolario.ascx.cs">
|
||||
<DependentUpon>mod_vocabolario.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_vocabolario.ascx.designer.cs">
|
||||
<DependentUpon>mod_vocabolario.ascx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
body {
|
||||
font: 12px/1.5em 'Open Sans';
|
||||
color: #333333;
|
||||
background: #e9e9e9 url(../images/tiny_grid.png) repeat 0 0;
|
||||
background-color: #ffffff;
|
||||
background-color: #FAFAFA;
|
||||
/*background: #e9e9e9 url(../images/tiny_grid.png) repeat 0 0;*/
|
||||
}
|
||||
a {
|
||||
color: #ff9900;
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
body {
|
||||
font: 12px/1.5em 'Open Sans';
|
||||
color: #333333;
|
||||
background: #e9e9e9 url(../images/tiny_grid.png) repeat 0 0;
|
||||
background-color: #ffffff;
|
||||
background-color: #FAFAFA;
|
||||
/*background: #e9e9e9 url(../images/tiny_grid.png) repeat 0 0;*/
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
@@ -1,9 +1,9 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="CMS_SC.Test" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Featured" runat="server">
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
area featured
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
area main
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.master" AutoEventWireup="true" CodeBehind="Vocabolario.aspx.cs" Inherits="CMS_SC.Vocabolario" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Bootstrap.master" AutoEventWireup="true" CodeBehind="Vocabolario.aspx.cs" Inherits="CMS_SC.Vocabolario" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/mod_lemmiVocab.ascx" TagPrefix="uc2" TagName="mod_lemmiVocab" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_vocabolario.ascx" TagName="mod_vocabolario" TagPrefix="uc1" %>
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoRichResetUtenti.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_elencoRichResetUtenti" %>
|
||||
<script>
|
||||
function confermaDel() {
|
||||
<%=SteamWare.jsUtils.getCBE("confermaDel") %>
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="row" runat="server" id="divDetail" style="margin-top: 2px;">
|
||||
<div class="col-sm-3">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><%: traduci("UserData") %></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<asp:FormView runat="server" ID="frmDetail" DataKeyNames="USER_NAME" DataSourceID="odsUserDet">
|
||||
<EditItemTemplate>
|
||||
cognome:
|
||||
<asp:TextBox ID="cognomeTextBox" runat="server" Text='<%# Bind("cognome") %>' />
|
||||
<br />
|
||||
nome:
|
||||
<asp:TextBox ID="nomeTextBox" runat="server" Text='<%# Bind("nome") %>' />
|
||||
<br />
|
||||
email:
|
||||
<asp:TextBox ID="emailTextBox" runat="server" Text='<%# Bind("email") %>' />
|
||||
<br />
|
||||
CodGruppo:
|
||||
<asp:TextBox ID="CodGruppoTextBox" runat="server" Text='<%# Bind("CodGruppo") %>' />
|
||||
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
|
||||
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
cognome:
|
||||
<asp:Label ID="cognomeLabel" runat="server" Text='<%# Eval("cognome") %>' />
|
||||
<br />
|
||||
nome:
|
||||
<asp:Label ID="nomeLabel" runat="server" Text='<%# Eval("nome") %>' />
|
||||
<br />
|
||||
email:
|
||||
<asp:Label ID="emailLabel" runat="server" Text='<%# Eval("email") %>' />
|
||||
<br />
|
||||
CodGruppo:
|
||||
<asp:Label ID="CodGruppoLabel" runat="server" Text='<%# Eval("CodGruppo") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
<asp:ObjectDataSource runat="server" ID="odsUserDet" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByEmail" TypeName="SteamWare.DS_AuthTableAdapters.UtentiTableAdapter" UpdateMethod="UpdateQuery" OnUpdated="odsUserDet_Updated">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="grView" DefaultValue="@" Name="email" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="email" Type="String" />
|
||||
<asp:Parameter Name="cognome" Type="String" />
|
||||
<asp:Parameter Name="nome" Type="String" />
|
||||
<asp:Parameter Name="authKey" Type="String" DefaultValue="@@@" />
|
||||
<asp:Parameter Name="numAuth" Type="Int32" DefaultValue="-1"/>
|
||||
<asp:Parameter Name="CodGruppo" Type="String" />
|
||||
<asp:Parameter Name="Original_USER_NAME" Type="String" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><%: traduci("UserRights") %></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<asp:GridView ID="grViewDiritti" runat="server" DataSourceID="odsDiritti" AutoGenerateColumns="False" DataKeyNames="USER_NAME,COD_CDC,COD_MODULO,COD_FUNZIONE">
|
||||
<Columns>
|
||||
<%--<asp:BoundField DataField="USER_NAME" HeaderText="USER_NAME" ReadOnly="True" SortExpression="USER_NAME" />--%>
|
||||
<asp:BoundField DataField="COD_FUNZIONE" HeaderText="COD_FUNZIONE" ReadOnly="True" SortExpression="COD_FUNZIONE" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="lnbAddNew" CssClass="fa fa-plus fa-2x" runat="server" CausesValidation="False" CommandArgument="Add" CommandName="Add" ToolTip="Add" OnClick="lnbAddNew_Click" Visible='<%# canAddDiritti %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnbDelete" CssClass="fa fa-trash fa-2x" runat="server" CausesValidation="False" CommandArgument="Delete" CommandName="Delete" ToolTip="Delete" OnClientClick="if (!confermaDel()) return false;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<EmptyDataTemplate>
|
||||
<asp:LinkButton ID="lnbAddNew" CssClass="fa fa-plus fa-2x" runat="server" CausesValidation="False" CommandArgument="Add" CommandName="Add" ToolTip="Add" OnClick="lnbAddNew_Click" Visible='<%# canAddDiritti %>' />
|
||||
</EmptyDataTemplate>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsDiritti" runat="server" DeleteMethod="DeleteQuery" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByUserModulo" TypeName="SteamWare.DS_AuthTableAdapters.DIRITTITableAdapter">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_USER_NAME" Type="String" />
|
||||
<asp:Parameter Name="Original_COD_CDC" Type="String" />
|
||||
<asp:Parameter Name="Original_COD_MODULO" Type="String" />
|
||||
<asp:Parameter Name="Original_COD_FUNZIONE" Type="String" />
|
||||
</DeleteParameters>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="USER_NAME" Type="String" />
|
||||
<asp:Parameter Name="COD_CDC" Type="String" />
|
||||
<asp:Parameter Name="COD_MODULO" Type="String" />
|
||||
<asp:Parameter Name="COD_FUNZIONE" Type="String" />
|
||||
<asp:Parameter Name="VALUE" Type="String" />
|
||||
</InsertParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="grView" DefaultValue="@" Name="USER_NAME" PropertyName="SelectedValue" Type="String" />
|
||||
<asp:Parameter DefaultValue="CMS_SC" Name="COD_MODULO" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><%: traduci("DevicesList") %></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<asp:GridView ID="grViewDevices" runat="server" DataSourceID="odsDevices" AutoGenerateColumns="False" DataKeyNames="IdxDevice" Font-Size="0.75em">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="IdxDevice" HeaderText="IdxDevice" InsertVisible="False" ReadOnly="True" SortExpression="IdxDevice" />
|
||||
<asp:BoundField DataField="DeviceName" HeaderText="DeviceName" SortExpression="DeviceName" />
|
||||
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
|
||||
<asp:BoundField DataField="dataOraEnabled" HeaderText="dataOraEnabled" SortExpression="dataOraEnabled" />
|
||||
<%--<asp:BoundField DataField="dataOraLastSeen" HeaderText="dataOraLastSeen" SortExpression="dataOraLastSeen" />--%>
|
||||
<asp:BoundField DataField="lastIPv4" HeaderText="lastIPv4" SortExpression="lastIPv4" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsDevices" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByUser" TypeName="SteamWare.DS_AuthTableAdapters.AnagDevicesTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="grView" DefaultValue="@" Name="email" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="USER_NAME" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowCommand="grView_RowCommand">
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<SortedAscendingCellStyle BackColor="#F5F7FB" />
|
||||
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
|
||||
<SortedDescendingCellStyle BackColor="#E9EBEF" />
|
||||
<SortedDescendingHeaderStyle BackColor="#4870BE" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 1em;">
|
||||
<%--<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-user ui-btn-icon-notext ui-btn-inline" ID="LinkButton1" data-icon="star" runat="server" CausesValidation="False" CommandArgument="select" CommandName="Select" Text="Sel" />--%>
|
||||
<asp:LinkButton ID="LinkButton2" CssClass="fa fa-user fa-2x" runat="server" CausesValidation="False" CommandArgument="Edit" CommandName="Select" ToolTip="Edit" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<div style="white-space: nowrap; text-align: center; margin: auto;">
|
||||
<asp:LinkButton ID="lnkReset" CssClass="fa fa-refresh fa-2x" runat="server" CausesValidation="False" ToolTip="Reset" OnClick="lnkReset_Click" />
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<%--<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>--%>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="nome" SortExpression="email">
|
||||
<ItemTemplate>
|
||||
<b>
|
||||
<asp:Label ID="lblCognome" Font-Size="1em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("cognome") %>' /></b>
|
||||
<asp:Label ID="lblNome" Font-Size="1em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("nome") %>' />
|
||||
<br />
|
||||
<asp:Label ID="lblEmail" Font-Size="0.75em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("email") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Attivo" SortExpression="attivo">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 1em">
|
||||
<asp:LinkButton CssClass="fa fa-toggle-on fa-2x" ID="lbDisattiva" data-icon="star" runat="server" CausesValidation="False" CommandArgument="Disattiva" CommandName="Select" ToolTip="Disattiva utente e rimuove devices" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
<asp:LinkButton ID="lbAttiva" CssClass="fa fa-toggle-off fa-2x" runat="server" CausesValidation="False" CommandArgument="Attiva" CommandName="Select" ToolTip="Attiva utente con nuova AuthKey" Visible='<%# !toBool(Eval("attivo")) %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="# Auth" SortExpression="numAuth">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 1em;">
|
||||
<asp:LinkButton ID="lbRem" CssClass="fa fa-minus fa-2x" runat="server" CausesValidation="False" CommandArgument="-1" CommandName="Select" ToolTip="-1 device" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
|
||||
<asp:Label ID="lblNumAuth" runat="server" Text='<%# Bind("numAuth") %>' />
|
||||
|
||||
<asp:LinkButton CssClass="fa fa-plus fa-2x" ID="lbAdd" data-icon="star" runat="server" CausesValidation="False" CommandArgument="+1" CommandName="Select" ToolTip="+1 device" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Grp" SortExpression="CodGruppo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblCodGruppo" Font-Size="1em" Font-Strikeout='<%# !toBool(Eval("attivo")) %>' runat="server" Text='<%# Eval("CodGruppo") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Reset">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap; font-size: 1em">
|
||||
<asp:LinkButton CssClass="fa fa-refresh fa-2x" ID="lbResetAuth" data-icon="star" runat="server" CausesValidation="False" CommandArgument="ResetKeyAndDevices" CommandName="Select" Visible='<%# toBool(Eval("resetAuthKeyReq")) %>' ToolTip="Reset AuthKey & Disabilita Dispositivi" />
|
||||
|
||||
<asp:LinkButton ID="lbSendMail" CssClass="fa fa-envelope-o fa-2x" runat="server" CausesValidation="False" CommandArgument="SendMail" CommandName="Select" ToolTip="Invia Email di autorizzazione" Visible='<%# toBool(Eval("attivo")) %>' />
|
||||
|
||||
<asp:LinkButton ID="lbCancelResetAuth" CssClass="fa fa-remove fa-2x" runat="server" CausesValidation="False" CommandArgument="NoReset" CommandName="Select" Visible='<%# toBool(Eval("resetAuthKeyReq")) %>' ToolTip="Rifiuta reset" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
<div style="white-space: nowrap; text-align: center; margin: auto;">
|
||||
<asp:LinkButton ID="lnbAddNewUser" CssClass="fa fa-plus fa-2x" runat="server" CausesValidation="False" CommandArgument="Add" CommandName="Add" ToolTip="Add" OnClick="lnbAddNewUser_Click" />
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnbDeleteUser" CssClass="fa fa-trash fa-2x" runat="server" CausesValidation="False" CommandArgument="Delete" CommandName="Delete" ToolTip="Delete" OnClientClick="if (!confermaDel()) return false;" Visible='<%# canBeDeleted(Eval("USER_NAME")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="SteamWare.DS_AuthTableAdapters.UtentiTableAdapter" OldValuesParameterFormatString="original_{0}" DeleteMethod="DeleteQuery" UpdateMethod="Update">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_USER_NAME" Type="String" />
|
||||
</DeleteParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="cognome" Type="String" />
|
||||
<asp:Parameter Name="nome" Type="String" />
|
||||
<asp:Parameter Name="email" Type="String" />
|
||||
<asp:Parameter Name="authKey" Type="String" />
|
||||
<asp:Parameter Name="numAuth" Type="Int32" />
|
||||
<asp:Parameter Name="attivo" Type="Boolean" />
|
||||
<asp:Parameter Name="CodGruppo" Type="String" />
|
||||
<asp:Parameter Name="resetAuthKeyReq" Type="Boolean" />
|
||||
<asp:Parameter Name="Original_USER_NAME" Type="String" />
|
||||
<asp:Parameter Name="Original_cognome" Type="String" />
|
||||
<asp:Parameter Name="Original_nome" Type="String" />
|
||||
<asp:Parameter Name="Original_email" Type="String" />
|
||||
<asp:Parameter Name="Original_authKey" Type="String" />
|
||||
<asp:Parameter Name="Original_numAuth" Type="Int32" />
|
||||
<asp:Parameter Name="Original_attivo" Type="Boolean" />
|
||||
<asp:Parameter Name="Original_CodGruppo" Type="String" />
|
||||
<asp:Parameter Name="Original_resetAuthKeyReq" Type="Boolean" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<br />
|
||||
<div class="col-xs-12" style="color: #696969;">
|
||||
<h4><%: traduci("ElencoRichUtentiTitle") %></h4>
|
||||
<hr />
|
||||
<i><%: traduci("ElencoRichUtentiInstr01") %></i>
|
||||
<i><%: traduci("ElencoRichUtentiInstr02") %></i>
|
||||
<ul>
|
||||
<li><%: traduci("ElencoRichUtentiInstr03") %></li>
|
||||
<li><%: traduci("ElencoRichUtentiInstr04") %></li>
|
||||
<li><%: traduci("ElencoRichUtentiInstr05") %></li>
|
||||
<li><%: traduci("ElencoRichUtentiInstr06") %></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,240 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
public partial class mod_elencoRichResetUtenti : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
divDetail.Visible = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// ultimo comando letto da link button
|
||||
/// </summary>
|
||||
public string lastCmd { get; set; }
|
||||
/// <summary>
|
||||
/// gestione evento novo record
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
#if false
|
||||
// richiamo pagina di edit senza parametri x metodo NEW
|
||||
Response.Redirect("AccettazioneEdit");
|
||||
#endif
|
||||
}
|
||||
public bool toBool(object value)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToBoolean(value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// evento selezione paziente...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// recupero dati utente...
|
||||
string USER_NAME = "";
|
||||
try
|
||||
{
|
||||
USER_NAME = grView.SelectedDataKey["USER_NAME"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (USER_NAME != "")
|
||||
{
|
||||
switch (lastCmd)
|
||||
{
|
||||
case "+1":
|
||||
devicesAuthProxy.stObj.taUtenti.UpdateNumAuth(1, USER_NAME);
|
||||
break;
|
||||
case "-1":
|
||||
devicesAuthProxy.stObj.taUtenti.UpdateNumAuth(-1, USER_NAME);
|
||||
break;
|
||||
case "Disattiva":
|
||||
case "Attiva":
|
||||
devicesAuthProxy.stObj.taUtenti.ToggleAttivo(SteamwareStrings.pseudoRandomString(20), USER_NAME);
|
||||
break;
|
||||
case "NoReset":
|
||||
devicesAuthProxy.stObj.taUtenti.rejectResetAK(USER_NAME);
|
||||
break;
|
||||
case "ResetKeyAndDevices":
|
||||
devicesAuthProxy.stObj.taUtenti.ResetKeyAndDevices(SteamwareStrings.pseudoRandomString(20), USER_NAME);
|
||||
break;
|
||||
case "SendMail":
|
||||
// cerco chiave...
|
||||
string AuthKey = "";
|
||||
try
|
||||
{
|
||||
AuthKey = devicesAuthProxy.stObj.taUtenti.getByEmail(USER_NAME)[0].authKey;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (USER_NAME != "" && AuthKey != "")
|
||||
{
|
||||
// invio email!
|
||||
devicesAuthProxy.stObj.sendEmailAuthKey(USER_NAME, AuthKey);
|
||||
}
|
||||
break;
|
||||
case "Edit":
|
||||
// mostro dettaglio..
|
||||
divDetail.Visible = true;
|
||||
frmDetail.ChangeMode(FormViewMode.Edit);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
grView.DataBind();
|
||||
#if false
|
||||
// recupero dati paziente...
|
||||
int IdxPaziente = 0;
|
||||
try
|
||||
{
|
||||
IdxPaziente = Convert.ToInt32(grView.SelectedDataKey["IdxPaziente"]);
|
||||
memLayer.ML.setSessionVal("IdxPaziente", IdxPaziente);
|
||||
DS_Applicazione.AnagPazientiRow riga = DtProxy.man.taAP.getByKey(IdxPaziente)[0];
|
||||
memLayer.ML.setSessionVal("Paziente", string.Format("{0} {1} ({2:dd/MM/yyyy})", riga.Cognome, riga.Nome, riga.DataNasc));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (lastCmd == "edit")
|
||||
{
|
||||
// richiamo pagina con edit del record richiesto
|
||||
Response.Redirect(string.Format("AccettazioneEdit?IdxPaziente={0}", grView.SelectedDataKey["IdxPaziente"]));
|
||||
}
|
||||
else if (lastCmd == "select")
|
||||
{
|
||||
// se utente abilitato ad accesso privilegiato
|
||||
if (false) // !!!FARE controllo livello accesso
|
||||
{
|
||||
Response.Redirect("Visite");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
protected void grView_RowCommand(object sender, GridViewCommandEventArgs e)
|
||||
{
|
||||
// salvo il command argument...
|
||||
lastCmd = e.CommandArgument.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
divDetail.Visible = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunge tutti i permessi mancanti
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnbAddNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// chiamo stored x creazione diritti missing
|
||||
devicesAuthProxy.stObj.taDiritti.AddMissing(grView.SelectedValue.ToString(), "X999", memLayer.ML.confReadString("CodModulo"));
|
||||
// update visualizzazione
|
||||
grViewDiritti.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunge un utente con permesso base (hard coded!!!)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnbAddNewUser_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// uso email fuffa dataora@steamware...
|
||||
string email = string.Format("{0:yyyyMMdd-HHmmss}@steamware.net", DateTime.Now);
|
||||
// chiamo stored x creazione diritti missing
|
||||
devicesAuthProxy.stObj.taUtenti.InsertQueryAndRight(email, "Cognome", "Nome", DateTime.Now.ToString("yyMMdd-HHmmss"), 1, memLayer.ML.confReadString("CodGruppo"), memLayer.ML.confReadString("CodCDC"), memLayer.ML.confReadString("CodModulo"), memLayer.ML.confReadString("CodFunzione"));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(exc.ToString(), tipoLog.EXCEPTION);
|
||||
}
|
||||
// update visualizzazione
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica se ci siano diritti da aggiungere
|
||||
/// </summary>
|
||||
public bool canAddDiritti
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
// conto se ci siano diritti missing...
|
||||
try
|
||||
{
|
||||
int assegnati = devicesAuthProxy.stObj.taDiritti.getByUserModulo(grView.SelectedValue.ToString(), memLayer.ML.confReadString("CodModulo")).Rows.Count;
|
||||
int disponibili = devicesAuthProxy.stObj.taFunzione.GetData().Rows.Count;
|
||||
if (disponibili > assegnati) answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se sia cancellabile OVVERO NON ci siano diritti
|
||||
/// </summary>
|
||||
public bool canBeDeleted(object email)
|
||||
{
|
||||
bool answ = false;
|
||||
// conto se ci siano diritti missing...
|
||||
try
|
||||
{
|
||||
int assegnati = devicesAuthProxy.stObj.taDiritti.getByUserModulo(email.ToString(), memLayer.ML.confReadString("CodModulo")).Rows.Count;
|
||||
if (assegnati == 0) answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// post aggiornamento aggiorno visualizzazioni
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsUserDet_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_elencoRichResetUtenti {
|
||||
|
||||
/// <summary>
|
||||
/// divDetail control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDetail;
|
||||
|
||||
/// <summary>
|
||||
/// frmDetail 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.FormView frmDetail;
|
||||
|
||||
/// <summary>
|
||||
/// odsUserDet 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 odsUserDet;
|
||||
|
||||
/// <summary>
|
||||
/// grViewDiritti 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 grViewDiritti;
|
||||
|
||||
/// <summary>
|
||||
/// odsDiritti 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 odsDiritti;
|
||||
|
||||
/// <summary>
|
||||
/// grViewDevices 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 grViewDevices;
|
||||
|
||||
/// <summary>
|
||||
/// odsDevices 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 odsDevices;
|
||||
|
||||
/// <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>
|
||||
/// 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,29 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByAuthKey.ascx.cs"
|
||||
Inherits="CMS_SC.WebUserControls.mod_enrollByAuthKey" %>
|
||||
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><%: traduci("AuthKeyEnrollTitle") %></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox runat="server" ID="txtEmailAK" Width="100%" placeholder="e-mail" />
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox runat="server" ID="txtAuthKey" Width="100%" placeholder="password" TextMode="Password" />
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:LinkButton runat="server" Width="100%" CssClass="btn btn-default btn-xs" ID="btnEnrollByAK" OnClick="btnEnrollByAK_Click"><%: traduci("btnEnrollByAK") %></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-12" style="padding-bottom: 40px;">
|
||||
<asp:Label runat="server" ID="lblOutRegAuthKey" Text="..." Visible="false" ForeColor="Red" />
|
||||
</div>
|
||||
<div class="col-xs-12" style="color: #696969;">
|
||||
<h4><%: traduci("AuthKeyEnrollExplTitle") %></h4>
|
||||
<hr />
|
||||
<i><%: traduci("AuthKeyEnrollExplInstr01") %></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using CMS_SC_Data;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByAuthKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// richiesta enroll device da chiave personale + email
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEnrollByAK_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo email & co...
|
||||
string email = txtEmailAK.Text.Trim();
|
||||
string authKey = txtAuthKey.Text.Trim();
|
||||
if (email != "" && email.IndexOf("@") > 0)
|
||||
{
|
||||
// ora controllo che l'email SIA nell'elenco delle email degli utenti...
|
||||
if (devicesAuthProxy.stObj.checkUserEmail(email))
|
||||
{
|
||||
// controllo se la authKey è corretta x utente...
|
||||
if (devicesAuthProxy.stObj.checkUserEmailAK(email, authKey))
|
||||
{
|
||||
// rimando al jumper...
|
||||
Response.Redirect(string.Format("jumper?UserAuthkey={0}&USER_NAME={1}", authKey, email));
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutRegAuthKey.Text = traduci("ErrorEAK01");// "Attenzione! auth key NON valida, prego contattare amministratore!";
|
||||
lblOutRegAuthKey.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutRegAuthKey.Text = traduci("ErrorEAK02");//"Attenzione! email non trovata, prego contattare amministratore!";
|
||||
lblOutRegAuthKey.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutRegAuthKey.Text = traduci("ErrorEAK03");//"Attenzione! preogo inserire email valida!";
|
||||
lblOutRegAuthKey.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_enrollByAuthKey {
|
||||
|
||||
/// <summary>
|
||||
/// txtEmailAK 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 txtEmailAK;
|
||||
|
||||
/// <summary>
|
||||
/// txtAuthKey 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 txtAuthKey;
|
||||
|
||||
/// <summary>
|
||||
/// btnEnrollByAK 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 btnEnrollByAK;
|
||||
|
||||
/// <summary>
|
||||
/// lblOutRegAuthKey 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 lblOutRegAuthKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByEmail.ascx.cs"
|
||||
Inherits="CMS_SC.WebUserControls.mod_enrollByEmail" %>
|
||||
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><%: traduci("EmailEnrollTitle") %></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox runat="server" ID="txtEmailReq" placeholder="e-mail" Width="100%" />
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-default btn-xs" ID="btnReqNewKey" OnClick="btnReqNewKey_Click" Width="100%"><%: traduci("btnReqNewKey") %></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-xs-12" style="padding-bottom: 40px;">
|
||||
<asp:Label runat="server" ID="lblOutUnauth" Text="..." Visible="false" ForeColor="Red" />
|
||||
</div>
|
||||
<div class="col-xs-12" style="color: #696969;">
|
||||
<h4><%: traduci("EmailEnrollExplTitle") %></h4>
|
||||
<hr />
|
||||
<i><%: traduci("EmailEnrollExplInstr01") %></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using CMS_SC_Data;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByEmail : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta reset dispositivi utente
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReqNewKey_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo email & co...
|
||||
string email = txtEmailReq.Text.Trim();
|
||||
if (email != "" && email.IndexOf("@") > 0)
|
||||
{
|
||||
// ora controllo che l'email SIA nell'elenco delle email degli utenti...
|
||||
if (devicesAuthProxy.stObj.checkUserEmail(email))
|
||||
{
|
||||
// registro richiesta reset ed invio email ad admin...
|
||||
devicesAuthProxy.stObj.reqResetAuthKey(email, memLayer.ML.confReadString("adminEmail"));
|
||||
lblOutUnauth.Text = traduci("ErrorEAE01");//"Richiesta inoltrata all'amministratore, attendere sua risposta alla casella email indicata.";
|
||||
lblOutUnauth.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutUnauth.Text = traduci("ErrorEAE02");//"Attenzione! email non trovata, prego contattare amministratore!";
|
||||
lblOutUnauth.Visible = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblOutUnauth.Text = traduci("ErrorEAE03");//"Attenzione! preogo inserire email valida!";
|
||||
lblOutUnauth.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_enrollByEmail {
|
||||
|
||||
/// <summary>
|
||||
/// txtEmailReq 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 txtEmailReq;
|
||||
|
||||
/// <summary>
|
||||
/// btnReqNewKey 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 btnReqNewKey;
|
||||
|
||||
/// <summary>
|
||||
/// lblOutUnauth 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 lblOutUnauth;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByJumperAuthKey.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_enrollByJumperAuthKey" %>
|
||||
<%--è una procedura automatica, niente elementi grafici!--%>
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using CMS_SC_Data;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
public partial class mod_enrollByJumperAuthKey : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// procedo alla ricerca di dati via sessione x User AuthKey
|
||||
tryAutoEnroll();
|
||||
}
|
||||
/// <summary>
|
||||
/// prova a fare auto enroll
|
||||
/// </summary>
|
||||
public void tryAutoEnroll()
|
||||
{
|
||||
// recupero dati da session
|
||||
string UserAuthKey = "";
|
||||
string email = "";
|
||||
string userAgent = "";
|
||||
bool fatto = false;
|
||||
string DeviceName = "";
|
||||
string IPv4 = "";
|
||||
try
|
||||
{
|
||||
//UserAuthKey = memLayer.ML.StringSessionObj("UserAuthkey");
|
||||
//email = memLayer.ML.StringSessionObj("email");
|
||||
UserAuthKey = Request["UserAuthkey"];
|
||||
email = Request["USER_NAME"];
|
||||
userAgent = Request.UserAgent;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// se ci sono i dati effettua tentativo di AutoEnroll del device
|
||||
if (email != "" && UserAuthKey != "")
|
||||
{
|
||||
IPv4 = Request.UserHostAddress;
|
||||
DeviceName = SteamWare.dnsUtils.ReverseLookup(IPv4);
|
||||
//DeviceName = SteamWare.dnsUtils.DetermineCompName(IPv4); // WIN2012R2SAM
|
||||
//DeviceName = Request.UserHostName; // ::1
|
||||
|
||||
// prova ad usare la chiave DECODIFICATA x autorizzare device
|
||||
fatto = devicesAuthProxy.stObj.enrollDevice(devicesAuthProxy.decodeKey(UserAuthKey), IPv4, DeviceName, userAgent, email);
|
||||
// se NON ce l'ha fatta ed è abilitata l'autenticazione "plain" cerca di eseguire anche quella...
|
||||
if (memLayer.ML.confReadBool("enablePlain") && !fatto)
|
||||
{
|
||||
fatto = devicesAuthProxy.stObj.enrollDevice(UserAuthKey, IPv4, DeviceName, userAgent, email);
|
||||
}
|
||||
if (fatto)
|
||||
{
|
||||
Response.Redirect("Default");
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect("UserAdmin");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_enrollByJumperAuthKey
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_fileUploader.ascx.cs" Inherits="CMS_SC.WebUserControls.mod_fileUploader" %>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="conditional">
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="btnUpload" />
|
||||
</Triggers>
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<asp:FileUpload ID="FileUploadControl" runat="server" />
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" CssClass="btn btn-default btn-sm" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 didascalia">
|
||||
<asp:Label runat="server" ID="StatusLabel" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -0,0 +1,88 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace CMS_SC.WebUserControls
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class mod_fileUploader : SteamWare.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// effettuato upload file!
|
||||
/// </summary>
|
||||
public event EventHandler eh_uploadDone;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Page.Form.Enctype = "multipart/form-data";
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
StatusLabel.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento file!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (FileUploadControl.HasFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (FileUploadControl.PostedFile.ContentType == contTypeFilt && contTypeFilt != "")
|
||||
{
|
||||
//if (FileUploadControl.PostedFile.ContentLength < 102400000)
|
||||
//{
|
||||
//string filename = Path.GetFileName(FileUploadControl.FileName);
|
||||
//FileUploadControl.SaveAs(Server.MapPath("~/") + filename);
|
||||
|
||||
if (fileName == "")
|
||||
{
|
||||
fileName = FileUploadControl.FileName;
|
||||
}
|
||||
string fileDest = string.Format(@"{0}\{1}", memLayer.ML.confReadString("importDataFolder"), fileName);
|
||||
FileUploadControl.SaveAs(fileDest);
|
||||
|
||||
StatusLabel.Text = string.Format("Upload status: File uploaded! - size: {0} kb", FileUploadControl.PostedFile.ContentLength / 1024);
|
||||
if (eh_uploadDone != null)
|
||||
{
|
||||
eh_uploadDone(this, new EventArgs());
|
||||
}
|
||||
//}
|
||||
//else
|
||||
// StatusLabel.Text = "Upload status: The file has to be less than 100 Mb!";
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusLabel.Text = string.Format("{0} - {1}", traduci("ERR-FU-002"), contTypeFilt);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
StatusLabel.Text = string.Format("{0} {1}", traduci("ERR-FU-001"), ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// content type permesso
|
||||
/// </summary>
|
||||
public string contTypeFilt { get; set; }
|
||||
/// <summary>
|
||||
/// nome file con cui salvare
|
||||
/// </summary>
|
||||
public string fileName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CMS_SC.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_fileUploader {
|
||||
|
||||
/// <summary>
|
||||
/// UpdatePanel1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel UpdatePanel1;
|
||||
|
||||
/// <summary>
|
||||
/// FileUploadControl 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.FileUpload FileUploadControl;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpload 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 btnUpload;
|
||||
|
||||
/// <summary>
|
||||
/// StatusLabel 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 StatusLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_lemmiVocab" CodeBehind="mod_lemmiVocab.ascx.cs" %>
|
||||
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" CssClass="table table-striped table-bordered"
|
||||
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>
|
||||
@@ -0,0 +1,51 @@
|
||||
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_lemmiVocab : SteamWare.UserControl
|
||||
{
|
||||
#region protected
|
||||
|
||||
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} ({1})", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna i dati mostrati
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
ods.DataBind();
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#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_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;
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="mod_vocabolario" CodeBehind="mod_vocabolario.ascx.cs" %>
|
||||
|
||||
<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" />
|
||||
<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" CssClass="table table-striped table-bordered"
|
||||
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" 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>
|
||||
</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="30em"
|
||||
TextMode="MultiLine" Height="4em"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Traduzione") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
</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" OnInserted="ods_Inserted">
|
||||
<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>
|
||||
@@ -0,0 +1,163 @@
|
||||
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;
|
||||
using CMS_SC_Data;
|
||||
|
||||
public partial class mod_vocabolario : SteamWare.UserControl
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selezioneValore;
|
||||
public event EventHandler eh_resetSelezione;
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
protected void Page_Load()
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
btnNewLemma.Text = user_std.UtSn.Traduci("btnNewLemma");
|
||||
txtNewLemma.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <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} ({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)
|
||||
{
|
||||
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()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("lemma_sel");
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void ods_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
DataWrap.DW.resetVocabolario();
|
||||
selezionatoValore();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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_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;
|
||||
|
||||
/// <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.
+220
-3689
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user