prima release con package management...

This commit is contained in:
Samuele E. Locatelli
2015-05-29 13:39:21 +02:00
parent 9f5a93efce
commit 2ee76102c7
18 changed files with 453 additions and 15 deletions
+16
View File
@@ -301,6 +301,7 @@
<Content Include="NewProductOffer.aspx" />
<Content Include="OfferReport.aspx" />
<Content Include="OffersArchive.aspx" />
<Content Include="PackageMan.aspx" />
<Content Include="packages.config" />
<Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -386,6 +387,7 @@
<Content Include="WebUserControls\mod_newProduct.ascx" />
<Content Include="WebUserControls\mod_OfferReport.ascx" />
<Content Include="WebUserControls\mod_OffersArchive.ascx" />
<Content Include="WebUserControls\mod_PackageMan.ascx" />
<Content Include="WebUserControls\mod_Q_Costs.ascx" />
<Content Include="WebUserControls\mod_Q_ExtrPar.ascx" />
<Content Include="WebUserControls\mod_Q_Header.ascx" />
@@ -617,6 +619,13 @@
<Compile Include="OffersArchive.aspx.designer.cs">
<DependentUpon>OffersArchive.aspx</DependentUpon>
</Compile>
<Compile Include="PackageMan.aspx.cs">
<DependentUpon>PackageMan.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="PackageMan.aspx.designer.cs">
<DependentUpon>PackageMan.aspx</DependentUpon>
</Compile>
<Compile Include="PlantsMan.aspx.cs">
<DependentUpon>PlantsMan.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -879,6 +888,13 @@
<Compile Include="WebUserControls\mod_OffersArchive.ascx.designer.cs">
<DependentUpon>mod_OffersArchive.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_PackageMan.ascx.cs">
<DependentUpon>mod_PackageMan.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_PackageMan.ascx.designer.cs">
<DependentUpon>mod_PackageMan.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_QuoteDet.ascx.cs">
<DependentUpon>mod_QuoteDet.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+36
View File
@@ -0,0 +1,36 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/c2p/FullPage.master" AutoEventWireup="true" CodeBehind="PackageMan.aspx.cs" Inherits="C2P.PackageMan" %>
<%@ 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_PackageMan.ascx" TagPrefix="uc1" TagName="mod_PackageMan" %>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" 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_PackageMan runat="server" id="mod_PackageMan" />
</div>
</div>
</div>
</div>
</asp:Content>
+32
View File
@@ -0,0 +1,32 @@
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 PackageMan : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
mod_righePag.numRowPag = 20;
mod_PackageMan.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_PackageMan.pageSize = mod_righePag.numRowPag;
}
}
}
+42
View File
@@ -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 PackageMan {
/// <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_PackageMan control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::C2P.WebUserControls.mod_PackageMan mod_PackageMan;
}
}
+73
View File
@@ -0,0 +1,73 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_PackageMan.ascx.cs" Inherits="C2P.WebUserControls.mod_PackageMan" %>
<div class="row" style="font-size: 8pt;">
<div class="col-sm-12">
<asp:Button ID="btnNewRawMat" runat="server" OnClick="btnNewRawMat_Click" CssClass="btn btn-success" />
<asp:TextBox ID="txtRawMat" runat="server" placeholder="Insert Alloy" />
</div>
<div class="col-sm-12">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
DataKeyNames="RawMat" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered"
OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowEditing="grView_RowEditing">
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:LinkButton runat="server" ID="lbUpdate" CausesValidation="true" CommandName="Update"><i class="fa fa-check fa-2x"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbCancel" CausesValidation="false" CommandName="Cancel"><i class="fa fa-undo fa-2x"></i></asp:LinkButton>
</EditItemTemplate>
<HeaderTemplate>
<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default" Visible="true"><i class="glyphicon glyphicon-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
</HeaderTemplate>
<ItemTemplate>
<%--<asp:LinkButton runat="server" ID="lbSelect" CausesValidation="false" CommandName="Select"><i class="fa fa-search fa-2x"></i></asp:LinkButton>--%>
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit"><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="RawMat" HeaderText="RawMat" ReadOnly="True" SortExpression="RawMat" />
<asp:BoundField DataField="ProcCost" HeaderText="ProcCost" SortExpression="ProcCost" />
<asp:BoundField DataField="ProcYield" HeaderText="ProcYield" SortExpression="ProcYield" />
<asp:BoundField DataField="CSR" HeaderText="CSR" SortExpression="CSR" />
<asp:BoundField DataField="SSR" HeaderText="SSR" SortExpression="SSR" />
<asp:BoundField DataField="SSVA" HeaderText="SSVA" SortExpression="SSVA" />
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" />
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" />
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" />
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
</EmptyDataTemplate>
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.RawMatDetTableAdapter"
UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}"
FilterExpression="RawMat LIKE '%{0}%' "
OnUpdated="ods_Updated" OnInserted="ods_Inserted" InsertMethod="insertQuery">
<DeleteParameters>
<asp:Parameter Name="Original_RawMat" Type="String" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
</FilterParameters>
<InsertParameters>
<asp:Parameter Name="RawMat" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Original_RawMat" Type="String" />
<asp:Parameter Name="ProcCost" Type="Decimal" />
<asp:Parameter Name="ProcYield" Type="Decimal" />
<asp:Parameter Name="CSR" Type="Decimal" />
<asp:Parameter Name="SSR" Type="Decimal" />
<asp:Parameter Name="SSVA" Type="Decimal" />
<asp:Parameter Name="SSVR" Type="Decimal" />
<asp:Parameter Name="ExtraMatCost" Type="Decimal" />
<asp:Parameter Name="ExtraServCost" Type="Decimal" />
</UpdateParameters>
</asp:ObjectDataSource>
</div>
</div>
+168
View File
@@ -0,0 +1,168 @@
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_PackageMan : SteamWare.UserControl
{
#region gestione eventi
public event EventHandler eh_selezioneValore;
public event EventHandler eh_resetSelezione;
#endregion
#region protected
/// <summary>
/// caricamento pagina
/// </summary>
protected void Page_Load()
{
if (!Page.IsPostBack)
{
btnNewRawMat.Text = user_std.UtSn.Traduci("btnNewRawMat");
txtRawMat.Text = "";
}
}
/// <summary>
/// inserisco nel db il nuovo lemma...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNewRawMat_Click(object sender, EventArgs e)
{
creaNuovoRawMat();
}
/// <summary>
/// creazione nuovo lemma
/// </summary>
private void creaNuovoRawMat()
{
if (txtRawMat.Text != "")
{
// inserisco
DtProxy.man.taRMD.insertQuery(txtRawMat.Text.Trim());
// metto in campo ricerca...
memLayer.ML.setSessionVal("valoreCercato", txtRawMat.Text.Trim());
// svuoto campo text
txtRawMat.Text = "";
// riparto...
Response.Redirect(user_std.pagCorrente);
}
}
/// <summary>
/// dimensione pagina grid view
/// </summary>
public int pageSize
{
get
{
return grView.PageSize;
}
set
{
grView.PageSize = value;
}
}
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} ({1})", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
selezionatoValore();
}
private void selezionatoValore()
{
#if false
SteamWare.memLayer.ML.setSessionVal("lemma_sel", grView.SelectedDataKey.Values[1]);
if (eh_selezioneValore != null)
{
eh_selezioneValore(this, new EventArgs());
}
#endif
}
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
{
// seleziono la riga corrente...
grView.SelectedIndex = e.NewEditIndex;
selezionatoValore();
}
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
DataWrap.DW.resetVocabolario();
selezionatoValore();
}
#endregion
#region area public
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
#if false
SteamWare.memLayer.ML.emptySessionVal("lemma_sel");
#endif
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
#endregion
protected void ods_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
#if false
DataWrap.DW.resetVocabolario();
selezionatoValore();
#endif
}
}
}
+60
View File
@@ -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_PackageMan {
/// <summary>
/// btnNewRawMat 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 btnNewRawMat;
/// <summary>
/// txtRawMat 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 txtRawMat;
/// <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;
}
}
+2 -1
View File
@@ -70,9 +70,10 @@
<ul class="dropdown-menu">
<li runat="server" id="liListValues"><a href="ListValues"><%: traduci("ListValuesMgmt") %></a></li>
<li runat="server" id="liImport"><a href="Import"><%: traduci("ImportData") %></a></li>
<li runat="server" id="liRawMat"><a href="RawMatMan"><%: traduci("RawMatMan") %></a></li>
<li runat="server" id="liPlants"><a href="PlantsMan"><%: traduci("PlantsMan") %></a></li>
<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="liDivider1" class="divider"></li>
<li runat="server" id="liGestVoc"><a href="Vocabolario"><%: traduci("GestVoc") %></a></li>
<li runat="server" id="liUpdateVoc"><a href="UpdateVoc">Update Voc</a></li>
+2 -1
View File
@@ -113,9 +113,10 @@ namespace C2P.WebUserControls
{
// visibilità solo x admin cliente
liImport.Visible = userIsAdmin;
liRawMat.Visible = userIsAdmin;
liPlants.Visible = userIsAdmin;
liAgents.Visible = userIsAdmin;
liRawMat.Visible = userIsAdmin;
liPackage.Visible = userIsAdmin;
// visibilità solo x superadmin
liListValues.Visible = userIsSuperAdmin;
liDivider1.Visible = userIsSuperAdmin;
+18 -9
View File
@@ -75,15 +75,6 @@ namespace C2P.WebUserControls {
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl liImport;
/// <summary>
/// liRawMat 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 liRawMat;
/// <summary>
/// liPlants control.
/// </summary>
@@ -102,6 +93,24 @@ namespace C2P.WebUserControls {
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl liAgents;
/// <summary>
/// liRawMat 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 liRawMat;
/// <summary>
/// liPackage 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 liPackage;
/// <summary>
/// liDivider1 control.
/// </summary>
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -5,7 +5,7 @@
using System.Reflection;
[assembly: AssemblyVersion("2.3.190.544")]
[assembly: AssemblyFileVersion("2.3.190.544")]
[assembly: AssemblyVersion("2.3.191.544")]
[assembly: AssemblyFileVersion("2.3.191.544")]
[assembly: AssemblyCopyright("Proxima & Steamware © 2013-2015")]
[assembly: AssemblyCompany("Steamware")]
+2 -2
View File
@@ -6,8 +6,8 @@
using System.Reflection;
[assembly: AssemblyVersion("2.3.190.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("2.3.190.<#= this.RevisionNumber #>")]
[assembly: AssemblyVersion("2.3.191.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("2.3.191.<#= this.RevisionNumber #>")]
[assembly: AssemblyCopyright("Proxima & Steamware © 2013-<#= DateTime.Now.Year #>")]
[assembly: AssemblyCompany("Steamware")]
<#+