inizio a creare gestione impiego risorse...

This commit is contained in:
Samuele E. Locatelli
2015-03-17 18:19:00 +01:00
parent a88f4b5012
commit 3f8f96a4ca
13 changed files with 511 additions and 16 deletions
+152 -1
View File
@@ -20959,12 +20959,37 @@ ORDER BY numIntMtz DESC";
[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[1];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT idxImpiego, CodRisorsa, numIntMtz, QtaRisorsa, CostoUnit, TotImport FROM d" +
"bo.ImpiegoRisorse";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[1].Connection = this.Connection;
this._commandCollection[1].CommandText = "dbo.stp_ImpRis_delete";
this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxImpiego", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_ImpRis_insert";
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("@CodRisorsa", global::System.Data.SqlDbType.NVarChar, 10, 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("@numIntMtz", 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("@QtaRisorsa", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostoUnit", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[3].Connection = this.Connection;
this._commandCollection[3].CommandText = "dbo.stp_ImpRis_update";
this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxImpiego", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodRisorsa", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numIntMtz", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaRisorsa", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CostoUnit", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -21132,6 +21157,132 @@ ORDER BY numIntMtz DESC";
public virtual int Update(string CodRisorsa, int numIntMtz, global::System.Nullable<decimal> QtaRisorsa, global::System.Nullable<decimal> CostoUnit, int Original_idxImpiego) {
return this.Update(Original_idxImpiego, CodRisorsa, numIntMtz, QtaRisorsa, CostoUnit, Original_idxImpiego);
}
[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 deleteQuery(global::System.Nullable<int> Original_idxImpiego) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
if ((Original_idxImpiego.HasValue == true)) {
command.Parameters[1].Value = ((int)(Original_idxImpiego.Value));
}
else {
command.Parameters[1].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;
}
[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 insertQuery(string CodRisorsa, global::System.Nullable<int> numIntMtz, global::System.Nullable<decimal> QtaRisorsa, global::System.Nullable<decimal> CostoUnit) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2];
if ((CodRisorsa == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
else {
command.Parameters[1].Value = ((string)(CodRisorsa));
}
if ((numIntMtz.HasValue == true)) {
command.Parameters[2].Value = ((int)(numIntMtz.Value));
}
else {
command.Parameters[2].Value = global::System.DBNull.Value;
}
if ((QtaRisorsa.HasValue == true)) {
command.Parameters[3].Value = ((decimal)(QtaRisorsa.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((CostoUnit.HasValue == true)) {
command.Parameters[4].Value = ((decimal)(CostoUnit.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;
}
[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 updateQuery(global::System.Nullable<int> Original_idxImpiego, string CodRisorsa, global::System.Nullable<int> numIntMtz, global::System.Nullable<decimal> QtaRisorsa, global::System.Nullable<decimal> CostoUnit) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
if ((Original_idxImpiego.HasValue == true)) {
command.Parameters[1].Value = ((int)(Original_idxImpiego.Value));
}
else {
command.Parameters[1].Value = global::System.DBNull.Value;
}
if ((CodRisorsa == null)) {
command.Parameters[2].Value = global::System.DBNull.Value;
}
else {
command.Parameters[2].Value = ((string)(CodRisorsa));
}
if ((numIntMtz.HasValue == true)) {
command.Parameters[3].Value = ((int)(numIntMtz.Value));
}
else {
command.Parameters[3].Value = global::System.DBNull.Value;
}
if ((QtaRisorsa.HasValue == true)) {
command.Parameters[4].Value = ((decimal)(QtaRisorsa.Value));
}
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
if ((CostoUnit.HasValue == true)) {
command.Parameters[5].Value = ((decimal)(CostoUnit.Value));
}
else {
command.Parameters[5].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>
+42 -1
View File
@@ -1629,7 +1629,48 @@ WHERE (idxCausale = @Original_idxCausale)</CommandText>
<Mapping SourceColumn="CostoUnit" DataSetColumn="CostoUnit" />
<Mapping SourceColumn="TotImport" DataSetColumn="TotImport" />
</Mappings>
<Sources />
<Sources>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_ImpRis_delete" DbObjectType="StoredProcedure" 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">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ImpRis_delete</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="int" DbType="Int32" Direction="Input" ParameterName="@Original_idxImpiego" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_ImpRis_insert" DbObjectType="StoredProcedure" 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">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ImpRis_insert</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="@CodRisorsa" Precision="0" ProviderType="NVarChar" Scale="0" Size="10" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@numIntMtz" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@QtaRisorsa" Precision="18" ProviderType="Decimal" Scale="6" Size="9" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@CostoUnit" Precision="18" ProviderType="Decimal" Scale="6" Size="9" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GIMConnectionString (Web.config)" DbObjectName="GIM.dbo.stp_ImpRis_update" DbObjectType="StoredProcedure" 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">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_ImpRis_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="int" DbType="Int32" Direction="Input" ParameterName="@Original_idxImpiego" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@CodRisorsa" Precision="0" ProviderType="NVarChar" Scale="0" Size="10" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@numIntMtz" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@QtaRisorsa" Precision="18" ProviderType="Decimal" Scale="6" Size="9" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="decimal" DbType="Decimal" Direction="Input" ParameterName="@CostoUnit" Precision="18" ProviderType="Decimal" Scale="6" Size="9" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources>
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="AnagTipoRisorsaTableAdapter" GeneratorDataComponentClassName="AnagTipoRisorsaTableAdapter" Name="AnagTipoRisorsa" UserDataComponentName="AnagTipoRisorsaTableAdapter">
<MainSource>
+9 -9
View File
@@ -4,7 +4,7 @@
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="-10" ViewPortY="-53" 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="-10" ViewPortY="64" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:LogUpdateDb" ZOrder="39" X="36" Y="19" Height="122" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
<Shape ID="DesignTable:AnagAmbitoGuasto" ZOrder="38" X="475" Y="7" Height="134" Width="251" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
@@ -20,14 +20,14 @@
<Shape ID="DesignTable:MtzProgPending" ZOrder="27" X="821" Y="791" Height="249" Width="235" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="162" />
<Shape ID="DesignTable:MtzProgrammata" ZOrder="12" X="1141" Y="749" Height="306" Width="241" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="198" />
<Shape ID="DesignTable:CalendFesteFerie" ZOrder="10" X="76" Y="939" Height="134" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:OreAperturaSett" ZOrder="18" X="366" Y="836" Height="191" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:OreAperturaSett" ZOrder="18" X="379" Y="855" Height="191" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:FiltroImpianti" ZOrder="22" X="1399" Y="644" Height="122" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
<Shape ID="DesignTable:FiltroMacchine" ZOrder="23" X="1410" Y="168" Height="122" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
<Shape ID="DesignTable:FiltroStati" ZOrder="21" X="764" Y="7" Height="122" Width="229" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" />
<Shape ID="DesignTable:AnagCausali" ZOrder="17" X="1433" Y="-40" Height="156" Width="192" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" />
<Shape ID="DesignTable:AnagrOperMtz" ZOrder="15" X="531" Y="669" Height="145" Width="223" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="77" />
<Shape ID="DesignTable:v_mtzProgExp" ZOrder="8" X="6" Y="313" Height="343" Width="209" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:ImpiegoRisorse" ZOrder="1" X="249" Y="583" Height="191" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:ImpiegoRisorse" ZOrder="1" X="248" Y="587" Height="248" Width="222" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="140" />
<Shape ID="DesignTable:AnagTipoRisorsa" ZOrder="5" X="10" Y="738" Height="191" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
</Shapes>
<Connectors>
@@ -219,11 +219,11 @@
</Point>
<Point>
<X>141</X>
<Y>681</Y>
<Y>690</Y>
</Point>
<Point>
<X>249</X>
<Y>681</Y>
<X>248</X>
<Y>690</Y>
</Point>
</RoutePoints>
</Connector>
@@ -235,11 +235,11 @@
</Point>
<Point>
<X>569</X>
<Y>642</Y>
<Y>651</Y>
</Point>
<Point>
<X>460</X>
<Y>642</Y>
<X>470</X>
<Y>651</Y>
</Point>
</RoutePoints>
</Connector>
Binary file not shown.
Binary file not shown.
+8
View File
@@ -1069,6 +1069,13 @@
<Compile Include="WebUserControls\mod_impianti.ascx.designer.cs">
<DependentUpon>mod_impianti.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_impiegoRisorse.ascx.cs">
<DependentUpon>mod_impiegoRisorse.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_impiegoRisorse.ascx.designer.cs">
<DependentUpon>mod_impiegoRisorse.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_insertRichiesta.ascx.cs">
<DependentUpon>mod_insertRichiesta.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1367,6 +1374,7 @@
<Content Include="WebUserControls\mod_gestCausali.ascx" />
<Content Include="WebUserControls\mod_gestUtentiGIM.ascx" />
<Content Include="WebUserControls\mod_impianti.ascx" />
<Content Include="WebUserControls\mod_impiegoRisorse.ascx" />
<Content Include="WebUserControls\mod_insertRichiesta.ascx" />
<Content Include="WebUserControls\mod_interventoOpMtz.ascx" />
<Content Include="WebUserControls\mod_lemmiVocab.ascx" />
@@ -1,9 +1,10 @@
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_dettaglioIntervento"
CodeBehind="mod_dettaglioIntervento.ascx.cs" %>
<%@ Register Src="~/WebUserControls/mod_interventoOpMtz.ascx" TagName="mod_interventoOpMtz"
TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_interventoOpMtz.ascx" TagName="mod_interventoOpMtz" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/WebUserControls/mod_dataOra.ascx" TagName="mod_dataOra" TagPrefix="uc2" %>
<%@ Register Src="~/WebUserControls/mod_impiegoRisorse.ascx" TagPrefix="uc3" TagName="mod_impiegoRisorse" %>
<div style="text-align: center; width: 100%;">
<div style="float: left; margin: 2px;">
<asp:LinkButton ID="btnElenco" runat="server" OnClick="btnElenco_Click" />
@@ -210,7 +211,10 @@
SelectMethod="GetData" TypeName="GIM_data.DS_utilityTableAdapters.v_selStatoTableAdapter"></asp:ObjectDataSource>
</td>
<td rowspan="3" style="vertical-align: top; padding-left: 30px;">
<uc1:mod_interventoOpMtz ID="mod_interventoOpMtz3" runat="server" vistaModulo="selezione" />
<uc1:mod_interventoOpMtz ID="mod_interventoOpMtz0" runat="server" vistaModulo="selezione" />
</td>
<td rowspan="3" style="vertical-align: top; padding-left: 30px;">
<uc3:mod_impiegoRisorse ID="mod_impiegoRisorse0" runat="server" vistaModulo="selezione" />
</td>
</tr>
<tr>
@@ -431,7 +435,10 @@
SelectMethod="GetData" TypeName="GIM_data.DS_utilityTableAdapters.v_selStatoTableAdapter"></asp:ObjectDataSource>
</td>
<td rowspan="3" style="vertical-align: top; padding-left: 30px;">
<uc1:mod_interventoOpMtz ID="mod_interventoOpMtz2" runat="server" vistaModulo="editing" />
<uc1:mod_interventoOpMtz ID="mod_interventoOpMtz1" runat="server" vistaModulo="editing" />
</td>
<td rowspan="3" style="vertical-align: top; padding-left: 30px;">
<uc3:mod_impiegoRisorse runat="server" id="mod_impiegoRisorse1" vistaModulo="editing" />
</td>
</tr>
<tr>
@@ -681,7 +688,10 @@
SelectMethod="GetData" TypeName="GIM_data.DS_utilityTableAdapters.v_selStatoTableAdapter"></asp:ObjectDataSource>
</td>
<td rowspan="3" style="vertical-align: top; padding-left: 30px;">
<uc1:mod_interventoOpMtz ID="mod_interventoOpMtz4" runat="server" vistaModulo="editing" />
<uc1:mod_interventoOpMtz ID="mod_interventoOpMtz2" runat="server" vistaModulo="editing" />
</td>
<td rowspan="3" style="vertical-align: top; padding-left: 30px;">
<uc3:mod_impiegoRisorse runat="server" id="mod_impiegoRisorse2" vistaModulo="editing" />
</td>
</tr>
<tr>
@@ -0,0 +1,111 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_impiegoRisorse.ascx.cs" Inherits="GIM_site.WebUserControls.mod_impiegoRisorse" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
DataKeyNames="numIntMtz,matrOp" DataSourceID="ods" OnDataBound="grView_DataBound"
OnRowEditing="grView_RowEditing">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
Visible='<%# isOnEdit %>' />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<HeaderTemplate>
<asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click"
Visible="false" />
</HeaderTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
Visible="false" ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>'
Visible='<%# isOnEdit %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="numIntMtz" HeaderText="numIntMtz" InsertVisible="False"
Visible="false" ReadOnly="True" SortExpression="numIntMtz" />
<asp:TemplateField HeaderText="matrOp" SortExpression="matrOp">
<EditItemTemplate>
<asp:DropDownList ID="listOp" runat="server" DataSourceID="odsOpMtz" DataTextField="label"
DataValueField="value" AutoPostBack="true" SelectedValue='<%# Bind("matrOp") %>'>
</asp:DropDownList>
<asp:ObjectDataSource ID="odsOpMtz" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getData" TypeName="GIM_data.DS_utilityTableAdapters.v_selOperMtzTableAdapter">
</asp:ObjectDataSource>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lbl_matrOp" runat="server" Text='<%# traduciMatrOp(Eval("matrOp")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="durataMinuti" SortExpression="durataMinuti">
<EditItemTemplate>
<asp:TextBox ID="txt_durataMinuti" runat="server" Width="5em" Text='<%# Bind("durataMinuti") %>'></asp:TextBox>
<cc1:FilteredTextBoxExtender ID="ftbe_minuti" TargetControlID="txt_durataMinuti"
runat="server" FilterType="Numbers">
</cc1:FilteredTextBoxExtender>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lbl_durataMinuti" runat="server" Text='<%# Eval("durataMinuti") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
Visible='<%# canInsertNew() %>' />
</HeaderTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update"
ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel"
ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete"
Visible='<%# isOnEdit %>' ToolTip='<%# traduci("Delete") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.elimina, SteamWare.dimImg.small) %>' />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>'
TargetControlID="imgDelete">
</cc1:ConfirmButtonExtender>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini"></asp:Label>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="getByNumIntMtz" TypeName="GIM_data.DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter"
UpdateMethod="UpdateQuery" DeleteMethod="Delete" OldValuesParameterFormatString="Original_{0}"
InsertMethod="Insert">
<UpdateParameters>
<asp:Parameter Name="matrOp" Type="String" />
<asp:Parameter Name="durataMinuti" Type="Int32" />
<asp:Parameter Name="Original_numIntMtz" Type="Int32" />
<asp:Parameter Name="Original_matrOp" Type="String" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="Original_numIntMtz" Type="Int32" />
<asp:Parameter Name="Original_matrOp" Type="String" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="numIntMtz" SessionField="numIntMtz_sel"
Type="Int32" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="numIntMtz" Type="Int32" />
<asp:Parameter Name="matrOp" Type="String" />
<asp:Parameter Name="durataMinuti" Type="Int32" />
</InsertParameters>
</asp:ObjectDataSource>
@@ -0,0 +1,132 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace GIM_site.WebUserControls
{
public partial class mod_impiegoRisorse : ApplicationUserControl
{
public event EventHandler eh_resetSelezione;
/// <summary>
/// evento dati associati a controllo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
/// <summary>
/// reset delle selezioni
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// seleziono valore in editing...
/// </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>
/// gestione evento inserimento nuovo record standard (se ZERO presenti)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNewFromEmpty_Click(object sender, EventArgs e)
{
// reset selezione...
resetSelezione();
int numIntMtz = memLayer.ML.IntSessionObj("numIntMtz_sel");
string matr = memLayer.ML.confReadString("defaultMatr");
TA_app.obj.taIntOpMtz.Insert(numIntMtz, matr, 0);
grView.DataBind();
}
/// <summary>
/// restituisce un booleano se sia abilitato inserimento nuovi valori (solo se NON C'E' GIA' un operatore con amtricola di default...)
/// </summary>
/// <returns></returns>
public bool canInsertNew()
{
bool answ = false;
int numIntMtz = memLayer.ML.IntSessionObj("numIntMtz_sel");
string matr = memLayer.ML.confReadString("defaultMatr");
try
{
answ = (TA_app.obj.taIntOpMtz.getByMatrNumIntMtz(numIntMtz, matr).Rows.Count == 0);
}
catch
{ }
return (answ && isOnEdit);
}
/// <summary>
/// restituisce true se il controllo è in modalità editing (e non selezione...)
/// </summary>
public bool isOnEdit
{
get
{
return _vistaModulo == tipoVistaMod.editing;
}
}
/// <summary>
/// traduce matricola in matr + cognome + nome
/// </summary>
/// <param name="matr"></param>
/// <returns></returns>
public string traduciMatrOp(object matr)
{
string answ = "";
try
{
answ = TA_app.obj.taSelMatrOp.getByValue(matr.ToString())[0].label;
}
catch
{ }
return answ;
}
}
}
@@ -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 GIM_site.WebUserControls {
public partial class mod_impiegoRisorse {
/// <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;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.