Inserita gestione magazzini e prime pagine con schema standard
Review grafico ed inserite immagini git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@42 365432ac-a1b5-4ffd-bb28-6d3099d32164
@@ -1,14 +1,16 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GMW._Default" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Inherits="Default" Codebehind="Default.aspx.cs" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>Untitled Page</title>
|
||||
<title>SteamWare s.r.l.</title>
|
||||
<link href="Style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<asp:ScriptManager ID="ScriptManager1" runat="server" />
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -9,13 +9,10 @@ using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace GMW
|
||||
public partial class Default : System.Web.UI.Page
|
||||
{
|
||||
public partial class _Default : System.Web.UI.Page
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
Response.Redirect("./login.aspx");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
@@ -8,27 +8,16 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW {
|
||||
|
||||
|
||||
public partial class Default {
|
||||
|
||||
|
||||
public partial class _Default {
|
||||
|
||||
/// <summary>
|
||||
/// form1 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.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.ScriptManager ScriptManager1;
|
||||
}
|
||||
/// <summary>
|
||||
/// form1 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.HtmlForm form1;
|
||||
}
|
||||
|
||||
@@ -67,18 +67,38 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="WS\bilance.asmx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<Compile Include="anagMagazzini.aspx.cs">
|
||||
<DependentUpon>anagMagazzini.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="anagMagazzini.aspx.designer.cs">
|
||||
<DependentUpon>anagMagazzini.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="login.aspx.cs">
|
||||
<DependentUpon>login.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="login.aspx.designer.cs">
|
||||
<DependentUpon>login.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="menu.aspx.cs">
|
||||
<DependentUpon>menu.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="menu.aspx.designer.cs">
|
||||
<DependentUpon>menu.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Test.aspx.cs">
|
||||
<DependentUpon>Test.aspx</DependentUpon>
|
||||
@@ -99,6 +119,13 @@
|
||||
<Compile Include="Type\StatiProdotto.cs" />
|
||||
<Compile Include="Type\TipoDichiarazione.cs" />
|
||||
<Compile Include="Type\Cartellino.cs" />
|
||||
<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="WebMasterPages\Ajax.master.cs">
|
||||
<DependentUpon>Ajax.master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -148,6 +175,41 @@
|
||||
<Compile Include="WebMasterPages\MasterAjax.master.designer.cs">
|
||||
<DependentUpon>MasterAjax.master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_anagMagazzini.ascx.cs">
|
||||
<DependentUpon>mod_anagMagazzini.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_anagMagazzini.ascx.designer.cs">
|
||||
<DependentUpon>mod_anagMagazzini.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_chLang.ascx.cs">
|
||||
<DependentUpon>mod_chLang.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_chLang.ascx.designer.cs">
|
||||
<DependentUpon>mod_chLang.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_login.ascx.cs">
|
||||
<DependentUpon>mod_login.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_login.ascx.designer.cs">
|
||||
<DependentUpon>mod_login.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_main_help.ascx.cs">
|
||||
<DependentUpon>mod_main_help.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_main_help.ascx.designer.cs">
|
||||
<DependentUpon>mod_main_help.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_menuBottom.ascx.cs">
|
||||
<DependentUpon>mod_menuBottom.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -190,6 +252,20 @@
|
||||
<Compile Include="WebUserControls\mod_ricercaGenerica.ascx.designer.cs">
|
||||
<DependentUpon>mod_ricercaGenerica.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_selettore_ajax.ascx.cs">
|
||||
<DependentUpon>mod_selettore_ajax.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_selettore_ajax.ascx.designer.cs">
|
||||
<DependentUpon>mod_selettore_ajax.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>
|
||||
<Compile Include="WS\bilance.asmx.cs">
|
||||
<DependentUpon>bilance.asmx</DependentUpon>
|
||||
<SubType>Component</SubType>
|
||||
@@ -221,8 +297,124 @@
|
||||
<EmbeddedResource Include="Reports\CartellinoCompleto.rdlc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="anagMagazzini.aspx" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="images\apply.png" />
|
||||
<Content Include="images\apply_l.png" />
|
||||
<Content Include="images\apply_m.png" />
|
||||
<Content Include="images\apply_s.gif" />
|
||||
<Content Include="images\apply_s.png" />
|
||||
<Content Include="images\barcode_orange_l.png" />
|
||||
<Content Include="images\barcode_orange_m.png" />
|
||||
<Content Include="images\barcode_orange_s.png" />
|
||||
<Content Include="images\barcode_white_l.png" />
|
||||
<Content Include="images\barcode_white_m.png" />
|
||||
<Content Include="images\barcode_white_s.png" />
|
||||
<Content Include="images\bg-menu-main.png" />
|
||||
<Content Include="images\bg_bright.jpg" />
|
||||
<Content Include="images\bg_dark.jpg" />
|
||||
<Content Include="images\bluGrad32.png" />
|
||||
<Content Include="images\cancel.png" />
|
||||
<Content Include="images\cancel_l.png" />
|
||||
<Content Include="images\cancel_m.png" />
|
||||
<Content Include="images\cancel_s.gif" />
|
||||
<Content Include="images\cancel_s.png" />
|
||||
<Content Include="images\clonaObj.png" />
|
||||
<Content Include="images\clonaObj_l.png" />
|
||||
<Content Include="images\clonaObj_m.png" />
|
||||
<Content Include="images\clonaobj_s.gif" />
|
||||
<Content Include="images\clonaObj_s.png" />
|
||||
<Content Include="images\collapse.jpg" />
|
||||
<Content Include="images\delete.gif" />
|
||||
<Content Include="images\delete.png" />
|
||||
<Content Include="images\deleteold.gif" />
|
||||
<Content Include="images\delete_disabled.gif" />
|
||||
<Content Include="images\detail.png" />
|
||||
<Content Include="images\divietoaccesso.gif" />
|
||||
<Content Include="images\downLvl.png" />
|
||||
<Content Include="images\edit.gif" />
|
||||
<Content Include="images\edit.png" />
|
||||
<Content Include="images\edit_disabled.gif" />
|
||||
<Content Include="images\edit_l.png" />
|
||||
<Content Include="images\edit_m.png" />
|
||||
<Content Include="images\edit_s.gif" />
|
||||
<Content Include="images\edit_s.png" />
|
||||
<Content Include="images\elimina.png" />
|
||||
<Content Include="images\elimina_l.png" />
|
||||
<Content Include="images\elimina_m.png" />
|
||||
<Content Include="images\elimina_s.gif" />
|
||||
<Content Include="images\elimina_s.png" />
|
||||
<Content Include="images\expand.jpg" />
|
||||
<Content Include="images\expand_blue.jpg" />
|
||||
<Content Include="images\favicon.png" />
|
||||
<Content Include="images\flag-de.png" />
|
||||
<Content Include="images\flag-en.png" />
|
||||
<Content Include="images\flag-fi.png" />
|
||||
<Content Include="images\flag-it.png" />
|
||||
<Content Include="images\flag-nl.png" />
|
||||
<Content Include="images\flag-pl.png" />
|
||||
<Content Include="images\flag-ru.png" />
|
||||
<Content Include="images\flag-xb.png" />
|
||||
<Content Include="images\header-opened.png" />
|
||||
<Content Include="images\help_16.png" />
|
||||
<Content Include="images\help_22.png" />
|
||||
<Content Include="images\help_32.png" />
|
||||
<Content Include="images\installWindows.png" />
|
||||
<Content Include="images\logo_sw.png" />
|
||||
<Content Include="images\ModLang.png" />
|
||||
<Content Include="images\ModPassw.png" />
|
||||
<Content Include="images\mtzProg.png" />
|
||||
<Content Include="images\new.gif" />
|
||||
<Content Include="images\new_disabled.gif" />
|
||||
<Content Include="images\new_l.png" />
|
||||
<Content Include="images\new_m.png" />
|
||||
<Content Include="images\new_s.png" />
|
||||
<Content Include="images\NodeResults.gif" />
|
||||
<Content Include="images\notepad_l.png" />
|
||||
<Content Include="images\notepad_m.png" />
|
||||
<Content Include="images\notepad_s.png" />
|
||||
<Content Include="images\orangeGrad32.png" />
|
||||
<Content Include="images\page_pdf.png" />
|
||||
<Content Include="images\pdfExport.png" />
|
||||
<Content Include="images\pdfExportSmall.png" />
|
||||
<Content Include="images\print_l.png" />
|
||||
<Content Include="images\print_m.png" />
|
||||
<Content Include="images\print_s.png" />
|
||||
<Content Include="images\ProgressBar.gif" />
|
||||
<Content Include="images\red32.png" />
|
||||
<Content Include="images\select.gif" />
|
||||
<Content Include="images\select.png" />
|
||||
<Content Include="images\semaGiallo_l.gif" />
|
||||
<Content Include="images\semaGiallo_m.gif" />
|
||||
<Content Include="images\semaGiallo_s.gif" />
|
||||
<Content Include="images\semaRosso_l.gif" />
|
||||
<Content Include="images\semaRosso_m.gif" />
|
||||
<Content Include="images\semaRosso_s.gif" />
|
||||
<Content Include="images\semaVerde_l.gif" />
|
||||
<Content Include="images\semaVerde_m.gif" />
|
||||
<Content Include="images\semaVerde_s.gif" />
|
||||
<Content Include="images\sfondo.png" />
|
||||
<Content Include="images\table.png" />
|
||||
<Content Include="images\unknown_l.png" />
|
||||
<Content Include="images\unknown_m.png" />
|
||||
<Content Include="images\unknown_s.png" />
|
||||
<Content Include="images\upLvl.png" />
|
||||
<Content Include="images\view.gif" />
|
||||
<Content Include="images\view.png" />
|
||||
<Content Include="images\view_disabled.gif" />
|
||||
<Content Include="images\view_l.png" />
|
||||
<Content Include="images\view_m.png" />
|
||||
<Content Include="images\view_s.gif" />
|
||||
<Content Include="images\view_s.png" />
|
||||
<Content Include="images\wizard.png" />
|
||||
<Content Include="images\wt_delete.gif" />
|
||||
<Content Include="images\wt_ko.gif" />
|
||||
<Content Include="images\wt_ok.gif" />
|
||||
<Content Include="login.aspx" />
|
||||
<Content Include="menu.aspx" />
|
||||
<Content Include="Style.css" />
|
||||
<Content Include="Test.aspx" />
|
||||
<Content Include="vocabolario.aspx" />
|
||||
<Content Include="WebMasterPages\Ajax.master" />
|
||||
<Content Include="WebMasterPages\AjaxSearch.master" />
|
||||
<Content Include="WebMasterPages\AjaxSearchEmpty.master" />
|
||||
@@ -230,12 +422,22 @@
|
||||
<Content Include="WebMasterPages\AjaxSimpleUpload.master" />
|
||||
<Content Include="WebMasterPages\AjaxTitle.master" />
|
||||
<Content Include="WebMasterPages\MasterAjax.master" />
|
||||
<Content Include="WebUserControls\mod_anagMagazzini.ascx" />
|
||||
<Content Include="WebUserControls\mod_chLang.ascx" />
|
||||
<Content Include="WebUserControls\mod_lemmiVocab.ascx" />
|
||||
<Content Include="WebUserControls\mod_login.ascx" />
|
||||
<Content Include="WebUserControls\mod_main_help.ascx" />
|
||||
<Content Include="WebUserControls\mod_menuBottom.ascx" />
|
||||
<Content Include="WebUserControls\mod_menuBottomPortable.ascx" />
|
||||
<Content Include="WebUserControls\mod_menuSx.ascx" />
|
||||
<Content Include="WebUserControls\mod_menuTop.ascx" />
|
||||
<Content Include="WebUserControls\mod_pageTitleAndSearch.ascx" />
|
||||
<Content Include="WebUserControls\mod_ricercaGenerica.ascx" />
|
||||
<Content Include="WebUserControls\mod_selettore_ajax.ascx" />
|
||||
<Content Include="WebUserControls\mod_vocabolario.ascx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="images\Thumbs.db" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="logs\" />
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
|
||||
.topTitle
|
||||
{
|
||||
color: #663300;
|
||||
color: White;
|
||||
font-family: Verdana;
|
||||
font-size: 26px;
|
||||
font-weight: bold;
|
||||
@@ -404,7 +404,7 @@
|
||||
background-repeat: repeat-x;
|
||||
background-position: 0% 0%;
|
||||
background-attachment: scroll;
|
||||
background-image: url(images/orangeGrad32.png);
|
||||
background-image: url(images/bluGrad32.png);
|
||||
}
|
||||
.ShadowText
|
||||
{
|
||||
@@ -496,7 +496,7 @@
|
||||
}
|
||||
.barraTitolo
|
||||
{
|
||||
background-color: #FF7A00; /* #4C90FF; */
|
||||
background-color: #4C90FF;
|
||||
vertical-align: middle;
|
||||
height: 20pt;
|
||||
text-align: center;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimple.master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="GMW.Test" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Ajax.master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="GMW.Test" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<asp:Label ID="Label1" runat="server" Text="Cod CS" />
|
||||
|
||||
|
||||
@@ -82,14 +82,30 @@
|
||||
</system.web.extensions>
|
||||
<appSettings>
|
||||
<!--Setup applicazione-->
|
||||
<add key="CodModulo" value="GMW" />
|
||||
<add key="_titoloPagina" value="GMW - Fonderie Mazzucconi S.p.A, portale Gestione Magazzino Web" />
|
||||
<add key="titleApp" value="GMW_titleApp" />
|
||||
<add key="welcomeApp" value="GMW_welcomeApp" />
|
||||
<add key="appName" value="GMW"/>
|
||||
<add key="mainRev" value="0.9"/>
|
||||
<add key="minRev" value="40"/>
|
||||
<add key="copyRight" value="SteamWare © 2010"/>
|
||||
<add key="_allowForceUser" value="true" />
|
||||
<add key="_safePages" value="jumper.aspx#unauthorized.aspx#allegati.aspx#forceUser.aspx#login.aspx#test.aspx#istruzioni.aspx#Test.aspx"/>
|
||||
<add key="_commonPages" value="menu.aspx#chLang.aspx" />
|
||||
<add key="defaultApp" value="GMW_Appl" />
|
||||
<add key="defaultTitle" value="GMW_ShortWelcome" />
|
||||
<add key="defaultBody" value="GMW_LongWelcome" />
|
||||
<add key="_logDir" value="~/logs/"/>
|
||||
<add key="_logLevel" value="6"/>
|
||||
<add key="_logMaxMb" value="30"/>
|
||||
<add key="intUpdatePagina_ms" value="120000" />
|
||||
<add key="_righeDataGrid" value="30" />
|
||||
<add key="_righeDataGridLong" value="40" />
|
||||
<add key="_righeDataGridMed" value="20" />
|
||||
<add key="_righeDataGridShort" value="10" />
|
||||
<add key="_fromEmail" value="GMW@steamware.net" />
|
||||
<add key="urlWebServer" value="http://localhost/GMW/" />
|
||||
|
||||
<!--Setup stampa-->
|
||||
<!--<add key="printerCartTara" value="Brother HL-4050CDN"/>-->
|
||||
@@ -107,6 +123,12 @@
|
||||
<add key="CodCS" value="MA"/>
|
||||
<add key="MinutiFinestraEditUDC" value="10"/>
|
||||
<add key="GMWConnectionString" value="Data Source=localhost\sql2008;Initial Catalog=GMW;Persist Security Info=True;User ID=sa;Password=keyhammer"/>
|
||||
<add key="_adminEmail" value="samuele@steamware.net" />
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_smtpCli" value="keyhammer.ath.cx" />
|
||||
<add key="PermessiConnectionString" value="Data Source=localhost\sql2008;Initial Catalog=GMW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=localhost\sql2005;Initial Catalog=SteamWare_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer" />
|
||||
<add key="VocabolarioConnectionString" value="Data Source=localhost\sql2005;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" />
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<add name="GMW_data.Properties.Settings.GMWConnectionString" connectionString="Data Source=localhost\sql2008;Initial Catalog=GMW;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagMagazzini.ascx.cs"
|
||||
Inherits="GMW.WebUserControls.mod_anagMagazzini" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
|
||||
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
|
||||
DataKeyNames="CodMag" DataSourceID="ods">
|
||||
<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">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
|
||||
Visible="false" />
|
||||
</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>
|
||||
<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>
|
||||
<FooterTemplate>
|
||||
<asp:ImageButton ID="imgInsert" runat="server" CausesValidation="False" CommandName="Insert"
|
||||
ToolTip='<%# traduci("Insert") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.nuovo , SteamWare.dimImg.small) %>'
|
||||
OnClick="lblIns_click" />
|
||||
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla , SteamWare.dimImg.small) %>' />
|
||||
</FooterTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="CodMag" SortExpression="CodMag">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="txtCodMag" runat="server" Text='<%# Bind("CodMag") %>' Width="10em" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblCodMag" runat="server" Text='<%# Bind("CodMag") %>' />
|
||||
</ItemTemplate>
|
||||
<FooterTemplate>
|
||||
<asp:TextBox ID="txtCodMag" runat="server" Text='<%# Bind("CodMag") %>' Width="10em" />
|
||||
</FooterTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="DescMag" SortExpression="DescMag">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="txtDescMag" runat="server" Text='<%# Bind("DescMag") %>' Width="35em" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblDescMag" runat="server" Text='<%# Bind("DescMag") %>' />
|
||||
</ItemTemplate>
|
||||
<FooterTemplate>
|
||||
<asp:TextBox ID="txtDescMag" runat="server" Text='<%# Bind("DescMag") %>' Width="35em" />
|
||||
</FooterTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<HeaderTemplate>
|
||||
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
|
||||
CommandArgument='<%# Eval("CodMag") %>' ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("CodMag")) %>'
|
||||
ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina , SteamWare.dimImg.small) %>' />
|
||||
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
|
||||
TargetControlID="imgDelete">
|
||||
</cc1:ConfirmButtonExtender>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
|
||||
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma , SteamWare.dimImg.small) %>' />
|
||||
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla , SteamWare.dimImg.small) %>' />
|
||||
</EditItemTemplate>
|
||||
<FooterTemplate>
|
||||
<asp:ImageButton ID="imgInsert2" runat="server" CausesValidation="False" CommandName="Insert"
|
||||
ToolTip='<%# traduci("Insert") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.nuovo , SteamWare.dimImg.small) %>'
|
||||
OnClick="lblIns_click" />
|
||||
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
|
||||
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla , SteamWare.dimImg.small) %>' />
|
||||
</FooterTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="getByCodCS" TypeName="GMW_data.DS_magazzinoTableAdapters.AnagMagTableAdapter"
|
||||
OnInserting="recuperaFooter" FilterExpression=" CodMag LIKE '%{0}%' OR DescMag LIKE '%{0}%' "
|
||||
OnInserted="ods_Updated" OnUpdated="ods_Updated"
|
||||
DeleteMethod="DeleteQuery" InsertMethod="Insert" UpdateMethod="UpdateQuery">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<DeleteParameters>
|
||||
<asp:SessionParameter Name="CodCS" Type="String" SessionField="CodCS" DefaultValue="MM" />
|
||||
<asp:Parameter Name="Original_CodMag" Type="String" />
|
||||
</DeleteParameters>
|
||||
<UpdateParameters>
|
||||
<asp:SessionParameter Name="CodCS" Type="String" SessionField="CodCS" DefaultValue="MM" />
|
||||
<asp:Parameter Name="CodMag" Type="String" />
|
||||
<asp:Parameter Name="DescMag" Type="String" />
|
||||
<asp:SessionParameter Name="Original_CodCS" Type="String" SessionField="CodCS" DefaultValue="MM" />
|
||||
<asp:Parameter Name="Original_CodMag" Type="String" />
|
||||
</UpdateParameters>
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="CodCS" Type="String" SessionField="CodCS" DefaultValue="MM" />
|
||||
</SelectParameters>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="CodMag" Type="String" />
|
||||
<asp:SessionParameter Name="CodCS" Type="String" SessionField="CodCS" DefaultValue="MM" />
|
||||
<asp:Parameter Name="DescMag" Type="String" />
|
||||
</InsertParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
|
||||
<asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />
|
||||
@@ -0,0 +1,382 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GMW_data;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_anagMagazzini : SteamWare.ApplicationUserControl
|
||||
{
|
||||
#region area da NON modificare
|
||||
|
||||
#region area protected
|
||||
|
||||
protected string _idxGridView;
|
||||
protected string _idxGridViewExt;
|
||||
protected string _tabCache;
|
||||
protected bool _showNewBtn = false;
|
||||
|
||||
/// <summary>
|
||||
/// imposta errore non cancellabilità per record correlati
|
||||
/// </summary>
|
||||
protected void setNoDeletableErrorMessage()
|
||||
{
|
||||
// mostro avviso di non cancellabilità...
|
||||
lblWarning.Text = traduci("notDeletable_hasChild");
|
||||
lblWarning.Visible = true;
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// esegue cancellazioen record
|
||||
/// </summary>
|
||||
protected void doDelete()
|
||||
{
|
||||
// posso cancellare...
|
||||
lblWarning.Visible = false;
|
||||
ods.Delete();
|
||||
}
|
||||
/// <summary>
|
||||
/// Valida la cancellazione per i dati mostrati dal gridView
|
||||
/// richiede sia preventivamentedichiarato _idxGridView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected virtual void validaDelete(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
int idx = Convert.ToInt32(e.InputParameters[string.Format("Original_{0}", _idxGridView)]);
|
||||
if (objIsNotRelated(idx))
|
||||
{
|
||||
// annullo cancellazione...
|
||||
e.Cancel = true;
|
||||
// seleziono record... metto in session valore idx e poi ridisegno...
|
||||
SteamWare.memLayer.ML.setSessionVal(_idxGridView, idx);
|
||||
setNoDeletableErrorMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
doDelete();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
//recupero la riga footer...
|
||||
DataColumnCollection colonne = colonneObj();
|
||||
string nomeCol;
|
||||
string tipoColonna = "";
|
||||
foreach (DataColumn colonna in colonne)
|
||||
{
|
||||
nomeCol = colonna.ColumnName;
|
||||
// cerco un textbox o quello che sia...
|
||||
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "textBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "dropDownList";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "checkBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "selAjax";
|
||||
}
|
||||
// in base al tipo salvo negli inputparameters dell'ODS
|
||||
switch (tipoColonna)
|
||||
{
|
||||
case "textBox":
|
||||
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
|
||||
break;
|
||||
case "dropDownList":
|
||||
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
|
||||
break;
|
||||
case "checkBox":
|
||||
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).Checked;
|
||||
break;
|
||||
case "selAjax":
|
||||
e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tipoColonna = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inserisce nuovo valore da footer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lblIns_click(object sender, EventArgs e)
|
||||
{
|
||||
// click su inserimento, chiamo il metodo insert dell'ObjectDataSource
|
||||
ods.Insert();
|
||||
SteamWare.memLayer.ML.emptyCacheVal(_tabCache);
|
||||
}
|
||||
/// <summary>
|
||||
/// annulla inserimento nuovo valore da footer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lblCanc_click(object sender, EventArgs e)
|
||||
{
|
||||
// annullo inserimento: nascondo footer, bind controlli...
|
||||
grView.FooterRow.Visible = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna controlli datagrid e numero righe in pagina
|
||||
/// </summary>
|
||||
protected override void aggiornaControlliDataGL()
|
||||
{
|
||||
base.aggiornaControlliDataGL();
|
||||
grView.PageSize = _righeDataGridMed;
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione evento richeista nuovo valore (mostra footer, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// reset selezione...
|
||||
resetSelezione();
|
||||
// mostro il footer oppure la riga dei dettagli x nuovo...
|
||||
if (grView.FooterRow != null)
|
||||
{
|
||||
grView.FooterRow.Visible = true;
|
||||
}
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session il valore selezionato...
|
||||
SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, true);
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_selValore != null)
|
||||
{
|
||||
eh_selValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
lblWarning.Visible = false;
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// collega i controlli
|
||||
/// </summary>
|
||||
protected override void bindControlli()
|
||||
{
|
||||
base.bindControlli();
|
||||
caricaTabelle();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_resetSelezione;
|
||||
public event EventHandler eh_nuovoValore;
|
||||
public event EventHandler eh_selValore;
|
||||
|
||||
#endregion
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// definisce visibilità btnNew
|
||||
/// </summary>
|
||||
public bool showNewBtn
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showNewBtn;
|
||||
}
|
||||
set
|
||||
{
|
||||
_showNewBtn = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua update del modulo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region area codice variabile
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// carico le tabelle
|
||||
/// </summary>
|
||||
private void caricaTabelle()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica complessiva non esistenza record child
|
||||
/// </summary>
|
||||
/// <param name="idxObj"></param>
|
||||
/// <returns></returns>
|
||||
protected bool objIsNotRelated(object idxObj)
|
||||
{
|
||||
return MagClass.magazzino.taAnagMag.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count == 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
DS_magazzino.AnagMagDataTable tabella = new DS_magazzino.AnagMagDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
#if false
|
||||
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
_idxGridView = "idxMaker";
|
||||
_tabCache = "tabMaker";
|
||||
}
|
||||
/// <summary>
|
||||
/// setta selected alla riga il cui valore key è in session
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
// se riga di dati...
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
// ottengo la riga tipizzata...
|
||||
System.Data.DataRowView _drv = (System.Data.DataRowView)e.Row.DataItem;
|
||||
GTD_data.DS_applicazione.AnagMakerRow riga = (GTD_data.DS_applicazione.AnagMakerRow)_drv.Row;
|
||||
if (SteamWare.memLayer.ML.StringSessionObj(_idxGridView) == riga.idxMaker.ToString())
|
||||
{
|
||||
grView.SelectedIndex = e.Row.RowIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// svuoto da cache post update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
//// svuoto da cache...
|
||||
//SteamWare.memLayer.ML.emptyCacheVal("_tabAnagMaker");
|
||||
//SteamWare.memLayer.ML.emptyCacheVal("_tabSelMakers");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// determina se sia eliminabile il record (=non usato)
|
||||
/// </summary>
|
||||
/// <param name="idxMaker"></param>
|
||||
/// <returns></returns>
|
||||
public bool delEnabled(object idxMaker)
|
||||
{
|
||||
bool answ = isWritable();
|
||||
// solo se ha diritti scrittura controllo
|
||||
if (answ)
|
||||
{
|
||||
// controllo se ci sono postazioni correlate...
|
||||
if (MagClass.magazzino.taAnagCelle.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxMaker.ToString()).Rows.Count > 0)
|
||||
{
|
||||
answ = false;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_anagMagazzini {
|
||||
|
||||
/// <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;
|
||||
|
||||
/// <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>
|
||||
/// lblWarning 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 lblWarning;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_chLang" Codebehind="mod_chLang.ascx.cs" %>
|
||||
<link href="Style.css" rel="stylesheet" type="text/css" />
|
||||
<table id="table1" runat="server" cellspacing="1" cellpadding="1" class="centerMenu">
|
||||
<tr class="ctrHeaderPager">
|
||||
<td>
|
||||
<asp:Label id="lblScegli" runat="server" ></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DataList id="dataListLingue" runat="server" DataKeyField="Lingua" DataSourceid="ods_lingueApp" Width="100%" OnSelectedIndexChanged="dataListLingue_SelectedIndexChanged">
|
||||
<ItemStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingItemStyle CssClass="ctrAltRowStyle" />
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton id="Linkbutton1" runat="server" name="Linkbutton1" CausesValidation="false" CommandName="Select">
|
||||
<img alt='<%# DataBinder.Eval(Container, "DataItem.Lingua") %>' src='./images/flag-<%# DataBinder.Eval(Container, "DataItem.Lingua") %>.png' />
|
||||
|
||||
<asp:Label id="LinguaLabel" runat="server" Text='<%# formattaLingua(Eval("Lingua"),Eval("DescrizioneLingua")) %>' Width="250px"/>
|
||||
<img alt='<%# DataBinder.Eval(Container, "DataItem.Lingua") %>' src='./images/flag-<%# DataBinder.Eval(Container, "DataItem.Lingua") %>.png' />
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:DataList>
|
||||
<asp:ObjectDataSource id="ods_lingueApp" runat="server" OldValuesParameterFormatString="Original_{0}"
|
||||
SelectMethod="GetLingue" TypeName="selData">
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,34 @@
|
||||
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_chLang : ApplicationUserControl
|
||||
{
|
||||
protected void dataListLingue_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// impongo ad oggetto user la lingua selezionata...
|
||||
user_std.UtSn.lingua = dataListLingue.SelectedValue.ToString();
|
||||
// salvo richiesta udpate in sessione...
|
||||
SteamWare.memLayer.ML.setSessionVal("doUpdateNow","true");
|
||||
user_std.UtSn.ricaricaMappaSito();
|
||||
Response.Redirect(_paginaCorrente);
|
||||
}
|
||||
|
||||
protected override void traduciObj()
|
||||
{
|
||||
lblScegli.Text = traduci("scegliLingua");
|
||||
}
|
||||
|
||||
public string formattaLingua(object breve, object lungo)
|
||||
{
|
||||
return string.Format("{0} - {1}", breve, lungo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_chLang {
|
||||
|
||||
/// <summary>
|
||||
/// table1 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.HtmlTable table1;
|
||||
|
||||
/// <summary>
|
||||
/// lblScegli 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 lblScegli;
|
||||
|
||||
/// <summary>
|
||||
/// dataListLingue 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.DataList dataListLingue;
|
||||
|
||||
/// <summary>
|
||||
/// ods_lingueApp 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_lingueApp;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="mod_lemmiVocab" Codebehind="mod_lemmiVocab.ascx.cs" %>
|
||||
<table class="contrDx">
|
||||
<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") %>'></asp:Label>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Lingua") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lemma" SortExpression="Lemma" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="TextBox2" runat="server" Text='<%# Eval("Lemma") %>'></asp:Label>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Lemma") %>'></asp:Label>
|
||||
</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") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" ></asp:Label>
|
||||
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getVocabolario" TypeName="selData"
|
||||
OldValuesParameterFormatString="Original_{0}" FilterExpression="Lemma LIKE '%{0}%'">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="lemma_sel" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,57 @@
|
||||
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 : ApplicationUserControl
|
||||
{
|
||||
#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)
|
||||
{
|
||||
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 = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna i dati mostrati
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
ods.DataBind();
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// 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,54 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_login" Codebehind="mod_login.ascx.cs" %>
|
||||
<asp:Panel ID="pnlForceUser" runat="server">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2" class="chPwdTitle">
|
||||
<asp:Label runat="server" ID="lblTitolo"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="smallTable">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label CssClass="chPwdTxt" runat="server" ID="lblPwd"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="authKey" TextMode="Password" Width="210px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label CssClass="chPwdTxt" runat="server" ID="lblDominio"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="dominio" Width="210px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label CssClass="chPwdTxt" runat="server" ID="lblUser"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="user" Width="210px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:Button Width="100%" runat="server" ID="btnOk" CommandName="ok" CommandArgument="ok"
|
||||
OnClick="btnOk_Click"></asp:Button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
<table class="smallTable">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:Label CssClass="chPwdTxt" ID="lblMessage" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<asp:HyperLink ID="HypLinkSSO" runat="server" NavigateUrl="~/login.aspx" Text="Single-Sign-On Login"></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,244 @@
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// classe gestione login e forzatura login
|
||||
/// </summary>
|
||||
public partial class mod_login : ApplicationUserControl
|
||||
{
|
||||
#region area protected/private
|
||||
|
||||
#region area proprietà
|
||||
|
||||
private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale;
|
||||
|
||||
#endregion
|
||||
|
||||
#region area metodi
|
||||
|
||||
/// <summary>
|
||||
/// imposta la modalità di login tra normale / forceUser
|
||||
/// </summary>
|
||||
private void setLoginMode()
|
||||
{
|
||||
if (_isForceUser == SteamWare.loginMode.forceUser)
|
||||
{
|
||||
pnlForceUser.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pnlForceUser.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void traduciObj()
|
||||
{
|
||||
lblPwd.Text = user_std.UtSn.Traduci("lblPwd");
|
||||
lblUser.Text = user_std.UtSn.Traduci("lblUser");
|
||||
lblDominio.Text = user_std.UtSn.Traduci("lblDominio");
|
||||
lblTitolo.Text = user_std.UtSn.Traduci("ForzaUtente");
|
||||
btnOk.Text = user_std.UtSn.Traduci("btnCommit");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// prova a verificare se l'utente sia ok x AD credentials
|
||||
/// </summary>
|
||||
private void AdLogin()
|
||||
{
|
||||
lblMessage.Text = "User not authenticated...";
|
||||
if (Page.User.Identity.IsAuthenticated)
|
||||
{
|
||||
//recupera user windows se c'è...
|
||||
string ad_name = Page.User.Identity.Name;
|
||||
string delimStr = "\\";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] dom_user = ad_name.Split(delimiter, 2);
|
||||
// passo al controllo di verifica ADuserOk...
|
||||
user_std _utente = new user_std();
|
||||
if (_utente.ADuserOk(dom_user[0], dom_user[1]))
|
||||
{
|
||||
bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]);
|
||||
if (fatto)
|
||||
{
|
||||
SteamWare.logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO);
|
||||
if (Login_ok != null)
|
||||
{
|
||||
Login_ok(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessage.Text = String.Format("{0}<br>There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
|
||||
SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR);
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (memLayer.ML.confReadBool("autoEnrollEnabled"))
|
||||
{
|
||||
// rimando al modulo di auto enroll...
|
||||
Response.Redirect("autoEnroll.aspx");
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessage.Text = String.Format("{0}<br>user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
|
||||
SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING);
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth");
|
||||
SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING);
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua verifiche e se concesso permette di forzare l'accesso utente
|
||||
/// </summary>
|
||||
private void ForceUserIdentity()
|
||||
{
|
||||
if (Page.User.Identity.IsAuthenticated)
|
||||
{
|
||||
bool _allowForceUser = false;
|
||||
try
|
||||
{
|
||||
_allowForceUser = SteamWare.memLayer.ML.confReadBool("_allowForceUser");
|
||||
}
|
||||
catch
|
||||
{
|
||||
_allowForceUser = false;
|
||||
}
|
||||
if (_allowForceUser)
|
||||
{
|
||||
if (authKey.Text == "forzaInter") // verifica passphrase...
|
||||
{
|
||||
user_std _utente = new user_std();
|
||||
user_std.UtSn.isForcedUser = true;
|
||||
bool fatto = _utente.startUpUtente(dominio.Text, user.Text);
|
||||
if (fatto)
|
||||
{
|
||||
string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
|
||||
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO);
|
||||
if (Login_ok != null)
|
||||
{
|
||||
Login_ok(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessage.Text = String.Format("{0}<br>key not allowed for operation!!! operation logged!!!", user_std.UtSn.Traduci("AccessFail"));
|
||||
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
|
||||
string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
|
||||
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
|
||||
string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
|
||||
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessage.Text = string.Format("{0}<br>user not authenticated!<br>", user_std.UtSn.Traduci("AccessFail"));
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text);
|
||||
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
ForceUserIdentity();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
#region eventi pubblici esposti
|
||||
|
||||
public event EventHandler Login_ok;
|
||||
public event EventHandler Login_Error;
|
||||
|
||||
#endregion
|
||||
|
||||
#region area proprietà
|
||||
|
||||
/// <summary>
|
||||
/// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser
|
||||
/// </summary>
|
||||
public SteamWare.loginMode modoLogin
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isForceUser;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isForceUser = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// avvio pagina
|
||||
/// </summary>
|
||||
protected override void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
base.Page_Load(sender, e);
|
||||
//carico da web.config i default values
|
||||
loadDefaultsWebConfig();
|
||||
// procedo...
|
||||
setLoginMode();
|
||||
Session.RemoveAll();
|
||||
// salvo la company...
|
||||
Session.Add("CodCS", memLayer.ML.confReadString("CodCS"));
|
||||
if (_isForceUser == SteamWare.loginMode.normale)
|
||||
{
|
||||
AdLogin();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_login {
|
||||
|
||||
/// <summary>
|
||||
/// pnlForceUser 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.Panel pnlForceUser;
|
||||
|
||||
/// <summary>
|
||||
/// lblTitolo 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 lblTitolo;
|
||||
|
||||
/// <summary>
|
||||
/// lblPwd 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 lblPwd;
|
||||
|
||||
/// <summary>
|
||||
/// authKey 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 authKey;
|
||||
|
||||
/// <summary>
|
||||
/// lblDominio 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 lblDominio;
|
||||
|
||||
/// <summary>
|
||||
/// dominio 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 dominio;
|
||||
|
||||
/// <summary>
|
||||
/// lblUser 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 lblUser;
|
||||
|
||||
/// <summary>
|
||||
/// user 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 user;
|
||||
|
||||
/// <summary>
|
||||
/// btnOk 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 btnOk;
|
||||
|
||||
/// <summary>
|
||||
/// lblMessage 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 lblMessage;
|
||||
|
||||
/// <summary>
|
||||
/// HypLinkSSO 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.HyperLink HypLinkSSO;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_main_help" Codebehind="mod_main_help.ascx.cs" %>
|
||||
<table id="Table7" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td class="UnauthAppTitle"><asp:Label id="lblAppl" runat="server" CssClass="ShadowText" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label id="lblTitle" CssClass="UnauthTitle" runat="server" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label id="lblMess" CssClass="UnauthMess" runat="server" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,52 @@
|
||||
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_main_help : ApplicationUserControl
|
||||
{
|
||||
|
||||
#region inizializzazione generica & utility
|
||||
|
||||
protected string defaultApp;
|
||||
protected string defaultTitle;
|
||||
protected string defaultBody;
|
||||
|
||||
protected override void traduciObj()
|
||||
{
|
||||
defaultApp = SteamWare.memLayer.ML.confReadString("defaultApp");
|
||||
defaultTitle = SteamWare.memLayer.ML.confReadString("defaultTitle");
|
||||
defaultBody = SteamWare.memLayer.ML.confReadString("defaultBody");
|
||||
lblAppl.Text = user_std.UtSn.Traduci(defaultApp);
|
||||
lblTitle.Text = user_std.UtSn.Traduci(defaultTitle);
|
||||
lblMess.Text = user_std.UtSn.Traduci(defaultBody);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// imposta app, title e body del generico messaggio mostrato dal modulo
|
||||
/// NB: vanno passate le stringhe da tradurre!!!
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <param name="titolo"></param>
|
||||
/// <param name="body"></param>
|
||||
public void setupMessaggio(string app2transl, string titolo2transl, string body2transl)
|
||||
{
|
||||
defaultApp = app2transl;
|
||||
defaultTitle = titolo2transl;
|
||||
defaultBody = body2transl;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_main_help {
|
||||
|
||||
/// <summary>
|
||||
/// lblAppl 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 lblAppl;
|
||||
|
||||
/// <summary>
|
||||
/// lblTitle 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 lblTitle;
|
||||
|
||||
/// <summary>
|
||||
/// lblMess 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 lblMess;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="mod_selettore_ajax" Codebehind="mod_selettore_ajax.ascx.cs" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" Visible="true">
|
||||
<ContentTemplate>
|
||||
<ajaxToolkit:PopupControlExtender ID="pce" runat="server" TargetControlID="txtSelValue"
|
||||
PopupControlID="pnlSelettore" Position="Bottom" />
|
||||
<ajaxToolkit:PopupControlExtender ID="pce2" runat="server" TargetControlID="lblDescr"
|
||||
PopupControlID="pnlSelettore" Position="Bottom" CommitProperty="innerHTML" />
|
||||
<div class="selezioneValRed">
|
||||
<asp:TextBox ID="txtSelValue" runat="server" Width="0px" CssClass="hiddenTxt" BorderWidth="0px" TabIndex="-1"/>
|
||||
<asp:Label ID="lblDescr" runat="server" Text="-" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:Panel ID="pnlSelettore" runat="server" CssClass="popupControl">
|
||||
<asp:UpdatePanel ID="updPnl1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table cellpadding="0" cellspacing="0" width="50%">
|
||||
<tr>
|
||||
<td>
|
||||
<table cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="lblCerca" runat="server"></asp:Label>
|
||||
|
||||
<asp:TextBox ID="txtCerca" runat="server" OnTextChanged="txtCerca_TextChanged" AutoPostBack="true" TabIndex="-1"></asp:TextBox>
|
||||
|
||||
<asp:Button ID="btnCerca" runat="server" Text="Cerca" OnClick="txtCerca_TextChanged" TabIndex="-1" />
|
||||
|
||||
<asp:CheckBox ID="chkOpzione" runat="server" AutoPostBack="True" OnCheckedChanged="chkOpzione_CheckedChanged" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:GridView ID="grView" runat="server" OnSelectedIndexChanged="grView_SelectedIndexChanged"
|
||||
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ods"
|
||||
GridLines="None" OnDataBound="grView_DataBound" DataKeyNames="value" Width="500px"
|
||||
OnPageIndexChanged="grView_PageIndexChanged">
|
||||
<RowStyle CssClass="ctrRowStyle" />
|
||||
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
|
||||
<EditRowStyle CssClass="ctrEditRowStyle" />
|
||||
<SelectedRowStyle CssClass="ctrSelRowStyle" />
|
||||
<FooterStyle CssClass="ctrFooter" BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Select"
|
||||
Text='<%# traduci("Sel") %>' TabIndex="-1"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="lblValue" Text='<%# Eval("value") %>' Visible='<%# isValueVisible %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="label" HeaderText="label" SortExpression="label" HtmlEncode="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getSelAllUsers" TypeName="selData"
|
||||
FilterExpression=" (label LIKE '%{0}%') ">
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricercaPopup" SessionField="ricercaPopup" />
|
||||
</FilterParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
@@ -0,0 +1,499 @@
|
||||
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;
|
||||
|
||||
[ValidationProperty("valore")]
|
||||
public partial class mod_selettore_ajax : ApplicationUserControl
|
||||
{
|
||||
|
||||
protected bool _chkVisibile = false;
|
||||
protected bool _isValueVisible = false;
|
||||
protected bool _cambioTipo = false;
|
||||
|
||||
protected string _val1;
|
||||
protected string _val2;
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selDone;
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione pagina
|
||||
|
||||
protected override void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
base.Page_Load(sender, e);
|
||||
updateChkOpzione();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal(searchSessionName);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void traduciObj()
|
||||
{
|
||||
base.traduciObj();
|
||||
lblCerca.Text = traduci("lblCerca");
|
||||
btnCerca.Text = traduci("search");
|
||||
if (_chkVisibile)
|
||||
{
|
||||
updateChkOpzione();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
_val1 = "";
|
||||
_val2 = "";
|
||||
if (vistaModulo == SteamWare.tipoVistaMod.editing)
|
||||
{
|
||||
setSearchValue();
|
||||
impostaCampoRicerca();
|
||||
pce.Enabled = true;
|
||||
pce2.Enabled = true;
|
||||
lblDescr.CssClass = "txtLink";
|
||||
}
|
||||
else if (vistaModulo == SteamWare.tipoVistaMod.selezione)
|
||||
{
|
||||
pce.Enabled = false;
|
||||
pce2.Enabled = false;
|
||||
lblDescr.CssClass = "txtValue";
|
||||
}
|
||||
traduciObj();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta il valore della ricerca da quello in session
|
||||
/// </summary>
|
||||
private void setSearchValue()
|
||||
{
|
||||
if (SteamWare.memLayer.ML.isInSessionObject(searchSessionName))
|
||||
{
|
||||
testoRicerca = SteamWare.memLayer.ML.StringSessionObj(searchSessionName);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta i campi del filtro ricerca in session
|
||||
/// </summary>
|
||||
private void impostaCampoRicerca()
|
||||
{
|
||||
// imposto il nome del valore session x ricerca a campo univoco...
|
||||
SessionParameter parametroFiltro = new SessionParameter();
|
||||
parametroFiltro.SessionField = searchSessionName;
|
||||
parametroFiltro.Name = searchSessionName;
|
||||
parametroFiltro.DefaultValue = "*";
|
||||
ods.FilterParameters.Clear();
|
||||
ods.FilterParameters.Add(parametroFiltro);
|
||||
}
|
||||
/// <summary>
|
||||
/// setta il nome del campo di ricerca
|
||||
/// </summary>
|
||||
protected string searchSessionName
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("ricerca_{0}", _tipoSelettore);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area protected
|
||||
|
||||
protected string _conditio = "";
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected selettori _selettori = new selettori();
|
||||
/// <summary>
|
||||
/// a seconda del tipo di selettore cambierà l'origine ods
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void chkOpzione_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
fixChkOds();
|
||||
}
|
||||
|
||||
protected void setCheck()
|
||||
{
|
||||
//if (_tipoSelettore == tipoSelettore.utentiAll || _tipoSelettore == tipoSelettore.utentiCdc)
|
||||
//{
|
||||
// _chkVisibile = true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
_chkVisibile = false;
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna visualizzazione del check opzionale con label e visibilità
|
||||
/// </summary>
|
||||
protected void updateChkOpzione()
|
||||
{
|
||||
//// se definito il tipo decido SE mostrare il check e tradurre la label...
|
||||
//if (_tipoSelettore == tipoSelettore.utentiAll || _tipoSelettore == tipoSelettore.utentiCdc)
|
||||
//{
|
||||
// chkOpzione.Visible = true;
|
||||
// chkOpzione.Text = traduci("chkSoloGer");
|
||||
// if (_tipoSelettore == tipoSelettore.utentiCdc)
|
||||
// {
|
||||
// chkOpzione.Checked = true;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
chkOpzione.Visible = false;
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna la label che traduce il valore a seconda del tipo di oggetto...
|
||||
/// </summary>
|
||||
protected void aggiornaLabelDaValore()
|
||||
{
|
||||
// x ora metto valore di default...
|
||||
string _answ = "-";
|
||||
if (txtSelValue.Text != "")
|
||||
{
|
||||
System.Data.DataView tabella = (System.Data.DataView)ods.Select();
|
||||
tabella.RowFilter = string.Format("value = '{0}'", txtSelValue.Text);
|
||||
try
|
||||
{
|
||||
_answ = tabella.ToTable().Rows[0]["label"].ToString();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
lblDescr.Text = _answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna label e valore principale da una chiave multipart
|
||||
/// </summary>
|
||||
private void aggiornaDaValMulti()
|
||||
{
|
||||
// eseguo SE E SOLO SE entrambi i valori sono popolati
|
||||
if (val1 != "" && val1 != null)
|
||||
{
|
||||
if (val2 != "" && val2 != null && val2 != "na")
|
||||
{
|
||||
txtSelValue.Text = string.Format("{0}#{1}", val1, val2);
|
||||
aggiornaLabelDaValore();
|
||||
}
|
||||
else
|
||||
{
|
||||
txtSelValue.Text = val1;
|
||||
aggiornaLabelDaValore();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// tipo di valori mostrati
|
||||
/// </summary>
|
||||
protected tipoSelettore _tipoSelettore = tipoSelettore.cdc;
|
||||
/// <summary>
|
||||
/// nome del controllo gestito dal nostro popup
|
||||
/// </summary>
|
||||
protected string _targetControl = "";
|
||||
/// <summary>
|
||||
/// sistemo gli ods
|
||||
/// </summary>
|
||||
protected override void bindControlli()
|
||||
{
|
||||
base.bindControlli();
|
||||
fixChkOds();
|
||||
fixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistema l'ods dato lo stato del chk
|
||||
/// </summary>
|
||||
protected void fixChkOds()
|
||||
{
|
||||
//if (_tipoSelettore == tipoSelettore.utentiAll || _tipoSelettore == tipoSelettore.utentiCdc)
|
||||
//{
|
||||
// // verifico se sia o meno checked "solo cdc utente"...
|
||||
// if (chkOpzione.Checked)
|
||||
// {
|
||||
// //imposto nuovo tipo selettore
|
||||
// _tipoSelettore = tipoSelettore.utentiCdc;
|
||||
// fixOds();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //imposto nuovo tipo selettore
|
||||
// _tipoSelettore = tipoSelettore.utentiAll;
|
||||
// fixOds();
|
||||
// }
|
||||
// // faccio databind...
|
||||
// grView.PageIndex = 0;
|
||||
// grView.DataBind();
|
||||
|
||||
//}
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemazione fonte ods...
|
||||
/// </summary>
|
||||
protected void fixOds()
|
||||
{
|
||||
string _selectMethod = "";
|
||||
switch (_tipoSelettore)
|
||||
{
|
||||
case tipoSelettore.cdc:
|
||||
_selectMethod = "getSelAllCdC";
|
||||
break;
|
||||
//case tipoSelettore.impianti:
|
||||
// _selectMethod = "getSelImpianti";
|
||||
// break;
|
||||
//case tipoSelettore.macchine:
|
||||
// _selectMethod = "getSelMacchine";
|
||||
// break;
|
||||
//case tipoSelettore.utentiAll:
|
||||
// _selectMethod = "getSelAllUsers";
|
||||
// break;
|
||||
//case tipoSelettore.utentiCdc:
|
||||
// _selectMethod = "getSelUsersGer";
|
||||
// break;
|
||||
}
|
||||
ods.SelectMethod = _selectMethod;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// selezione annullata su cambio pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiornamento filtro da stringa di ricerca del popup
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// se cambio filtro tolgo il selected...
|
||||
grView.SelectedIndex = -1;
|
||||
// salvo la ricerca in session e filter dell'ods...
|
||||
SteamWare.memLayer.ML.setSessionVal(searchSessionName, txtCerca.Text);
|
||||
impostaCampoRicerca();
|
||||
fixChkOds();
|
||||
fixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo il valore selezionato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string valore = grView.SelectedValue.ToString();
|
||||
lblDescr.Text = grView.SelectedRow.Cells[2].Text.ToString();
|
||||
UpdatePanel1.Update();
|
||||
pce.Commit(valore);
|
||||
pce2.Commit(grView.SelectedRow.Cells[2].Text.ToString());
|
||||
// se ho una chiave multiparte salvo nei 2 valori...
|
||||
if (valore.IndexOf('#') > -1)
|
||||
{
|
||||
string[] valori = valore.Split('#');
|
||||
val1 = valori[0];
|
||||
val2 = valori[1];
|
||||
}
|
||||
if (eh_selDone != null)
|
||||
{
|
||||
eh_selDone(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// resetta ricerca e selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
testoRicerca = "";
|
||||
SteamWare.memLayer.ML.emptySessionVal(searchSessionName);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// tipo di selettore da istanziare
|
||||
/// </summary>
|
||||
public tipoSelettore tipo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tipoSelettore;
|
||||
}
|
||||
set
|
||||
{
|
||||
_tipoSelettore = value;
|
||||
setCheck();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua update del controllo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
// svuoto ricerca...
|
||||
SteamWare.memLayer.ML.emptySessionVal(searchSessionName);
|
||||
testoRicerca = "";
|
||||
// imposto valori cercati...
|
||||
setSearchValue();
|
||||
impostaCampoRicerca();
|
||||
// continuo con update
|
||||
updateChkOpzione();
|
||||
fixOds();
|
||||
aggiornaDaValMulti();
|
||||
// faccio databind...
|
||||
grView.PageIndex = 0;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore mostrato nel campo testo del selettore
|
||||
/// </summary>
|
||||
public string valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtSelValue.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtSelValue.Text = value;
|
||||
aggiornaLabelDaValore();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore di una chiave multiparte
|
||||
/// </summary>
|
||||
public string val1
|
||||
{
|
||||
get
|
||||
{
|
||||
return _val1;
|
||||
}
|
||||
set
|
||||
{
|
||||
_val1 = value;
|
||||
aggiornaDaValMulti();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore di una chiave multiparte
|
||||
/// </summary>
|
||||
public string val2
|
||||
{
|
||||
get
|
||||
{
|
||||
return _val2;
|
||||
}
|
||||
set
|
||||
{
|
||||
_val2 = value;
|
||||
aggiornaDaValMulti();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// impone una condizione di filtro sui valori mostrati
|
||||
/// </summary>
|
||||
public string conditio
|
||||
{
|
||||
get
|
||||
{
|
||||
return _conditio;
|
||||
}
|
||||
set
|
||||
{
|
||||
_conditio = value;
|
||||
if (_conditio != "")
|
||||
{
|
||||
ods.SelectParameters.Clear();
|
||||
ods.SelectParameters.Add("where", string.Format(" conditio = '{0}' ", _conditio));
|
||||
}
|
||||
else
|
||||
{
|
||||
ods.SelectParameters.Clear();
|
||||
ods.SelectParameters.Add("where", " conditio = '*' ");
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se il valore da selezionare sia da visualizzare o meno
|
||||
/// </summary>
|
||||
public bool isValueVisible
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isValueVisible;
|
||||
}
|
||||
set
|
||||
{
|
||||
_isValueVisible = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
public partial class mod_selettore_ajax {
|
||||
|
||||
/// <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>
|
||||
/// pce control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.PopupControlExtender pce;
|
||||
|
||||
/// <summary>
|
||||
/// pce2 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.PopupControlExtender pce2;
|
||||
|
||||
/// <summary>
|
||||
/// txtSelValue 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 txtSelValue;
|
||||
|
||||
/// <summary>
|
||||
/// lblDescr 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 lblDescr;
|
||||
|
||||
/// <summary>
|
||||
/// pnlSelettore 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.Panel pnlSelettore;
|
||||
|
||||
/// <summary>
|
||||
/// updPnl1 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 updPnl1;
|
||||
|
||||
/// <summary>
|
||||
/// lblCerca 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 lblCerca;
|
||||
|
||||
/// <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>
|
||||
/// btnCerca 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 btnCerca;
|
||||
|
||||
/// <summary>
|
||||
/// chkOpzione 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.CheckBox chkOpzione;
|
||||
|
||||
/// <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,105 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true"
|
||||
Inherits="mod_vocabolario" Codebehind="mod_vocabolario.ascx.cs" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<table class="contrDx">
|
||||
<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) %>' />
|
||||
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
|
||||
TargetControlID="imgDelete">
|
||||
</cc1: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="selData"
|
||||
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>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="Lingua" Type="String" />
|
||||
<asp:Parameter Name="Lemma" Type="String" />
|
||||
<asp:Parameter Name="Traduzione" Type="String" />
|
||||
</InsertParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Button ID="btnNewLemma" runat="server" OnClick="btnNewLemma_Click" />
|
||||
<asp:TextBox ID="txtNewLemma" runat="server" />
|
||||
<cc1:TextBoxWatermarkExtender ID="TBW_newLemma" runat="server" TargetControlID="txtNewLemma" WatermarkCssClass="watermark">
|
||||
</cc1:TextBoxWatermarkExtender>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,146 @@
|
||||
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_vocabolario : ApplicationUserControl
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_selezioneValore;
|
||||
public event EventHandler eh_resetSelezione;
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected
|
||||
|
||||
protected override void traduciObj()
|
||||
{
|
||||
base.traduciObj();
|
||||
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(_paginaCorrente);
|
||||
}
|
||||
}
|
||||
|
||||
protected override 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>
|
||||
/// 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
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// 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>
|
||||
/// 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>
|
||||
/// TBW_newLemma control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TextBoxWatermarkExtender TBW_newLemma;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSearch.master"
|
||||
AutoEventWireup="true" CodeBehind="anagMagazzini.aspx.cs" Inherits="GMW.anagMagazzini" %>
|
||||
|
||||
<%@ Register Src="WebUserControls/mod_anagMagazzini.ascx" TagName="mod_anagMagazzini"
|
||||
TagPrefix="uc1" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<uc1:mod_anagMagazzini ID="mod_anagMagazzini1" runat="server" />
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW
|
||||
{
|
||||
public partial class anagMagazzini : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GMW {
|
||||
|
||||
|
||||
public partial class anagMagazzini {
|
||||
|
||||
/// <summary>
|
||||
/// mod_anagMagazzini1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::GMW.WebUserControls.mod_anagMagazzini mod_anagMagazzini1;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 339 B |
|
After Width: | Height: | Size: 268 B |
|
After Width: | Height: | Size: 207 B |
|
After Width: | Height: | Size: 327 B |
|
After Width: | Height: | Size: 264 B |
|
After Width: | Height: | Size: 205 B |
|
After Width: | Height: | Size: 261 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 313 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 797 B |
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 815 B |
|
After Width: | Height: | Size: 115 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 76 B |
|
After Width: | Height: | Size: 115 B |
|
After Width: | Height: | Size: 866 B |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 716 B |
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 97 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 675 B |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 804 B |
|
After Width: | Height: | Size: 834 B |
|
After Width: | Height: | Size: 389 B |
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 414 B |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 224 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 173 KiB |