v 2.4.227
Bozza iniziale gestione 2 tabelle Utilities / Cost2Plant
This commit is contained in:
@@ -206,6 +206,7 @@
|
||||
<Content Include="Content\themes\base\minified\jquery.ui.tabs.min.css" />
|
||||
<Content Include="Content\themes\base\minified\jquery.ui.theme.min.css" />
|
||||
<Content Include="Content\themes\base\minified\jquery.ui.tooltip.min.css" />
|
||||
<Content Include="Cost2Plant.aspx" />
|
||||
<Content Include="CsvExcelExporter.aspx" />
|
||||
<Content Include="DbSync.aspx" />
|
||||
<Content Include="DiesGroupMan.aspx" />
|
||||
@@ -373,9 +374,11 @@
|
||||
<Content Include="TranspCostMan.aspx" />
|
||||
<Content Include="UpdateVoc.aspx" />
|
||||
<Content Include="UserAdmin.aspx" />
|
||||
<Content Include="Utilities.aspx" />
|
||||
<Content Include="Vocabolario.aspx" />
|
||||
<Content Include="WebUserControls\mod_AgentsMan.ascx" />
|
||||
<Content Include="WebUserControls\mod_autocompleteShort.ascx" />
|
||||
<Content Include="WebUserControls\mod_Cost2Plant.ascx" />
|
||||
<Content Include="WebUserControls\mod_createNewStdCost.ascx" />
|
||||
<Content Include="WebUserControls\mod_DiesGroupMan.ascx" />
|
||||
<Content Include="WebUserControls\mod_display.ascx" />
|
||||
@@ -419,6 +422,7 @@
|
||||
<Content Include="JumboPage.master" />
|
||||
<Content Include="FullPage.master" />
|
||||
<Content Include="WebUserControls\mod_TranspCostMan.ascx" />
|
||||
<Content Include="WebUserControls\mod_Utilities.ascx" />
|
||||
<Content Include="WebUserControls\mod_vocabolario.ascx" />
|
||||
<Content Include="WhatIf.aspx" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff" />
|
||||
@@ -520,6 +524,13 @@
|
||||
<Compile Include="Bootstrap.Master.designer.cs">
|
||||
<DependentUpon>Bootstrap.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Cost2Plant.aspx.cs">
|
||||
<DependentUpon>Cost2Plant.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Cost2Plant.aspx.designer.cs">
|
||||
<DependentUpon>Cost2Plant.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CsvExcelExporter.aspx.cs">
|
||||
<DependentUpon>CsvExcelExporter.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -757,6 +768,13 @@
|
||||
<Compile Include="UserAdmin.aspx.designer.cs">
|
||||
<DependentUpon>UserAdmin.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utilities.aspx.cs">
|
||||
<DependentUpon>Utilities.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Utilities.aspx.designer.cs">
|
||||
<DependentUpon>Utilities.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewSwitcher.ascx.cs">
|
||||
<DependentUpon>ViewSwitcher.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -792,6 +810,13 @@
|
||||
<Compile Include="WebUserControls\mod_autocompleteShort.ascx.designer.cs">
|
||||
<DependentUpon>mod_autocompleteShort.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_Cost2Plant.ascx.cs">
|
||||
<DependentUpon>mod_Cost2Plant.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_Cost2Plant.ascx.designer.cs">
|
||||
<DependentUpon>mod_Cost2Plant.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_createNewStdCost.ascx.cs">
|
||||
<DependentUpon>mod_createNewStdCost.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -1100,6 +1125,13 @@
|
||||
<Compile Include="WebUserControls\mod_TranspCostMan.ascx.designer.cs">
|
||||
<DependentUpon>mod_TranspCostMan.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_Utilities.ascx.cs">
|
||||
<DependentUpon>mod_Utilities.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_Utilities.ascx.designer.cs">
|
||||
<DependentUpon>mod_Utilities.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\mod_vocabolario.ascx.cs">
|
||||
<DependentUpon>mod_vocabolario.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.master" AutoEventWireup="true" CodeBehind="Cost2Plant.aspx.cs" Inherits="C2P.Cost2Plant" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_ricercaGenerica.ascx" TagPrefix="uc1" TagName="mod_ricercaGenerica" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_Cost2Plant.ascx" TagPrefix="uc1" TagName="mod_Cost2Plant" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="container-fluid" style="background-color: #cdcdcd; padding-top: 2px; padding-bottom: 2px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 col-sm-offset-2 text-center">
|
||||
<uc1:mod_ricercaGenerica runat="server" ID="mod_ricercaGenerica" />
|
||||
</div>
|
||||
<div class="col-sm-2 text-right">
|
||||
<uc1:mod_righePag ID="mod_righePag" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" style="padding-top: 2px; padding-bottom: 2px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<uc1:mod_Cost2Plant runat="server" id="mod_Cost2Plant" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace C2P
|
||||
{
|
||||
public partial class Cost2Plant : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = 20;
|
||||
mod_Cost2Plant.pageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
mod_righePag.eh_newNum += mod_righePag_eh_newNum;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiornato numero righe datagrid... aggiorno visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
mod_Cost2Plant.pageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+42
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace C2P {
|
||||
|
||||
|
||||
public partial class Cost2Plant {
|
||||
|
||||
/// <summary>
|
||||
/// mod_ricercaGenerica control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_ricercaGenerica mod_ricercaGenerica;
|
||||
|
||||
/// <summary>
|
||||
/// mod_righePag control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_righePag mod_righePag;
|
||||
|
||||
/// <summary>
|
||||
/// mod_Cost2Plant control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::C2P.WebUserControls.mod_Cost2Plant mod_Cost2Plant;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/FullPage.master" AutoEventWireup="true" CodeBehind="Utilities.aspx.cs" Inherits="C2P.Utilities" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_ricercaGenerica.ascx" TagPrefix="uc1" TagName="mod_ricercaGenerica" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc1" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_Utilities.ascx" TagPrefix="uc1" TagName="mod_Utilities" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"><div class="container-fluid" style="background-color: #cdcdcd; padding-top: 2px; padding-bottom: 2px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 col-sm-offset-2 text-center">
|
||||
<uc1:mod_ricercaGenerica runat="server" ID="mod_ricercaGenerica" />
|
||||
</div>
|
||||
<div class="col-sm-2 text-right">
|
||||
<uc1:mod_righePag ID="mod_righePag" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" style="padding-top: 2px; padding-bottom: 2px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<uc1:mod_Utilities runat="server" id="mod_Utilities" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace C2P
|
||||
{
|
||||
public partial class Utilities : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
mod_righePag.numRowPag = 20;
|
||||
mod_Utilities.pageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
mod_righePag.eh_newNum += mod_righePag_eh_newNum;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiornato numero righe datagrid... aggiorno visualizzazione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_righePag_eh_newNum(object sender, EventArgs e)
|
||||
{
|
||||
mod_Utilities.pageSize = mod_righePag.numRowPag;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+42
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace C2P {
|
||||
|
||||
|
||||
public partial class Utilities {
|
||||
|
||||
/// <summary>
|
||||
/// mod_ricercaGenerica control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_ricercaGenerica mod_ricercaGenerica;
|
||||
|
||||
/// <summary>
|
||||
/// mod_righePag control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::mod_righePag mod_righePag;
|
||||
|
||||
/// <summary>
|
||||
/// mod_Utilities control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::C2P.WebUserControls.mod_Utilities mod_Utilities;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_Cost2Plant.ascx.cs" Inherits="C2P.WebUserControls.mod_Cost2Plant" %>
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:LinkButton ID="lbtNew" runat="server" OnClick="lbtNew_Click" CssClass="btn btn-success"><%: traduci("btnNewAgent") %></asp:LinkButton>
|
||||
<asp:TextBox ID="txtNewVal" runat="server" />
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CodAg" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered" OnRowEditing="grView_RowEditing">
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbUpdate" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbCancel" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit" Visible='<%# !checkValEq(Eval("CodAg"), "TBD") %>'><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodAg" HeaderText="CodAg" SortExpression="CodAg" />
|
||||
<asp:BoundField DataField="Lastname" HeaderText="Lastname" SortExpression="Lastname" />
|
||||
<asp:BoundField DataField="Firstname" HeaderText="Firstname" SortExpression="Firstname" />
|
||||
<asp:BoundField DataField="QuotaProvvAg" HeaderText="QuotaProvvAg" SortExpression="QuotaProvvAg" DataFormatString="{0:C4}" />
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbUpdate2" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbCancel2" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' Visible='<%# !checkValEq(Eval("CodAg"), "TBD") %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.AgentsDetTableAdapter" UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="original_{0}" FilterExpression="CodAg LIKE '%{0}%' OR Lastname LIKE '%{0}%' OR Firstname LIKE '%{0}%' " InsertMethod="insertQuery">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_CodAg" Type="String" />
|
||||
</DeleteParameters>
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="CodAg" Type="String" />
|
||||
<asp:Parameter Name="Lastname" Type="String" />
|
||||
<asp:Parameter Name="Firstname" Type="String" />
|
||||
<asp:Parameter Name="QuotaProvvAg" Type="Decimal" />
|
||||
</InsertParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="CodAg" Type="String" />
|
||||
<asp:Parameter Name="Lastname" Type="String" />
|
||||
<asp:Parameter Name="Firstname" Type="String" />
|
||||
<asp:Parameter Name="QuotaProvvAg" Type="Decimal" />
|
||||
<asp:Parameter Name="Original_CodAg" Type="String" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,131 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using C2P_Data;
|
||||
|
||||
namespace C2P.WebUserControls
|
||||
{
|
||||
public partial class mod_Cost2Plant : SteamWare.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
protected void Page_Load()
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
txtNewVal.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inserisco nel db il nuovo lemma...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
creaNuovo();
|
||||
}
|
||||
/// <summary>
|
||||
/// dimensione pagina grid view
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return grView.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// post bind grView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} ({1})", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// editing riga
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
// seleziono la riga corrente...
|
||||
grView.SelectedIndex = e.NewEditIndex;
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// creazione nuovo lemma
|
||||
/// </summary>
|
||||
private void creaNuovo()
|
||||
{
|
||||
if (txtNewVal.Text != "")
|
||||
{
|
||||
// inserisco
|
||||
DtProxy.man.taAgent.insertQuery(txtNewVal.Text.Trim(), "-", "-", 0);
|
||||
// metto in campo ricerca...
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtNewVal.Text = "";
|
||||
// riparto...
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se i 2 vallori inseriti corrispondano
|
||||
/// </summary>
|
||||
/// <param name="val1"></param>
|
||||
/// <param name="val2"></param>
|
||||
/// <returns></returns>
|
||||
public bool checkValEq(object val1, object val2)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
if (val1.ToString() == val2.ToString()) answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace C2P.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_Cost2Plant {
|
||||
|
||||
/// <summary>
|
||||
/// lbtNew control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtNew;
|
||||
|
||||
/// <summary>
|
||||
/// txtNewVal control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNewVal;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@
|
||||
</EmptyDataTemplate>
|
||||
<%--<PagerSettings Mode="NumericFirstLast" />
|
||||
<PagerStyle CssClass="paginatore" HorizontalAlign="Center" Font-Bold="true" Wrap="true" Font-Size="1.2em" Width="100%" />--%>
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerStyle CssClass="active GridPager" Font-Size="1.2em" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<Columns>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_Utilities.ascx.cs" Inherits="C2P.WebUserControls.mod_Utilities" %>
|
||||
<div class="row" style="font-size: 8pt;">
|
||||
<div class="col-sm-12">
|
||||
<asp:LinkButton ID="lbtNew" runat="server" OnClick="lbtNew_Click" CssClass="btn btn-success"><%: traduci("btnNewAgent") %></asp:LinkButton>
|
||||
<asp:TextBox ID="txtNewVal" runat="server" />
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CodAg" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered" OnRowEditing="grView_RowEditing">
|
||||
<EmptyDataTemplate>
|
||||
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
|
||||
</EmptyDataTemplate>
|
||||
<HeaderStyle CssClass="default" />
|
||||
<PagerStyle CssClass="active GridPager" />
|
||||
<PagerSettings Mode="NumericFirstLast" />
|
||||
<SelectedRowStyle CssClass="info" />
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbUpdate" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbCancel" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit" Visible='<%# !checkValEq(Eval("CodAg"), "TBD") %>'><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="CodAg" HeaderText="CodAg" SortExpression="CodAg" />
|
||||
<asp:BoundField DataField="Lastname" HeaderText="Lastname" SortExpression="Lastname" />
|
||||
<asp:BoundField DataField="Firstname" HeaderText="Firstname" SortExpression="Firstname" />
|
||||
<asp:BoundField DataField="QuotaProvvAg" HeaderText="QuotaProvvAg" SortExpression="QuotaProvvAg" DataFormatString="{0:C4}" />
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbUpdate2" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbCancel2" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' Visible='<%# !checkValEq(Eval("CodAg"), "TBD") %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.AgentsDetTableAdapter" UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="original_{0}" FilterExpression="CodAg LIKE '%{0}%' OR Lastname LIKE '%{0}%' OR Firstname LIKE '%{0}%' " InsertMethod="insertQuery">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Original_CodAg" Type="String" />
|
||||
</DeleteParameters>
|
||||
<FilterParameters>
|
||||
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
|
||||
</FilterParameters>
|
||||
<InsertParameters>
|
||||
<asp:Parameter Name="CodAg" Type="String" />
|
||||
<asp:Parameter Name="Lastname" Type="String" />
|
||||
<asp:Parameter Name="Firstname" Type="String" />
|
||||
<asp:Parameter Name="QuotaProvvAg" Type="Decimal" />
|
||||
</InsertParameters>
|
||||
<UpdateParameters>
|
||||
<asp:Parameter Name="CodAg" Type="String" />
|
||||
<asp:Parameter Name="Lastname" Type="String" />
|
||||
<asp:Parameter Name="Firstname" Type="String" />
|
||||
<asp:Parameter Name="QuotaProvvAg" Type="Decimal" />
|
||||
<asp:Parameter Name="Original_CodAg" Type="String" />
|
||||
</UpdateParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,131 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using C2P_Data;
|
||||
|
||||
namespace C2P.WebUserControls
|
||||
{
|
||||
public partial class mod_Utilities : SteamWare.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
protected void Page_Load()
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
txtNewVal.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inserisco nel db il nuovo lemma...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
creaNuovo();
|
||||
}
|
||||
/// <summary>
|
||||
/// dimensione pagina grid view
|
||||
/// </summary>
|
||||
public int pageSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return grView.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
grView.PageSize = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// post bind grView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} ({1})", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// editing riga
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
// seleziono la riga corrente...
|
||||
grView.SelectedIndex = e.NewEditIndex;
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// creazione nuovo lemma
|
||||
/// </summary>
|
||||
private void creaNuovo()
|
||||
{
|
||||
if (txtNewVal.Text != "")
|
||||
{
|
||||
// inserisco
|
||||
DtProxy.man.taAgent.insertQuery(txtNewVal.Text.Trim(), "-", "-", 0);
|
||||
// metto in campo ricerca...
|
||||
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
|
||||
// svuoto campo text
|
||||
txtNewVal.Text = "";
|
||||
// riparto...
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se i 2 vallori inseriti corrispondano
|
||||
/// </summary>
|
||||
/// <param name="val1"></param>
|
||||
/// <param name="val2"></param>
|
||||
/// <returns></returns>
|
||||
public bool checkValEq(object val1, object val2)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
if (val1.ToString() == val2.ToString()) answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace C2P.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_Utilities {
|
||||
|
||||
/// <summary>
|
||||
/// lbtNew control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtNew;
|
||||
|
||||
/// <summary>
|
||||
/// txtNewVal control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtNewVal;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,8 @@
|
||||
<li runat="server" id="liAgents"><a href="AgentsMan"><%: traduci("AgentsMan") %></a></li>
|
||||
<li runat="server" id="liRawMat"><a href="RawMatMan"><%: traduci("RawMatMan") %></a></li>
|
||||
<li runat="server" id="liPackage"><a href="PackageMan"><%: traduci("PackageMan") %></a></li>
|
||||
<li runat="server" id="liUtilities"><a href="Utilities"><%: traduci("Utilities") %></a></li>
|
||||
<li runat="server" id="liCost2Plant"><a href="Cost2Plant"><%: traduci("Cost2Plant") %></a></li>
|
||||
<li runat="server" id="liDivider1" class="divider"></li>
|
||||
<li runat="server" id="liDiesGroup"><a href="DiesGroupMan"><%: traduci("DiesGroupMan") %></a></li>
|
||||
<li runat="server" id="liTranspCostMan"><a href="TranspCostMan"><%: traduci("TranspCostMan") %></a></li>
|
||||
|
||||
+18
@@ -120,6 +120,24 @@ namespace C2P.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl liPackage;
|
||||
|
||||
/// <summary>
|
||||
/// liUtilities control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl liUtilities;
|
||||
|
||||
/// <summary>
|
||||
/// liCost2Plant control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl liCost2Plant;
|
||||
|
||||
/// <summary>
|
||||
/// liDivider1 control.
|
||||
/// </summary>
|
||||
|
||||
Binary file not shown.
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("2.4.223.674")]
|
||||
[assembly: AssemblyFileVersion("2.4.223.674")]
|
||||
[assembly: AssemblyVersion("2.4.227.674")]
|
||||
[assembly: AssemblyFileVersion("2.4.227.674")]
|
||||
[assembly: AssemblyCopyright("Proxima & Steamware © 2013-2015")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("2.4.223.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("2.4.223.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyVersion("2.4.227.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("2.4.227.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyCopyright("Proxima & Steamware © 2013-<#= DateTime.Now.Year #>")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
<#+
|
||||
|
||||
Reference in New Issue
Block a user