completato editing package
This commit is contained in:
Samuele E. Locatelli
2015-05-29 15:24:37 +02:00
parent 214038d1de
commit 44f4e0f1aa
17 changed files with 1250 additions and 93 deletions
+24 -28
View File
@@ -1,35 +1,32 @@
<%@ 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:LinkButton ID="lbtNew" runat="server" OnClick="lbtNew_Click" CssClass="btn btn-success"><%: traduci("btnNewRawMat") %></asp:LinkButton>
<asp:LinkButton ID="lbtNew" runat="server" OnClick="lbtNew_Click" CssClass="btn btn-success"><%: traduci("btnNewPackage") %></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="RawMat" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered" OnRowEditing="grView_RowEditing">
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CodPackag" DataSourceID="ods" OnDataBound="grView_DataBound" CssClass="table table-striped table-bordered" OnRowEditing="grView_RowEditing">
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<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='<%# Eval("RawMat")!="" %>'><i class="fa fa-edit fa-2x"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbEdit" CausesValidation="false" CommandName="Edit" Visible='<%# Eval("CodPackag")!="" %>'><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" DataFormatString="{0:C4}" />
<asp:BoundField DataField="ProcYield" HeaderText="ProcYield" SortExpression="ProcYield" DataFormatString="{0:P2}" />
<asp:BoundField DataField="CSR" HeaderText="CSR" SortExpression="CSR" DataFormatString="{0:P2}" />
<asp:BoundField DataField="SSR" HeaderText="SSR" SortExpression="SSR" DataFormatString="{0:P2}" />
<asp:BoundField DataField="SSVA" HeaderText="SSVA" SortExpression="SSVA" DataFormatString="{0:P2}" />
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" DataFormatString="{0:P2}" />
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" DataFormatString="{0:C4}" />
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" DataFormatString="{0:C4}" />
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:BoundField DataField="CodPackag" HeaderText="CodPackag" SortExpression="CodPackag" />
<asp:BoundField DataField="PackagDesc" HeaderText="PackagDesc" SortExpression="PackagDesc" />
<asp:BoundField DataField="RMCost" HeaderText="RMCost" SortExpression="RMCost" />
<asp:BoundField DataField="RMWeight" HeaderText="RMWeight" SortExpression="RMWeight" />
<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='<%# Eval("RawMat")!="" %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbDelete" CausesValidation="false" CommandName="Delete" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' Visible='<%# Eval("CodPackag")!="" %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
@@ -38,26 +35,25 @@
</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}%' " InsertMethod="insertQuery">
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="C2P_Data.DS_QuotesTableAdapters.PackagDetTableAdapter" UpdateMethod="updateQuery" DeleteMethod="deleteQuery" OldValuesParameterFormatString="Original_{0}" FilterExpression="CodPackag LIKE '%{0}%' OR PackagDesc LIKE '%{0}%' " InsertMethod="insertQuery">
<DeleteParameters>
<asp:Parameter Name="Original_RawMat" Type="String" />
<asp:Parameter Name="Original_CodPackag" Type="String" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
</FilterParameters>
<InsertParameters>
<asp:Parameter Name="RawMat" Type="String" />
<asp:Parameter Name="CodPackag" Type="String" />
<asp:Parameter Name="PackagDesc" Type="String" />
<asp:Parameter Name="RMCost" Type="Decimal" />
<asp:Parameter Name="RMWeight" Type="Decimal" />
</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" />
<asp:Parameter Name="CodPackag" Type="String" />
<asp:Parameter Name="PackagDesc" Type="String" />
<asp:Parameter Name="RMCost" Type="Decimal" />
<asp:Parameter Name="RMWeight" Type="Decimal" />
<asp:Parameter Name="Original_CodPackag" Type="String" />
</UpdateParameters>
</asp:ObjectDataSource>
</div>
+19 -20
View File
@@ -22,7 +22,6 @@ namespace C2P.WebUserControls
txtNewVal.Text = "";
}
}
/// <summary>
/// inserisco nel db il nuovo lemma...
/// </summary>
@@ -32,24 +31,6 @@ namespace C2P.WebUserControls
{
creaNuovo();
}
/// <summary>
/// creazione nuovo lemma
/// </summary>
private void creaNuovo()
{
if (txtNewVal.Text != "")
{
// inserisco
DtProxy.man.taRMD.insertQuery(txtNewVal.Text.Trim());
// metto in campo ricerca...
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
// svuoto campo text
txtNewVal.Text = "";
// riparto...
Response.Redirect(user_std.pagCorrente);
}
}
/// <summary>
/// dimensione pagina grid view
/// </summary>
@@ -103,7 +84,6 @@ namespace C2P.WebUserControls
// seleziono la riga corrente...
grView.SelectedIndex = e.NewEditIndex;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
@@ -112,5 +92,24 @@ namespace C2P.WebUserControls
grView.SelectedIndex = -1;
grView.DataBind();
}
/// <summary>
/// creazione nuovo lemma
/// </summary>
private void creaNuovo()
{
if (txtNewVal.Text != "")
{
// inserisco
DtProxy.man.taPD.insertQuery(txtNewVal.Text.Trim(), txtNewVal.Text.Trim(), 0, 1);
// metto in campo ricerca...
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
// svuoto campo text
txtNewVal.Text = "";
// riparto...
Response.Redirect(user_std.pagCorrente);
}
}
}
}
+4 -2
View File
@@ -7,7 +7,7 @@
<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" OnRowEditing="grView_RowEditing">
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<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>
@@ -25,8 +25,10 @@
<asp:BoundField DataField="SSVR" HeaderText="SSVR" SortExpression="SSVR" DataFormatString="{0:P2}" />
<asp:BoundField DataField="ExtraMatCost" HeaderText="ExtraMatCost" SortExpression="ExtraMatCost" DataFormatString="{0:C4}" />
<asp:BoundField DataField="ExtraServCost" HeaderText="ExtraServCost" SortExpression="ExtraServCost" DataFormatString="{0:C4}" />
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<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='<%# Eval("RawMat")!="" %>'><i class="fa fa-trash-o fa-2x"></i></asp:LinkButton>
+19 -22
View File
@@ -21,7 +21,6 @@ namespace C2P.WebUserControls
txtNewVal.Text = "";
}
}
/// <summary>
/// inserisco nel db il nuovo lemma...
/// </summary>
@@ -31,24 +30,6 @@ namespace C2P.WebUserControls
{
creaNuovo();
}
/// <summary>
/// creazione nuovo lemma
/// </summary>
private void creaNuovo()
{
if (txtNewVal.Text != "")
{
// inserisco
DtProxy.man.taRMD.insertQuery(txtNewVal.Text.Trim());
// metto in campo ricerca...
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
// svuoto campo text
txtNewVal.Text = "";
// riparto...
Response.Redirect(user_std.pagCorrente);
}
}
/// <summary>
/// dimensione pagina grid view
/// </summary>
@@ -101,8 +82,7 @@ namespace C2P.WebUserControls
{
// seleziono la riga corrente...
grView.SelectedIndex = e.NewEditIndex;
}
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
@@ -111,6 +91,23 @@ namespace C2P.WebUserControls
grView.SelectedIndex = -1;
grView.DataBind();
}
/// <summary>
/// creazione nuovo lemma
/// </summary>
private void creaNuovo()
{
if (txtNewVal.Text != "")
{
// inserisco
DtProxy.man.taRMD.insertQuery(txtNewVal.Text.Trim());
// metto in campo ricerca...
memLayer.ML.setSessionVal("valoreCercato", txtNewVal.Text.Trim());
// svuoto campo text
txtNewVal.Text = "";
// riparto...
Response.Redirect(user_std.pagCorrente);
}
}
}
}
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -1
View File
@@ -5,7 +5,9 @@
</configSections>
<connectionStrings>
<add name="C2P_Data.Properties.Settings.C2PConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=C2P;Persist Security Info=True;User ID=sa;Password=keyhammer;MultipleActiveResultSets=True;Application Name=EntityFramework" providerName="System.Data.SqlClient" />
<add name="C2P_Data.Properties.Settings.C2PConnectionString"
connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=C2P;Persist Security Info=True;User ID=sa;Password=keyhammer;MultipleActiveResultSets=True;Application Name=EntityFramework"
providerName="System.Data.SqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
+1012
View File
File diff suppressed because it is too large Load Diff
+127 -1
View File
@@ -2,9 +2,10 @@
<xs:schema id="DS_Quotes" targetNamespace="http://tempuri.org/DS_Quotes.xsd" xmlns:mstns="http://tempuri.org/DS_Quotes.xsd" xmlns="http://tempuri.org/DS_Quotes.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="1" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="C2PConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="C2PConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.C2P_Data.Properties.Settings.GlobalReference.Default.C2PConnectionString" Provider="System.Data.SqlClient" />
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="C2P_DataConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="C2P_DataConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.C2P_Data.Properties.Settings.GlobalReference.Default.C2P_DataConnectionString" Provider="System.Data.SqlClient" />
</Connections>
<Tables>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="QuoteListTableAdapter" GeneratorDataComponentClassName="QuoteListTableAdapter" Name="QuoteList" UserDataComponentName="QuoteListTableAdapter">
@@ -1494,6 +1495,105 @@ FROM RawMatDet</CommandText>
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PackagDetTableAdapter" GeneratorDataComponentClassName="PackagDetTableAdapter" Name="PackagDet" UserDataComponentName="PackagDetTableAdapter">
<MainSource>
<DbSource ConnectionRef="C2PConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" 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">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [dbo].[PackagDet] WHERE (([CodPackag] = @Original_CodPackag) AND ([PackagDesc] = @Original_PackagDesc) AND ([RMCost] = @Original_RMCost) AND ([RMWeight] = @Original_RMWeight))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodPackag" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_PackagDesc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="PackagDesc" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_RMCost" Precision="9" ProviderType="Decimal" Scale="3" Size="0" SourceColumn="RMCost" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_RMWeight" Precision="9" ProviderType="Decimal" Scale="4" Size="0" SourceColumn="RMWeight" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>INSERT INTO [dbo].[PackagDet] ([CodPackag], [PackagDesc], [RMCost], [RMWeight]) VALUES (@CodPackag, @PackagDesc, @RMCost, @RMWeight);
SELECT CodPackag, PackagDesc, RMCost, RMWeight FROM PackagDet WHERE (CodPackag = @CodPackag)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodPackag" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@PackagDesc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="PackagDesc" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RMCost" Precision="9" ProviderType="Decimal" Scale="3" Size="0" SourceColumn="RMCost" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RMWeight" Precision="9" ProviderType="Decimal" Scale="4" Size="0" SourceColumn="RMWeight" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT CodPackag, PackagDesc, RMCost, RMWeight FROM dbo.PackagDet</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>UPDATE [dbo].[PackagDet] SET [CodPackag] = @CodPackag, [PackagDesc] = @PackagDesc, [RMCost] = @RMCost, [RMWeight] = @RMWeight WHERE (([CodPackag] = @Original_CodPackag) AND ([PackagDesc] = @Original_PackagDesc) AND ([RMCost] = @Original_RMCost) AND ([RMWeight] = @Original_RMWeight));
SELECT CodPackag, PackagDesc, RMCost, RMWeight FROM PackagDet WHERE (CodPackag = @CodPackag)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodPackag" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@PackagDesc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="PackagDesc" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RMCost" Precision="9" ProviderType="Decimal" Scale="3" Size="0" SourceColumn="RMCost" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@RMWeight" Precision="9" ProviderType="Decimal" Scale="4" Size="0" SourceColumn="RMWeight" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodPackag" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_PackagDesc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="PackagDesc" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_RMCost" Precision="9" ProviderType="Decimal" Scale="3" Size="0" SourceColumn="RMCost" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_RMWeight" Precision="9" ProviderType="Decimal" Scale="4" Size="0" SourceColumn="RMWeight" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="CodPackag" DataSetColumn="CodPackag" />
<Mapping SourceColumn="PackagDesc" DataSetColumn="PackagDesc" />
<Mapping SourceColumn="RMCost" DataSetColumn="RMCost" />
<Mapping SourceColumn="RMWeight" DataSetColumn="RMWeight" />
</Mappings>
<Sources>
<DbSource ConnectionRef="C2PConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="deleteQuery" Modifier="Public" Name="deleteQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="deleteQuery">
<DeleteCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PD_deleteQuery</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="nvarchar" DbType="String" Direction="Input" ParameterName="@Original_CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</DeleteCommand>
</DbSource>
<DbSource ConnectionRef="C2PConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="insertQuery" Modifier="Public" Name="insertQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="insertQuery">
<InsertCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PD_insertQuery</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="nvarchar" DbType="String" Direction="Input" ParameterName="@CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@PackagDesc" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@RMCost" Precision="9" ProviderType="Decimal" Scale="3" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@RMWeight" Precision="9" ProviderType="Decimal" Scale="4" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
</DbSource>
<DbSource ConnectionRef="C2PConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="updateQuery" Modifier="Public" Name="updateQuery" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="updateQuery">
<UpdateCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PD_updateQuery</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="nvarchar" DbType="String" Direction="Input" ParameterName="@CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@PackagDesc" Precision="0" ProviderType="NVarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@RMCost" Precision="9" ProviderType="Decimal" Scale="3" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@RMWeight" Precision="9" ProviderType="Decimal" Scale="4" Size="5" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@Original_CodPackag" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</Sources>
</TableAdapter>
</Tables>
<Sources />
</DataSource>
@@ -2857,6 +2957,28 @@ FROM RawMatDet</CommandText>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PackagDet" msprop:Generator_TableClassName="PackagDetDataTable" msprop:Generator_TableVarName="tablePackagDet" msprop:Generator_TablePropName="PackagDet" msprop:Generator_RowDeletingName="PackagDetRowDeleting" msprop:Generator_RowChangingName="PackagDetRowChanging" msprop:Generator_RowEvHandlerName="PackagDetRowChangeEventHandler" msprop:Generator_RowDeletedName="PackagDetRowDeleted" msprop:Generator_UserTableName="PackagDet" msprop:Generator_RowChangedName="PackagDetRowChanged" msprop:Generator_RowEvArgName="PackagDetRowChangeEvent" msprop:Generator_RowClassName="PackagDetRow">
<xs:complexType>
<xs:sequence>
<xs:element name="CodPackag" msprop:Generator_ColumnVarNameInTable="columnCodPackag" msprop:Generator_ColumnPropNameInRow="CodPackag" msprop:Generator_ColumnPropNameInTable="CodPackagColumn" msprop:Generator_UserColumnName="CodPackag">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PackagDesc" msprop:Generator_ColumnVarNameInTable="columnPackagDesc" msprop:Generator_ColumnPropNameInRow="PackagDesc" msprop:Generator_ColumnPropNameInTable="PackagDescColumn" msprop:Generator_UserColumnName="PackagDesc">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="RMCost" msprop:Generator_ColumnVarNameInTable="columnRMCost" msprop:Generator_ColumnPropNameInRow="RMCost" msprop:Generator_ColumnPropNameInTable="RMCostColumn" msprop:Generator_UserColumnName="RMCost" type="xs:decimal" />
<xs:element name="RMWeight" msprop:Generator_ColumnVarNameInTable="columnRMWeight" msprop:Generator_ColumnPropNameInRow="RMWeight" msprop:Generator_ColumnPropNameInTable="RMWeightColumn" msprop:Generator_UserColumnName="RMWeight" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
@@ -2916,6 +3038,10 @@ FROM RawMatDet</CommandText>
<xs:selector xpath=".//mstns:RawMatDet" />
<xs:field xpath="mstns:RawMat" />
</xs:unique>
<xs:unique name="PackagDet_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:PackagDet" />
<xs:field xpath="mstns:CodPackag" />
</xs:unique>
</xs:element>
<xs:annotation>
<xs:appinfo>
+20 -19
View File
@@ -4,24 +4,25 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="30" ViewPortY="606" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="30" ViewPortY="399" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:QuoteList" ZOrder="6" X="462" Y="129" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="275" />
<Shape ID="DesignTable:QuoteRM" ZOrder="16" X="122" Y="271" Height="324" Width="264" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteWorkExt" ZOrder="17" X="102" Y="35" Height="210" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:QuoteWorkInt" ZOrder="15" X="882" Y="11" Height="305" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteParam" ZOrder="13" X="486" Y="720" Height="210" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:QuoteOC" ZOrder="11" X="889" Y="418" Height="305" Width="197" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteFull_Q" ZOrder="5" X="40" Y="606" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteFull_S" ZOrder="8" X="854" Y="760" Height="305" Width="213" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:RawMatDet" ZOrder="2" X="375" Y="1008" Height="324" Width="255" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
<Shape ID="DesignTable:StdCostList" ZOrder="7" X="981" Y="1087" Height="343" Width="209" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_checkValidQuote" ZOrder="4" X="46" Y="1127" Height="96" Width="223" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
<Shape ID="DesignTable:prtQuote" ZOrder="1" X="685" Y="1103" Height="305" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_chekLastRevQuote" ZOrder="3" X="68" Y="1321" Height="96" Width="275" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
<Shape ID="DesignTable:QuoteList" ZOrder="7" X="462" Y="129" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="275" />
<Shape ID="DesignTable:QuoteRM" ZOrder="17" X="122" Y="271" Height="324" Width="264" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteWorkExt" ZOrder="18" X="102" Y="35" Height="210" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:QuoteWorkInt" ZOrder="16" X="882" Y="11" Height="305" Width="228" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteParam" ZOrder="14" X="486" Y="720" Height="210" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:QuoteOC" ZOrder="12" X="889" Y="418" Height="305" Width="197" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteFull_Q" ZOrder="6" X="40" Y="606" Height="457" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:QuoteFull_S" ZOrder="9" X="854" Y="760" Height="305" Width="213" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:RawMatDet" ZOrder="3" X="375" Y="1008" Height="324" Width="255" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
<Shape ID="DesignTable:StdCostList" ZOrder="8" X="981" Y="1087" Height="343" Width="209" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_checkValidQuote" ZOrder="5" X="46" Y="1127" Height="96" Width="223" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
<Shape ID="DesignTable:prtQuote" ZOrder="2" X="685" Y="1103" Height="305" Width="198" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_chekLastRevQuote" ZOrder="4" X="68" Y="1321" Height="96" Width="275" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
<Shape ID="DesignTable:PackagDet" ZOrder="1" X="1120" Y="752" Height="210" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
</Shapes>
<Connectors>
<Connector ID="DesignRelation:FK_QuoteRM_QuoteList" ZOrder="18" LineWidth="11">
<Connector ID="DesignRelation:FK_QuoteRM_QuoteList" ZOrder="19" LineWidth="11">
<RoutePoints>
<Point>
<X>462</X>
@@ -33,7 +34,7 @@
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_QuoteWorkExt_QuoteList" ZOrder="9" LineWidth="11">
<Connector ID="DesignRelation:FK_QuoteWorkExt_QuoteList" ZOrder="10" LineWidth="11">
<RoutePoints>
<Point>
<X>462</X>
@@ -45,7 +46,7 @@
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_QuoteWorkInt_QuoteList" ZOrder="14" LineWidth="11">
<Connector ID="DesignRelation:FK_QuoteWorkInt_QuoteList" ZOrder="15" LineWidth="11">
<RoutePoints>
<Point>
<X>645</X>
@@ -61,7 +62,7 @@
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_QuoteParam_QuoteList" ZOrder="12" LineWidth="11">
<Connector ID="DesignRelation:FK_QuoteParam_QuoteList" ZOrder="13" LineWidth="11">
<RoutePoints>
<Point>
<X>559</X>
@@ -73,7 +74,7 @@
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:FK_QuoteExtra_QuoteList" ZOrder="10" LineWidth="11">
<Connector ID="DesignRelation:FK_QuoteExtra_QuoteList" ZOrder="11" LineWidth="11">
<RoutePoints>
<Point>
<X>745</X>
+3
View File
@@ -57,6 +57,7 @@ namespace C2P_Data
/// </summary>
protected virtual void avvioTableAdapters()
{
taPD = new DS_QuotesTableAdapters.PackagDetTableAdapter();
taQL = new DS_QuotesTableAdapters.QuoteListTableAdapter();
taQFQ = new DS_QuotesTableAdapters.QuoteFull_QTableAdapter();
taQRM = new DS_QuotesTableAdapters.QuoteRMTableAdapter();
@@ -84,6 +85,7 @@ namespace C2P_Data
{
string connStr = memLayer.ML.confReadString("C2PConnectionString");
// connections del db vocabolario
taPD.Connection.ConnectionString = connStr;
taQL.Connection.ConnectionString = connStr;
taQFQ.Connection.ConnectionString = connStr;
taQRM.Connection.ConnectionString = connStr;
@@ -109,6 +111,7 @@ namespace C2P_Data
#region area public
public DS_QuotesTableAdapters.PackagDetTableAdapter taPD;
public DS_QuotesTableAdapters.QuoteListTableAdapter taQL;
public DS_QuotesTableAdapters.QuoteFull_QTableAdapter taQFQ;
public DS_QuotesTableAdapters.QuoteRMTableAdapter taQRM;
+11
View File
@@ -34,5 +34,16 @@ namespace C2P_Data.Properties {
return ((string)(this["C2PConnectionString"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=10.74.82.217\\SQL2008R2;Initial Catalog=C2P_Data;Persist Security Info" +
"=True;User ID=sa;Password=keyhammer")]
public string C2P_DataConnectionString {
get {
return ((string)(this["C2P_DataConnectionString"]));
}
}
}
}
+8
View File
@@ -10,5 +10,13 @@
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=10.74.82.217\SQL2008R2;Initial Catalog=C2P;Persist Security Info=True;User ID=sa;Password=keyhammer;MultipleActiveResultSets=True;Application Name=EntityFramework</Value>
</Setting>
<Setting Name="C2P_DataConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=10.74.82.217\SQL2008R2;Initial Catalog=C2P_Data;Persist Security Info=True;User ID=sa;Password=keyhammer&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=10.74.82.217\SQL2008R2;Initial Catalog=C2P_Data;Persist Security Info=True;User ID=sa;Password=keyhammer</Value>
</Setting>
</Settings>
</SettingsFile>
Binary file not shown.
Binary file not shown.
Binary file not shown.