- nuova tabella print job queue
- nuova classe gestioen con 3 stored
- nuovo metodo chiamata stampa cartellino ceh si ferma in base a valore semaforico tabella queue
This commit is contained in:
Samuele Locatelli
2013-07-23 19:59:22 +02:00
parent e2d03bc063
commit 70717189db
5 changed files with 1325 additions and 10 deletions
+1132 -1
View File
File diff suppressed because it is too large Load Diff
+147 -2
View File
@@ -350,6 +350,116 @@
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PrintJobQueueTableAdapter" GeneratorDataComponentClassName="PrintJobQueueTableAdapter" Name="PrintJobQueue" UserDataComponentName="PrintJobQueueTableAdapter">
<MainSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMWTest.dbo.PrintJobQueue" DbObjectType="Table" 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].[PrintJobQueue] WHERE (([IdxPrintJob] = @Original_IdxPrintJob) AND ([TipoCart] = @Original_TipoCart) AND ([UDC] = @Original_UDC) AND ([prtName] = @Original_prtName) AND ([dtStart] = @Original_dtStart) AND ((@IsNull_dtEnd = 1 AND [dtEnd] IS NULL) OR ([dtEnd] = @Original_dtEnd)) AND ([stato] = @Original_stato))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPrintJob" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPrintJob" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_TipoCart" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TipoCart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_prtName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="prtName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dtStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtStart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_dtEnd" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="dtEnd" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dtEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_stato" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="stato" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>INSERT INTO [dbo].[PrintJobQueue] ([TipoCart], [UDC], [prtName], [dtStart], [dtEnd], [stato]) VALUES (@TipoCart, @UDC, @prtName, @dtStart, @dtEnd, @stato);
SELECT IdxPrintJob, TipoCart, UDC, prtName, dtStart, dtEnd, stato FROM PrintJobQueue WHERE (IdxPrintJob = SCOPE_IDENTITY())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TipoCart" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TipoCart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@prtName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="prtName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dtStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtStart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dtEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@stato" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="stato" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT IdxPrintJob, TipoCart, UDC, prtName, dtStart, dtEnd, stato FROM dbo.PrintJobQueue</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>UPDATE [dbo].[PrintJobQueue] SET [TipoCart] = @TipoCart, [UDC] = @UDC, [prtName] = @prtName, [dtStart] = @dtStart, [dtEnd] = @dtEnd, [stato] = @stato WHERE (([IdxPrintJob] = @Original_IdxPrintJob) AND ([TipoCart] = @Original_TipoCart) AND ([UDC] = @Original_UDC) AND ([prtName] = @Original_prtName) AND ([dtStart] = @Original_dtStart) AND ((@IsNull_dtEnd = 1 AND [dtEnd] IS NULL) OR ([dtEnd] = @Original_dtEnd)) AND ([stato] = @Original_stato));
SELECT IdxPrintJob, TipoCart, UDC, prtName, dtStart, dtEnd, stato FROM PrintJobQueue WHERE (IdxPrintJob = @IdxPrintJob)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TipoCart" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TipoCart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@prtName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="prtName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dtStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtStart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@dtEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@stato" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="stato" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdxPrintJob" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxPrintJob" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_TipoCart" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TipoCart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_UDC" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="UDC" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_prtName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="prtName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dtStart" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtStart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_dtEnd" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="dtEnd" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_dtEnd" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="dtEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_stato" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="stato" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="IdxPrintJob" ColumnName="IdxPrintJob" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@IdxPrintJob" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="IdxPrintJob" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="IdxPrintJob" DataSetColumn="IdxPrintJob" />
<Mapping SourceColumn="TipoCart" DataSetColumn="TipoCart" />
<Mapping SourceColumn="UDC" DataSetColumn="UDC" />
<Mapping SourceColumn="prtName" DataSetColumn="prtName" />
<Mapping SourceColumn="dtStart" DataSetColumn="dtStart" />
<Mapping SourceColumn="dtEnd" DataSetColumn="dtEnd" />
<Mapping SourceColumn="stato" DataSetColumn="stato" />
</Mappings>
<Sources>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMWTest.dbo.stp_PJQ_getNext" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getNext" GetMethodModifier="Public" GetMethodName="getNext" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getNext" UserSourceName="getNext">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PJQ_getNext</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" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMWTest.dbo.stp_PJQ_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="GetDataBy" UserSourceName="insertQuery">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PJQ_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="varchar" DbType="AnsiString" Direction="Input" ParameterName="@TipoCart" Precision="0" ProviderType="VarChar" Scale="0" Size="250" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@UDC" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="varchar" DbType="AnsiString" Direction="Input" ParameterName="@prtName" Precision="0" ProviderType="VarChar" Scale="0" Size="500" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="GMWConnectionString (Settings)" DbObjectName="TK_GMWTest.dbo.stp_PJQ_updateStato" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="updateStato" Modifier="Public" Name="updateStato" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="updateStato">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_PJQ_updateStato</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="@IdxPrintJob" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@stato" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources>
</TableAdapter>
</Tables>
<Sources />
</DataSource>
@@ -1174,7 +1284,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="stp_prtCartFusiByUDC" msprop:Generator_TableClassName="stp_prtCartFusiByUDCDataTable" msprop:Generator_TableVarName="tablestp_prtCartFusiByUDC" msprop:Generator_RowChangedName="stp_prtCartFusiByUDCRowChanged" msprop:Generator_TablePropName="stp_prtCartFusiByUDC" msprop:Generator_RowDeletingName="stp_prtCartFusiByUDCRowDeleting" msprop:Generator_RowChangingName="stp_prtCartFusiByUDCRowChanging" msprop:Generator_RowEvHandlerName="stp_prtCartFusiByUDCRowChangeEventHandler" msprop:Generator_RowDeletedName="stp_prtCartFusiByUDCRowDeleted" msprop:Generator_RowClassName="stp_prtCartFusiByUDCRow" msprop:Generator_UserTableName="stp_prtCartFusiByUDC" msprop:Generator_RowEvArgName="stp_prtCartFusiByUDCRowChangeEvent">
<xs:element name="stp_prtCartFusiByUDC" msprop:Generator_TableClassName="stp_prtCartFusiByUDCDataTable" msprop:Generator_TableVarName="tablestp_prtCartFusiByUDC" msprop:Generator_TablePropName="stp_prtCartFusiByUDC" msprop:Generator_RowDeletingName="stp_prtCartFusiByUDCRowDeleting" msprop:Generator_RowChangingName="stp_prtCartFusiByUDCRowChanging" msprop:Generator_RowEvHandlerName="stp_prtCartFusiByUDCRowChangeEventHandler" msprop:Generator_RowDeletedName="stp_prtCartFusiByUDCRowDeleted" msprop:Generator_UserTableName="stp_prtCartFusiByUDC" msprop:Generator_RowChangedName="stp_prtCartFusiByUDCRowChanged" msprop:Generator_RowEvArgName="stp_prtCartFusiByUDCRowChangeEvent" msprop:Generator_RowClassName="stp_prtCartFusiByUDCRow">
<xs:complexType>
<xs:sequence>
<xs:element name="UDC" msprop:Generator_ColumnVarNameInTable="columnUDC" msprop:Generator_ColumnPropNameInRow="UDC" msprop:Generator_ColumnPropNameInTable="UDCColumn" msprop:Generator_UserColumnName="UDC">
@@ -1351,7 +1461,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="stp_prtCartFinitiByUDC" msprop:Generator_TableClassName="stp_prtCartFinitiByUDCDataTable" msprop:Generator_TableVarName="tablestp_prtCartFinitiByUDC" msprop:Generator_TablePropName="stp_prtCartFinitiByUDC" msprop:Generator_RowDeletingName="stp_prtCartFinitiByUDCRowDeleting" msprop:Generator_RowChangingName="stp_prtCartFinitiByUDCRowChanging" msprop:Generator_RowEvHandlerName="stp_prtCartFinitiByUDCRowChangeEventHandler" msprop:Generator_RowDeletedName="stp_prtCartFinitiByUDCRowDeleted" msprop:Generator_UserTableName="stp_prtCartFinitiByUDC" msprop:Generator_RowChangedName="stp_prtCartFinitiByUDCRowChanged" msprop:Generator_RowEvArgName="stp_prtCartFinitiByUDCRowChangeEvent" msprop:Generator_RowClassName="stp_prtCartFinitiByUDCRow">
<xs:element name="stp_prtCartFinitiByUDC" msprop:Generator_TableClassName="stp_prtCartFinitiByUDCDataTable" msprop:Generator_TableVarName="tablestp_prtCartFinitiByUDC" msprop:Generator_RowChangedName="stp_prtCartFinitiByUDCRowChanged" msprop:Generator_TablePropName="stp_prtCartFinitiByUDC" msprop:Generator_RowDeletingName="stp_prtCartFinitiByUDCRowDeleting" msprop:Generator_RowChangingName="stp_prtCartFinitiByUDCRowChanging" msprop:Generator_RowEvHandlerName="stp_prtCartFinitiByUDCRowChangeEventHandler" msprop:Generator_RowDeletedName="stp_prtCartFinitiByUDCRowDeleted" msprop:Generator_RowClassName="stp_prtCartFinitiByUDCRow" msprop:Generator_UserTableName="stp_prtCartFinitiByUDC" msprop:Generator_RowEvArgName="stp_prtCartFinitiByUDCRowChangeEvent">
<xs:complexType>
<xs:sequence>
<xs:element name="UDC" msprop:Generator_ColumnVarNameInTable="columnUDC" msprop:Generator_ColumnPropNameInRow="UDC" msprop:Generator_ColumnPropNameInTable="UDCColumn" msprop:Generator_UserColumnName="UDC">
@@ -1528,6 +1638,37 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PrintJobQueue" msprop:Generator_TableClassName="PrintJobQueueDataTable" msprop:Generator_TableVarName="tablePrintJobQueue" msprop:Generator_TablePropName="PrintJobQueue" msprop:Generator_RowDeletingName="PrintJobQueueRowDeleting" msprop:Generator_RowChangingName="PrintJobQueueRowChanging" msprop:Generator_RowEvHandlerName="PrintJobQueueRowChangeEventHandler" msprop:Generator_RowDeletedName="PrintJobQueueRowDeleted" msprop:Generator_UserTableName="PrintJobQueue" msprop:Generator_RowChangedName="PrintJobQueueRowChanged" msprop:Generator_RowEvArgName="PrintJobQueueRowChangeEvent" msprop:Generator_RowClassName="PrintJobQueueRow">
<xs:complexType>
<xs:sequence>
<xs:element name="IdxPrintJob" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnIdxPrintJob" msprop:Generator_ColumnPropNameInRow="IdxPrintJob" msprop:Generator_ColumnPropNameInTable="IdxPrintJobColumn" msprop:Generator_UserColumnName="IdxPrintJob" type="xs:int" />
<xs:element name="TipoCart" msprop:Generator_ColumnVarNameInTable="columnTipoCart" msprop:Generator_ColumnPropNameInRow="TipoCart" msprop:Generator_ColumnPropNameInTable="TipoCartColumn" msprop:Generator_UserColumnName="TipoCart">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="UDC" msprop:Generator_ColumnVarNameInTable="columnUDC" msprop:Generator_ColumnPropNameInRow="UDC" msprop:Generator_ColumnPropNameInTable="UDCColumn" msprop:Generator_UserColumnName="UDC">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="prtName" msprop:Generator_ColumnVarNameInTable="columnprtName" msprop:Generator_ColumnPropNameInRow="prtName" msprop:Generator_ColumnPropNameInTable="prtNameColumn" msprop:Generator_UserColumnName="prtName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="500" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="dtStart" msprop:Generator_ColumnVarNameInTable="columndtStart" msprop:Generator_ColumnPropNameInRow="dtStart" msprop:Generator_ColumnPropNameInTable="dtStartColumn" msprop:Generator_UserColumnName="dtStart" type="xs:dateTime" />
<xs:element name="dtEnd" msprop:Generator_ColumnVarNameInTable="columndtEnd" msprop:Generator_ColumnPropNameInRow="dtEnd" msprop:Generator_ColumnPropNameInTable="dtEndColumn" msprop:Generator_UserColumnName="dtEnd" type="xs:dateTime" minOccurs="0" />
<xs:element name="stato" msprop:Generator_ColumnVarNameInTable="columnstato" msprop:Generator_ColumnPropNameInRow="stato" msprop:Generator_ColumnPropNameInTable="statoColumn" msprop:Generator_UserColumnName="stato" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
@@ -1546,5 +1687,9 @@
<xs:selector xpath=".//mstns:stp_prtCartFinitiByUDC" />
<xs:field xpath="mstns:UDC" />
</xs:unique>
<xs:unique name="PrintJobQueue_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:PrintJobQueue" />
<xs:field xpath="mstns:IdxPrintJob" />
</xs:unique>
</xs:element>
</xs:schema>
+8 -7
View File
@@ -6,13 +6,14 @@
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="71" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:stp_prtCartByUDC" ZOrder="7" X="81" Y="41" Height="305" Width="249" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartMatPrimaByUDC" ZOrder="6" X="388" Y="46" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartLiquidi_F18ByUDC" ZOrder="5" X="1086" Y="54" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartLiquidi_F10ByUDC" ZOrder="4" X="729" Y="54" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartAnimeByUDC" ZOrder="3" X="100" Y="417" Height="305" Width="287" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartFusiByUDC" ZOrder="2" X="520" Y="480" Height="305" Width="272" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartFinitiByUDC" ZOrder="1" X="886" Y="511" Height="305" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartByUDC" ZOrder="8" X="81" Y="41" Height="305" Width="249" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartMatPrimaByUDC" ZOrder="7" X="388" Y="46" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartLiquidi_F18ByUDC" ZOrder="6" X="1086" Y="54" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartLiquidi_F10ByUDC" ZOrder="5" X="729" Y="54" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartAnimeByUDC" ZOrder="4" X="100" Y="417" Height="305" Width="287" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartFusiByUDC" ZOrder="3" X="520" Y="480" Height="305" Width="272" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:stp_prtCartFinitiByUDC" ZOrder="2" X="853" Y="428" Height="305" Width="278" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:PrintJobQueue" ZOrder="1" X="1199" Y="492" Height="267" Width="247" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
</Shapes>
<Connectors />
</DiagramLayout>
+3
View File
@@ -38,6 +38,7 @@ namespace GMW_data
public DS_cartelliniTableAdapters.stp_prtCartMatPrimaByUDCTableAdapter taPrtCartMP;
public DS_cartelliniTableAdapters.stp_prtCartLiquidi_F10ByUDCTableAdapter taPrtCartLiqF10;
public DS_cartelliniTableAdapters.stp_prtCartLiquidi_F18ByUDCTableAdapter taPrtCartLiqF18;
public DS_cartelliniTableAdapters.PrintJobQueueTableAdapter taPJQ;
/// <summary>
@@ -70,6 +71,7 @@ namespace GMW_data
taPrtCartMP = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartMatPrimaByUDCTableAdapter();
taPrtCartLiqF10 = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartLiquidi_F10ByUDCTableAdapter();
taPrtCartLiqF18 = new GMW_data.DS_cartelliniTableAdapters.stp_prtCartLiquidi_F18ByUDCTableAdapter();
taPJQ = new DS_cartelliniTableAdapters.PrintJobQueueTableAdapter();
}
/// <summary>
/// effettua setup dei connection strings da web.config delal singola applicazione
@@ -103,6 +105,7 @@ namespace GMW_data
taPrtCartMP.Connection.ConnectionString = connString;
taPrtCartLiqF10.Connection.ConnectionString = connString;
taPrtCartLiqF18.Connection.ConnectionString = connString;
taPJQ.Connection.ConnectionString = connString;
}
#endregion
+35
View File
@@ -276,6 +276,31 @@ public class reportPrinter
public bool stampaCartellino(tipoCartellino cartellino, string UDC, string printerName)
{
bool answ = false;
// incomincio con gestioen della coda di stampa... inserisco in tab la richiesta di stampa...
DataProxy.obj.taPJQ.insertQuery(cartellino.ToString(), UDC, printerName);
// faccio un ciclo while... finchè non sono "in testa" alla coda delel esecuzioni aspetto...
string nextUdc = "ND";
try
{
nextUdc = DataProxy.obj.taPJQ.getNext()[0].UDC;
}
catch
{
nextUdc = "ND";
}
Random rand = new Random();
int msWait = 200;
int idxPrintJob = 0;
while (nextUdc != UDC)
{
// aspetto...
msWait = rand.Next(100, 300);
System.Threading.Thread.Sleep(msWait);
// leggo prox record da coda
nextUdc = DataProxy.obj.taPJQ.getNext()[0].UDC;
}
// salvo idx job...
idxPrintJob = DataProxy.obj.taPJQ.getNext()[0].idx;
string outForm = "";
string pagWidth = "";
string pagHeigth = "";
@@ -335,6 +360,16 @@ public class reportPrinter
// compongo parametri stampa
devInfoParam deviceInfo = new devInfoParam(outForm, pagHeigth, pagWidth, margin, margin, margin, margin);
answ = printAndLog(UDC, printerName, answ, report, deviceInfo);
if (answ)
{
// registro stampa in tabella queue...
DataProxy.obj.taPJQ.updateStato(idxPrintJob, 1);
}
else
{
// registro annullato in tab queue...
DataProxy.obj.taPJQ.updateStato(idxPrintJob, -1);
}
return answ;
}
/// <summary>