| NETSCM/ClsShowMod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SCM/SCM.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SCM/公用类/ClsPub1.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SCM/条码打印/FrmPrintLabel.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SCM/条码打印/FrmPrintLabel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SCM/条码打印/FrmPrintLabel.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
NETSCM/ClsShowMod.cs
@@ -3576,12 +3576,11 @@ oSc_ICMOReportBillList.Show(); oMainForm.AddTabPage(oSc_ICMOReportBillList); break; //case "cld_icmolist": // CLD_ICMOList oCLD_ICMOList = new CLD_ICMOList(); // oCLD_ICMOList.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; // oCLD_ICMOList.ModCaption = gnmc; // oCLD_ICMOList.ShowDialog(); // break; case "frmprintlabel": FrmPrintLabel oFrmPrintLabel = new FrmPrintLabel(); //oFrmPrintLabel.ModCaption = gnmc; oFrmPrintLabel.ShowDialog(); break; //case "sc_processreport": // Sc_ProcessReport oSc_ProcessReport = new Sc_ProcessReport(); // oSc_ProcessReport.MdiParent = oMain; SCM/SCM.csproj
@@ -95,6 +95,12 @@ </ItemGroup> <ItemGroup> <Compile Include="Class1.cs" /> <Compile Include="æ¡ç æå°\FrmPrintLabel.cs"> <SubType>Form</SubType> </Compile> <Compile Include="æ¡ç æå°\FrmPrintLabel.Designer.cs"> <DependentUpon>FrmPrintLabel.cs</DependentUpon> </Compile> <Compile Include="å ¬ç¨æ¨¡å\frmHlpBillList_New.cs"> <SubType>Form</SubType> </Compile> @@ -567,6 +573,9 @@ <SubType>Designer</SubType> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="æ¡ç æå°\FrmPrintLabel.resx"> <DependentUpon>FrmPrintLabel.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="å ¬ç¨æ¨¡å\frmHlpBillList_New.resx"> <DependentUpon>frmHlpBillList_New.cs</DependentUpon> <SubType>Designer</SubType> SCM/¹«ÓÃÀà/ClsPub1.cs
@@ -20,8 +20,8 @@ //public static string WEBSURL = "http://192.168.10.61/WEB-WMS/WebService1.asmx"; //é©çµ å ç½æµè¯ //public static string WEBSURL = "http://192.168.10.222/WMSWEBS/WebService1.asmx"; //é©çµ MESæå¡å¨ï¼å ç½ï¼ public static string WEBSURL = "http://122.227.199.62:5058/WMSWEBS/WebService1.asmx"; //é©çµ MESæå¡å¨ï¼å¤ç½ï¼ public static string WEBSURL = "http://192.168.10.222/WMSWEBS/WebService1.asmx"; //é©çµ MESæå¡å¨ï¼å ç½ï¼ //public static string WEBSURL = "http://122.227.199.62:5058/WMSWEBS/WebService1.asmx"; //é©çµ MESæå¡å¨ï¼å¤ç½ï¼ public static long HOrgID = 0; SCM/ÌõÂë´òÓ¡/FrmPrintLabel.Designer.cs
New file @@ -0,0 +1,278 @@  namespace SCM { partial class FrmPrintLabel { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.txtHPrint4 = new System.Windows.Forms.TextBox(); this.txtHPrint3 = new System.Windows.Forms.TextBox(); this.txtHPrint2 = new System.Windows.Forms.TextBox(); this.txtHPrint1 = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.cmbPrint = new System.Windows.Forms.ComboBox(); this.txtHbarcode = new System.Windows.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.grdMain = new System.Windows.Forms.DataGridView(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("å®ä½", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Location = new System.Drawing.Point(288, 20); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(106, 24); this.label1.TabIndex = 0; this.label1.Text = "æ ç¾æå°"; // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("å®ä½", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Location = new System.Drawing.Point(28, 64); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(87, 25); this.label2.TabIndex = 1; this.label2.Text = "æ«æï¼"; // // groupBox1 // this.groupBox1.Controls.Add(this.txtHPrint4); this.groupBox1.Controls.Add(this.txtHPrint3); this.groupBox1.Controls.Add(this.txtHPrint2); this.groupBox1.Controls.Add(this.txtHPrint1); this.groupBox1.Controls.Add(this.label7); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.cmbPrint); this.groupBox1.Location = new System.Drawing.Point(12, 120); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(742, 293); this.groupBox1.TabIndex = 2; this.groupBox1.TabStop = false; this.groupBox1.Text = "æ¡å½¢ç ä¿¡æ¯"; // // txtHPrint4 // this.txtHPrint4.Location = new System.Drawing.Point(462, 140); this.txtHPrint4.Name = "txtHPrint4"; this.txtHPrint4.Size = new System.Drawing.Size(227, 25); this.txtHPrint4.TabIndex = 12; // // txtHPrint3 // this.txtHPrint3.Location = new System.Drawing.Point(113, 140); this.txtHPrint3.Name = "txtHPrint3"; this.txtHPrint3.Size = new System.Drawing.Size(227, 25); this.txtHPrint3.TabIndex = 11; // // txtHPrint2 // this.txtHPrint2.Location = new System.Drawing.Point(462, 97); this.txtHPrint2.Name = "txtHPrint2"; this.txtHPrint2.Size = new System.Drawing.Size(227, 25); this.txtHPrint2.TabIndex = 10; // // txtHPrint1 // this.txtHPrint1.Location = new System.Drawing.Point(113, 97); this.txtHPrint1.Name = "txtHPrint1"; this.txtHPrint1.Size = new System.Drawing.Size(227, 25); this.txtHPrint1.TabIndex = 9; // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(371, 143); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(75, 15); this.label7.TabIndex = 8; this.label7.Text = "æå°å段4"; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(28, 143); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(75, 15); this.label6.TabIndex = 7; this.label6.Text = "æå°å段3"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(371, 100); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(75, 15); this.label5.TabIndex = 6; this.label5.Text = "æå°å段2"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(28, 100); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(75, 15); this.label4.TabIndex = 5; this.label4.Text = "æå°å段1"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(28, 43); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(67, 15); this.label3.TabIndex = 4; this.label3.Text = "æå°æ¨¡æ¿"; // // cmbPrint // this.cmbPrint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbPrint.FormattingEnabled = true; this.cmbPrint.Items.AddRange(new object[] { "ä¾åºåæ ç¾"}); this.cmbPrint.Location = new System.Drawing.Point(113, 43); this.cmbPrint.Name = "cmbPrint"; this.cmbPrint.Size = new System.Drawing.Size(227, 23); this.cmbPrint.TabIndex = 3; // // txtHbarcode // this.txtHbarcode.Font = new System.Drawing.Font("å®ä½", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHbarcode.Location = new System.Drawing.Point(125, 64); this.txtHbarcode.Name = "txtHbarcode"; this.txtHbarcode.Size = new System.Drawing.Size(402, 36); this.txtHbarcode.TabIndex = 2; this.txtHbarcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHbarcode_KeyDown); // // button1 // this.button1.Location = new System.Drawing.Point(545, 64); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(84, 36); this.button1.TabIndex = 3; this.button1.Text = "å¼å¯"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // this.button2.Location = new System.Drawing.Point(649, 64); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(89, 36); this.button2.TabIndex = 4; this.button2.Text = "å ³é"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // grdMain // this.grdMain.AllowUserToAddRows = false; this.grdMain.AllowUserToDeleteRows = false; this.grdMain.BackgroundColor = System.Drawing.Color.WhiteSmoke; this.grdMain.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.grdMain.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.grdMain.Location = new System.Drawing.Point(13, 8); this.grdMain.Margin = new System.Windows.Forms.Padding(4); this.grdMain.Name = "grdMain"; this.grdMain.ReadOnly = true; this.grdMain.RowHeadersWidth = 30; this.grdMain.RowTemplate.Height = 23; this.grdMain.Size = new System.Drawing.Size(82, 24); this.grdMain.TabIndex = 45; this.grdMain.Visible = false; // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 2000; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // FrmPrintLabel // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(766, 438); this.Controls.Add(this.grdMain); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.groupBox1); this.Controls.Add(this.label1); this.Controls.Add(this.label2); this.Controls.Add(this.txtHbarcode); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FrmPrintLabel"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "æ ç¾æå°"; this.Load += new System.EventHandler(this.FrmPrintLabel_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdMain)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.TextBox txtHPrint4; private System.Windows.Forms.TextBox txtHPrint3; private System.Windows.Forms.TextBox txtHPrint2; private System.Windows.Forms.TextBox txtHPrint1; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox cmbPrint; private System.Windows.Forms.TextBox txtHbarcode; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.DataGridView grdMain; private System.Windows.Forms.Timer timer1; } } SCM/ÌõÂë´òÓ¡/FrmPrintLabel.cs
New file @@ -0,0 +1,151 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using gregn6Lib; using System.Threading; using System.Windows.Forms; namespace SCM { public partial class FrmPrintLabel : Form { public FrmPrintLabel() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { groupBox1.Enabled = false; txtHbarcode.Enabled = true; button1.Enabled = false; button2.Enabled = true; } private void button2_Click(object sender, EventArgs e) { groupBox1.Enabled = true; txtHbarcode.Enabled = false; button1.Enabled = true; button2.Enabled = false; } private void FrmPrintLabel_Load(object sender, EventArgs e) { cmbPrint.SelectedIndex = 0; groupBox1.Enabled = true; txtHbarcode.Enabled = false; button1.Enabled = true; button2.Enabled = false; //è®¾ç½®å¨æURL oWeb.Url = SCM.ClsPub1.WEBSURL; } private void txtHbarcode_KeyDown(object sender, KeyEventArgs e) { if(e.KeyCode==Keys.Enter) { txtHbarcode.SelectAll(); if (txtHbarcode.Text.Trim()!="" && txtHbarcode.Text.Length>3) { Sub_PrintLabel(); Thread.Sleep(500); } else { MessageBox.Show("è¯·å æ«ç æ¡ç ï¼ï¼ï¼"); } } } GridppReport Report; private void Sub_PrintLabel() { //éæ©æå°æ¨¡æ¿ Sub_SetReport(cmbPrint.Text); Report.Print(true); //Report.PrintPreview(true); Thread.Sleep(500); } private void Sub_SetReport(string sOpenTmp) { //å¤æè¡æ° Report = new GridppReport(); Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf"); //here . Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord); Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable); } //å¡«å ¥åæ®è¡¨å¤´ä¿¡æ¯ private void ReportBeforePostRecord()// { try { Report.FieldByName("æ¡å½¢ç ").AsString = txtHbarcode.Text; Report.FieldByName("åæ®µä¸").AsString = txtHPrint1.Text; Report.FieldByName("åæ®µäº").AsString = txtHPrint2.Text; Report.FieldByName("åæ®µä¸").AsString = txtHPrint3.Text; Report.FieldByName("åæ®µå").AsString = txtHPrint4.Text; //Report.FieldByName("æ°é").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HQty2Col].Value); //Report.FieldByName("æºååå·").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HSourceBillNoCol].Value); //Report.FieldByName("éå®è®¢åå·").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HSeOrderBillNo2Col].Value); //Report.FieldByName("ç产车é´").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HDeptName2Col].Value); //Report.FieldByName("夿³¨").AsString = ClsPub.isStrNull(grdSub.Rows[CurRows].Cells[HRemark2Col].Value); } catch (Exception e) { MessageBox.Show("æå°å¤±è´¥!表头ï¼" + e.Message); } } private void ReportFetchRecordByDataTable() { try { DataTable ds = new DataTable(); //BLL.Utility.FillRecordToReport(Report, grdSub, ds, HMaterIDCol); SCM.Utility.FillRecordToReport(Report, grdMain, ds, 0); } catch (Exception e) { MessageBox.Show("æå°å¤±è´¥!表ä½ï¼" + e.Message); } } public SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1(); private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; DataSet DSet; DSet = oWeb.getDataSetBySQL("select top 1 * from gy_Material order by HItemID", "gy_Material", ref DBUtility.ClsPub.sExeReturnInfo); if (DSet == null) { MessageBox.Show("没æè¿åä»»ä½ç»æ,æ¡ç ä¸åå¨ï¼" + DBUtility.ClsPub.sExeReturnInfo); return; } // grdMain.DataSource = DSet.Tables[0].DefaultView; } } } SCM/ÌõÂë´òÓ¡/FrmPrintLabel.resx
New file @@ -0,0 +1,123 @@ <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> </root>