Gestione Update prezzo offerto e ricalcolo

This commit is contained in:
Samuele E. Locatelli
2014-02-07 15:44:32 +01:00
parent 69883de691
commit 5a564ec45c
19 changed files with 106 additions and 8 deletions
BIN
View File
Binary file not shown.
+1
View File
@@ -194,6 +194,7 @@
<Content Include="Content\themes\base\minified\jquery.ui.theme.min.css" />
<Content Include="Content\themes\base\minified\jquery.ui.tooltip.min.css" />
<Content Include="Help.aspx" />
<Content Include="help\index.html" />
<Content Include="Images\accent.png" />
<Content Include="Images\AdminArea.png" />
<Content Include="Images\apply_l.png" />
+2
View File
@@ -4,4 +4,6 @@
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<p>
<img alt="Work In Progress" class="auto-style1" src="Images/WorkInProgress.jpg" /></p>
</asp:Content>
+8
View File
@@ -1,7 +1,15 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Simulation.aspx.cs" Inherits="C2P.Simulation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
.auto-style1 {
width: 402px;
height: 340px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<p>
<img alt="Work In Progress" class="auto-style1" src="Images/WorkInProgress.jpg" /></p>
</asp:Content>
+13 -6
View File
@@ -99,7 +99,7 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Quote" SortExpression="CodQuote">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("CodQuote") %>' />/<asp:Label ID="Label6" runat="server" Text='<%# Bind("QuoteRev") %>' />
<asp:Label ID="Label5" runat="server" Text='<%# Eval("CodQuote") %>' />/<asp:Label ID="Label6" runat="server" Text='<%# Eval("QuoteRev") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ClientName" HeaderText="Client" SortExpression="ClientName" ReadOnly="true" />
@@ -111,7 +111,7 @@
<asp:Label runat="server" ID="lblHeadRMFC" Text="RMFC" ToolTip="Raw Material Full Cost" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("RawMatFullCost", "{0:C3}") %>' />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("RawMatFullCost", "{0:C3}") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField SortExpression="FullCost">
@@ -119,7 +119,7 @@
<asp:Label runat="server" ID="lblHeadFC" Text="FC" ToolTip="Full Cost" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("FullCost", "{0:C3}") %>' />
<asp:Label ID="Label2" runat="server" Text='<%# Eval("FullCost", "{0:C3}") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField SortExpression="MinPrice">
@@ -127,15 +127,16 @@
<asp:Label runat="server" ID="lblHeadMP" Text="MP" ToolTip="Minimum Price" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("MinPrice", "{0:C3}") %>' />
<asp:Label ID="Label3" runat="server" Text='<%# Eval("MinPrice", "{0:C3}") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField SortExpression="PriceOff">
<HeaderTemplate>
<asp:Label runat="server" ID="lblHeadPO" Text="PO" ToolTip="Price Offeres" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("PriceOff", "{0:C3}") %>' CssClass='<%# priceVsCost(Eval("FullCost"),Eval("MinPrice"),Eval("PriceOff")) %>' />
<asp:Label ID="Label4" runat="server" Text='<%# Eval("PriceOff", "{0:C3}") %>' CssClass='<%# priceVsCost(Eval("FullCost"),Eval("MinPrice"),Eval("PriceOff")) %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPriceOff" runat="server" Text='<%# Bind("PriceOff") %>' Width="5em" />
@@ -156,9 +157,15 @@
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsQuotes" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.QuoteFull_QTableAdapter" FilterExpression="ClientName LIKE '%{0}%' OR RawMat LIKE '%{0}%' OR CodItem LIKE '%{0}%'">
<asp:ObjectDataSource ID="odsQuotes" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.QuoteFull_QTableAdapter" FilterExpression="ClientName LIKE '%{0}%' OR RawMat LIKE '%{0}%' OR CodItem LIKE '%{0}%'" UpdateMethod="QuoteFull_Q_update">
<FilterParameters>
<asp:SessionParameter SessionField="valoreRicerca" Type="String" DefaultValue="*" />
</FilterParameters>
<UpdateParameters>
<asp:Parameter Name="QuoteType" Type="String" />
<asp:Parameter Name="CodQuote" Type="Int64" />
<asp:Parameter Name="QuoteRev" Type="Int32" />
<asp:Parameter Name="PriceOff" Type="Decimal" />
</UpdateParameters>
</asp:ObjectDataSource>
</div>
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<p>
<img alt="Work In Progress" class="auto-style1" src="../Images/WorkInProgress.jpg" /></p>
</body>
</html>
Binary file not shown.
+56 -1
View File
@@ -11639,7 +11639,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "dbo.stp_QL_fullDataAll";
@@ -11654,6 +11654,15 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QuoteRev", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DoUpdate", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[2].Connection = this.Connection;
this._commandCollection[2].CommandText = "dbo.stp_QuoteFull_Q_update";
this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteType", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodQuote", global::System.Data.SqlDbType.BigInt, 8, global::System.Data.ParameterDirection.Input, 19, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QuoteRev", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PriceOff", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 9, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -11714,6 +11723,52 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas
this.Adapter.Fill(dataTable);
return dataTable;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int QuoteFull_Q_update(string Original_QuoteType, global::System.Nullable<long> Original_CodQuote, global::System.Nullable<int> Original_QuoteRev, global::System.Nullable<decimal> PriceOff) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
if ((Original_QuoteType == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(Original_QuoteType));
}
if ((Original_CodQuote.HasValue == true)) {
command.Parameters[2].Value = ((long)(Original_CodQuote.Value));
}
else {
command.Parameters[2].Value = global::System.DBNull.Value;
}
if ((Original_QuoteRev.HasValue == true)) {
command.Parameters[3].Value = ((int)(Original_QuoteRev.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((PriceOff.HasValue == true)) {
command.Parameters[4].Value = ((decimal)(PriceOff.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
}
/// <summary>
+15 -1
View File
@@ -649,7 +649,7 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="QuoteFull_QTableAdapter" GeneratorDataComponentClassName="QuoteFull_QTableAdapter" Name="QuoteFull_Q" UserDataComponentName="QuoteFull_QTableAdapter">
<MainSource>
<DbSource ConnectionRef="Proxima_C2PConnectionString (Settings)" DbObjectName="Proxima_C2P.dbo.stp_QL_fullDataAll" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DbSource ConnectionRef="Proxima_C2PConnectionString (Settings)" DbObjectName="Proxima_C2P.dbo.stp_QL_fullDataAll" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_QL_fullDataAll</CommandText>
@@ -757,6 +757,20 @@ SELECT QuoteType, CodQuote, QuoteRev, NumEx, ProcessNum, CodPlant, Class01, Clas
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="Proxima_C2PConnectionString (Settings)" DbObjectName="Proxima_C2P.dbo.stp_QuoteFull_Q_update" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="QuoteFull_Q_update" Modifier="Public" Name="QuoteFull_Q_update" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="QuoteFull_Q_update">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_QuoteFull_Q_update</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="char" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@Original_QuoteType" Precision="0" ProviderType="Char" Scale="0" Size="1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="bigint" DbType="Int64" Direction="Input" ParameterName="@Original_CodQuote" Precision="19" ProviderType="BigInt" Scale="0" Size="8" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_QuoteRev" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@PriceOff" Precision="9" ProviderType="Decimal" Scale="6" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources>
</TableAdapter>
</Tables>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.