| | |
| | | <<<<<<< HEAD
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.ComponentModel;
|
| | |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
|
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
|
| | | sDay = "0" + ClsPub.isDate(sDate).Day.ToString();
|
| | | =======
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.ComponentModel;
|
| | | using System.Data;
|
| | | using System.Drawing;
|
| | | using System.Text;
|
| | | using System.Windows.Forms;
|
| | | using gregn6Lib;
|
| | | using Pub_Class;
|
| | | using System.Threading;
|
| | | using System.IO.Ports;
|
| | |
|
| | | namespace SCM
|
| | | {
|
| | | public partial class Sc_ICMOReportToBarCode : Form
|
| | | {
|
| | | public Sc_ICMOReportToBarCode()
|
| | | {
|
| | | InitializeComponent();
|
| | | }
|
| | |
|
| | | public frmBillQueryCondition_Base frmCondition;
|
| | | public string ModCaption = "æåååå¨çº¿æ£éª";
|
| | | public string ModName = "Sc_ICMOReportToBarCode";
|
| | | public string HSourceBillTypeID = ""; //åæ®ç±»å
|
| | | public string HSourceBillType = ""; //åæ®ç±»ååç§°
|
| | | public string HSourceBillNo = "";
|
| | | public Int64 HSourceInterID = 0;
|
| | | public Int64 HSourceEntryID = 0;
|
| | | public int HTMCol = 0;
|
| | | public int HMaterIDCol = 1;
|
| | | Pub_Class.ClsGridListSum oSumGrid = new Pub_Class.ClsGridListSum();
|
| | | public Int32 iTopRow = 0;//ç»æ¨ªçº¿
|
| | | SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
|
| | | //
|
| | |
|
| | | #region åºå®ä»£ç
|
| | |
|
| | | //æ¸
空çé¢
|
| | | public void Sub_ClearBill()
|
| | | {
|
| | | //æ¸
空ç颿§ä»¶ for æ§ä»¶ |
| | | foreach (Control ct in gbUp.Controls)
|
| | | {
|
| | | switch (ct.GetType().Name)
|
| | | {
|
| | | case "ComboBox":
|
| | | ((ComboBox)ct).SelectedIndex = 0;
|
| | | break;
|
| | | case "TextBox":
|
| | | ((TextBox)ct).Text = "";
|
| | | break;
|
| | | case "DateTimePicker":
|
| | | ((DateTimePicker)ct).Value = DateTime.Today;
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | | //
|
| | | txtHMaker.Text = ClsPub.CurUserName;
|
| | | initGrid();
|
| | | }
|
| | |
|
| | | private void Sc_ICMOReportToBarCode_Load(object sender, EventArgs e)
|
| | | {
|
| | | //è®¾ç½®å¨æURL
|
| | | oWeb.Url = SCM.ClsPub1.WEBSURL;
|
| | | //
|
| | | frmCondition = new frmBillQueryCondition_Base();
|
| | | this.Text = ModCaption; |
| | | oSumGrid.ogrdMain = grdSub; //åå§å new
|
| | | oSumGrid.oGridsum = grdSum;
|
| | | initGrid();
|
| | | //cmbHBillType.SelectedIndex = 0;
|
| | | //cmbHSourceBillType.SelectedIndex = 0;
|
| | | cmbFQMB.Items.Add(this.Text);
|
| | | cmbFQMB.SelectedIndex = 0;
|
| | |
|
| | | if(DBUtility.ClsPub.CurUserName.ToLower()=="admin")
|
| | | {
|
| | | txtHDQQty.ReadOnly = false;
|
| | | txtHKSQty.ReadOnly = false;
|
| | | }
|
| | | }
|
| | |
|
| | | //åå§åç½æ ¼
|
| | | private void initGrid()
|
| | | {
|
| | | ClsPub1.initGridList(grdMain, this.Name);
|
| | | ClsPub1.initGridList(grdSub, this.Name + "grdSub");
|
| | | ClsPub1.initGridFst(grdEmp, this.Name + "grdEmp");
|
| | | grdMain.RowTemplate.Height = 30;
|
| | | grdMain.RowTemplate.MinimumHeight = 30;
|
| | | grdMain.RowsDefaultCellStyle.Font = new Font("å®ä½", 15);
|
| | | grdMain.ReadOnly = true;
|
| | |
|
| | | grdSub.RowTemplate.Height = 30;
|
| | | grdSub.RowTemplate.MinimumHeight = 30;
|
| | | grdSub.RowsDefaultCellStyle.Font = new Font("å®ä½", 15);
|
| | | grdSub.ReadOnly = true;
|
| | |
|
| | | grdEmp.RowTemplate.Height = 30;
|
| | | grdEmp.RowTemplate.MinimumHeight = 30;
|
| | | grdEmp.RowsDefaultCellStyle.Font = new Font("å®ä½", 15);
|
| | | grdEmp.ReadOnly = false;
|
| | | //DBUtility.Xt_BaseBillFun.initGridList(grdMain, this.Name);
|
| | | //DBUtility.Xt_BaseBillFun.initGridList(grdSub, this.Name + "grdSub");
|
| | | DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name);
|
| | | DBUtility.Xt_BaseBillFun.GetGrid(grdSub, this.Name + "grdSub");
|
| | | DBUtility.Xt_BaseBillFun.GetGrid(grdEmp, this.Name + "grdEmp");
|
| | | }
|
| | |
|
| | | //æ¶é´æ§ä»¶
|
| | | private void timer1_Tick(object sender, EventArgs e)
|
| | | {
|
| | | timer1.Enabled=false;
|
| | | Sub_ClearBill();
|
| | | }
|
| | |
|
| | | private void timer2_Tick(object sender, EventArgs e)
|
| | | {
|
| | | timer2.Enabled = false;
|
| | | //
|
| | | if (ClsIni.ReadIni("COMINFO", "txtPortName", DBUtility.ClsPub.AppPath + @"/HXERP.ini").Contains("æ²¡ææ¾å°")==false)
|
| | | {
|
| | | txtPortName.Text = ClsIni.ReadIni("COMINFO", "txtPortName", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | txtBaudRate.Text = ClsIni.ReadIni("COMINFO", "txtBaudRate", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | cmbParity.Text = ClsIni.ReadIni("COMINFO", "cmbParity", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | txtDataBits.Text = ClsIni.ReadIni("COMINFO", "txtDataBits", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | cmbStopBits.Text = ClsIni.ReadIni("COMINFO", "cmbStopBits", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | txtHSend0.Text = ClsIni.ReadIni("COMINFO", "txtHSend0", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | txtHSend.Text = ClsIni.ReadIni("COMINFO", "txtHSend", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | txtHSourceID.Text = ClsIni.ReadIni("COMINFO", "txtHSourceID", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | txtHSourceID.Tag = ClsIni.ReadIni("COMINFO", "txtHSourceIDTag", DBUtility.ClsPub.AppPath + @"/HXERP.ini");
|
| | | this.Text = this.Text + "-" + txtHSourceID.Text;
|
| | | }
|
| | |
|
| | | //åå§å串å£
|
| | | ComDevice = new SerialPort();
|
| | | ComDevice.DataReceived += new SerialDataReceivedEventHandler(Com_DataReceived);//ç»å®äºä»¶
|
| | | string[] PortNames = SerialPort.GetPortNames();
|
| | | //æå¼ä¸²å£
|
| | | OpenCom();
|
| | | }
|
| | |
|
| | | //éåº
|
| | | private void tc_Click(object sender, EventArgs e)
|
| | | {
|
| | | this.Close();
|
| | | }
|
| | |
|
| | | private void grdMain_Paint(object sender, PaintEventArgs e)
|
| | | {
|
| | | GraphicsGrid();
|
| | | }
|
| | |
|
| | | private void GraphicsGrid()
|
| | | {
|
| | | //ç»åºçº¿
|
| | | DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain);
|
| | | //ç»æ¨ªçº¿
|
| | | DBUtility.Xt_BaseBillFun.GraphicsRowGrid(grdMain, iTopRow, iTopRow + 50, Fun_GetCol("hmainid"));
|
| | | }
|
| | |
|
| | | private Int32 Fun_GetCol(string sCol)
|
| | | {
|
| | | return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain);
|
| | | }
|
| | |
|
| | | //ä¿åå宽
|
| | | private void bclk_Click(object sender, EventArgs e)
|
| | | {
|
| | | DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name);
|
| | | DBUtility.Xt_BaseBillFun.SaveGrid(grdSub, this.Name + "grdSub");
|
| | | DBUtility.Xt_BaseBillFun.SaveGrid(grdEmp, this.Name + "grdEmp");
|
| | | }
|
| | |
|
| | | //é»è®¤å宽
|
| | | private void mrlk_Click(object sender, EventArgs e)
|
| | | {
|
| | | DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name);
|
| | | DBUtility.Xt_BaseBillFun.DefaultGridView(grdSub, this.Name + "grdSub");
|
| | | DBUtility.Xt_BaseBillFun.DefaultGridView(grdEmp, this.Name + "grdEmp");
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | | #region è¿åæºåä¿¡æ¯
|
| | |
|
| | | private void xd_Click(object sender, EventArgs e)
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | private void Display(string SourceBillType, Int64 HSourceBillInterID, Int64 HSourceBillEntryID)
|
| | | {
|
| | | DataSet Ds;
|
| | | //ç产订å
|
| | | if (SourceBillType == "ç产订å")
|
| | | {
|
| | | //å¾å°ä¿¡æ¯
|
| | | Ds = oWeb.getDataSetBySQL("select * from h_v_IFCLD_ICMOList where hmainid=" + HSourceBillInterID + " and hsubid=" + HSourceBillEntryID, "h_v_IFCLD_ICMOList", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | //åå
¥ä¿¡æ¯
|
| | | Sub_WriteInForm(Ds.Tables[0], 0);
|
| | | }
|
| | | //æ¶æéç¥å
|
| | | if (SourceBillType == "æ¶æéç¥å")
|
| | | {
|
| | | //å¾å°ä¿¡æ¯
|
| | | Ds = oWeb.getDataSetBySQL("select * from h_v_IF_POInStockList where hmainid=" + HSourceBillInterID + " and hsubid=" + HSourceBillEntryID, "h_v_IF_POInStockList", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | //åå
¥ä¿¡æ¯
|
| | | Sub_WriteInForm(Ds.Tables[0], 0);
|
| | | }
|
| | | //çäº§æ±æ¥å
|
| | | if (SourceBillType == "çäº§æ±æ¥å")
|
| | | {
|
| | | //å¾å°ä¿¡æ¯
|
| | | Ds = oWeb.getDataSetBySQL("select * from h_v_IF_ICMOReportBillList where hmainid=" + HSourceBillInterID + " and hsubid=" + HSourceBillEntryID, "h_v_IF_POInStockList", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | //åå
¥ä¿¡æ¯
|
| | | Sub_WriteInForm(Ds.Tables[0], 0);
|
| | | }
|
| | | }
|
| | |
|
| | | //æ ¹æ®TABLEåå
¥çé¢
|
| | | private void Sub_WriteInForm(DataTable oTable, int i)
|
| | | {
|
| | | try
|
| | | {
|
| | | txtHSourceBillNo.Text = oTable.Rows[0]["åæ®å·"].ToString();
|
| | | txtHMaterNumber.Text = oTable.Rows[0]["ç©æä»£ç "].ToString();
|
| | | txtHOldMaterNumber.Text = oTable.Rows[0]["æ§ç©æç¼ç "].ToString();
|
| | | txtHMaterNumber.Tag = oTable.Rows[0]["HMaterID"].ToString();
|
| | | txtHMaterName.Text = oTable.Rows[0]["ç©æåç§°"].ToString();
|
| | | txtHMaterName.Tag = oTable.Rows[0]["HMaterID"].ToString();
|
| | | txtHMaterModel.Text = oTable.Rows[0]["è§æ ¼åå·"].ToString();
|
| | | txtHUnitName.Text = oTable.Rows[0]["计éåä½"].ToString();
|
| | | txtHUnitName.Tag = oTable.Rows[0]["HUnitID"].ToString();
|
| | | txtHBatchNo.Text = oTable.Rows[0]["æ¹æ¬¡"].ToString();
|
| | | txtHSumQty.Text = oTable.Rows[0]["æ°é"].ToString();
|
| | | txtHRelationQty.Text = oTable.Rows[0]["å·²çææ¡ç æ°é"].ToString();
|
| | | txtHSYQty.Text = oTable.Rows[0]["æªçææ¡ç æ°é"].ToString();
|
| | | txtHKSQty.Text = lblHNowQty.Text;
|
| | | txtHDQQty.Text = lblHNowQty.Text;
|
| | | if (DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text)>0)
|
| | | {
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | txtHSJQty.Text = "0";
|
| | | }
|
| | | DisplayMain();
|
| | | //DisplaySub();
|
| | | }
|
| | | catch(Exception e)
|
| | | {
|
| | | MessageBox.Show("读å失败ï¼" + e.Message);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void DisplayMain()
|
| | | {
|
| | | DataSet DSet;
|
| | | string sSql = "";
|
| | | string sWhere = "";
|
| | | //è¿æ»¤æ¡ä»¶ |
| | | sSql = " exec h_p_Sc_ICMOReportToBarCode_All '" + HSourceBillTypeID + "'," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString(); |
| | | //
|
| | | DSet = oWeb.getDataSetBySQL(sSql, "h_p_Sc_ICMOReportToBarCode_All", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | //çæé¦è¡æ é¢
|
| | | if (DSet == null)
|
| | | {
|
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo);
|
| | | return;
|
| | | }
|
| | | //
|
| | | if (DSet.Tables[0].Rows.Count>0)
|
| | | {
|
| | | grdMain.DataSource = DSet.Tables[0].DefaultView;
|
| | | }
|
| | | //å»ç»
|
| | | int FrCol = DBUtility.ClsPub.isInt(0);
|
| | | string s = "æ¯";
|
| | | ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol);
|
| | | //ç»çº¿ |
| | | //Total();
|
| | | ///////////////////////////////////////////
|
| | | if (DSet.Tables[1].Rows.Count > 0)
|
| | | {
|
| | | grdSub.DataSource = DSet.Tables[1].DefaultView;
|
| | | }
|
| | | //å»ç» |
| | | ClsPub1.DisplayGrid(grdSub, this.Name + "grdSub", s, FrCol);
|
| | | /////////////////////////////
|
| | | txtHRelationQty.Text = DBUtility.ClsPub.isDoule(DSet.Tables[2].Rows[0]["å
³èæ°é"], 1);
|
| | | if(DBUtility.ClsPub.isDoule(txtHSumQty.Text) - DBUtility.ClsPub.isDoule(txtHRelationQty.Text)>=0)
|
| | | {
|
| | | txtHSYQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHSumQty.Text) - DBUtility.ClsPub.isDoule(txtHRelationQty.Text), 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | txtHSYQty.Text = "0";
|
| | | }
|
| | | //////////////////////////
|
| | | }
|
| | |
|
| | | private void DisplaySub()
|
| | | {
|
| | | DataSet DSet;
|
| | | string sSql = "";
|
| | | string sWhere = "";
|
| | | //è¿æ»¤æ¡ä»¶ |
| | | sSql = " exec h_p_Sc_ICMOReportToBarCode_Sub '" + HSourceBillTypeID + "'," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString();
|
| | | |
| | | //
|
| | | DSet = oWeb.getDataSetBySQL(sSql, "h_p_Sc_ICMOReportToBarCode_Sub", ref DBUtility.ClsPub.sExeReturnInfo);
|
| | | //çæé¦è¡æ é¢
|
| | | if (DSet == null)
|
| | | {
|
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo);
|
| | | return;
|
| | | }
|
| | | //
|
| | | grdSub.DataSource = DSet.Tables[0].DefaultView;
|
| | |
|
| | |
|
| | | //å»ç»
|
| | | int FrCol = DBUtility.ClsPub.isInt(0);
|
| | | string s = "æ¯";
|
| | | ClsPub1.DisplayGrid(grdSub, this.Name + "grdSub", s, FrCol);
|
| | | //ç»çº¿ |
| | | //Total();
|
| | | }
|
| | |
|
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | | #region //æå°è®¾ç½®
|
| | |
|
| | | GridppReport Report;
|
| | | string sBarCode = "";
|
| | |
|
| | | //é¢è§
|
| | | int CurRows = 0;
|
| | | |
| | |
|
| | | |
| | | |
| | |
|
| | | |
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | | #region ç颿§ä»¶å¤ç
|
| | |
|
| | | private void cmdHDeptID_Click(object sender, EventArgs e)
|
| | | {
|
| | | SCM.ClsIF_Department_View oDept = new SCM.ClsIF_Department_View();
|
| | | string sWhere = "";
|
| | | if (oDept.RefreshView(sWhere))
|
| | | {
|
| | | this.txtHDeptID.Text = oDept.oModel.HName;
|
| | | this.txtHDeptID.Tag = oDept.oModel.HItemID.ToString(); |
| | | }
|
| | | else
|
| | | {
|
| | | this.txtHDeptID.Text = ""; |
| | | }
|
| | | }
|
| | |
|
| | | private void txtHDeptID_TextChanged(object sender, EventArgs e)
|
| | | {
|
| | | BLL.ClsPub_BLL.Sub_ClearText(txtHDeptID);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
|
| | | //éæ©æºå
|
| | | private void cmdHSourceBillNo_Click(object sender, EventArgs e)
|
| | | {
|
| | | Gy_SourceBillList_Touch oGy_SourceBillList_Touch = new Gy_SourceBillList_Touch();
|
| | | oGy_SourceBillList_Touch.HSourceBillType = HSourceBillType;//ç±»ååç§°
|
| | | oGy_SourceBillList_Touch.ShowDialog();
|
| | | if (oGy_SourceBillList_Touch.OKTag == 1)
|
| | | {
|
| | | //æ ¹æ®éä¸çæºåå
ç ååå
ç ï¼è¿åç¸åºä¿¡æ¯
|
| | | HSourceEntryID = oGy_SourceBillList_Touch.HSelEntryID;
|
| | | HSourceInterID = oGy_SourceBillList_Touch.HSelInterID;
|
| | | HSourceBillTypeID = oGy_SourceBillList_Touch.HSourceBillTypeID;
|
| | | HSourceBillNo = oGy_SourceBillList_Touch.HSourceBillNo;
|
| | | Display(HSourceBillType, oGy_SourceBillList_Touch.HSelInterID, oGy_SourceBillList_Touch.HSelEntryID);
|
| | | }
|
| | | else
|
| | | {
|
| | | HSourceEntryID = 0;
|
| | | HSourceInterID = 0;
|
| | | HSourceBillTypeID = "";
|
| | | HSourceBillNo = "";
|
| | | }
|
| | | }
|
| | |
|
| | | //
|
| | | private void cmdCancel_Click(object sender, EventArgs e)
|
| | | {
|
| | | CloseCom();
|
| | | this.Close();
|
| | | }
|
| | |
|
| | | private void label19_Click(object sender, EventArgs e)
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public bool SaveBill(string sType)
|
| | | {
|
| | | try
|
| | | {
|
| | | int LSHlen = 2; //æµæ°´å·é¿åº¦
|
| | | int SumLen = 10; //æ»é¿åº¦
|
| | | string TM = ""; //æ¡ç
|
| | | string HNumber = ""; //ç©æä»£ç
|
| | | double HSumQty = 0; //äº§åæ°é
|
| | | double HMinQty = 0; //æå°å
è£
æ°
|
| | | int HBQty = 0; //ç®±æ°
|
| | | double HQty = 0; //æ°é
|
| | | string WeiShu = ""; //å°¾æ°
|
| | | int LSH = 0; //æµæ°´å·
|
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符
|
| | | string sDate = ""; //æ¥æ
|
| | | string sYear = ""; //å¹´
|
| | | string sPeriod = ""; //æ
|
| | | string sDay = ""; //æ¥
|
| | | string HBatchNo = ""; //æ¹æ¬¡
|
| | | int k = 0;
|
| | | int n = 0; //å䏿¹çææ¡ç ä¸çç¬¬å æ¡ |
| | | string sTMNumber = ""; //æ¡ç èªå®ä¹åç¼
|
| | | DataSet Ds;
|
| | | //
|
| | | string HWei = ""; //å°¾æ°
|
| | | HBarCode = "";
|
| | | string HBarCodeType = "";
|
| | | Int64 HMaterID = 0;
|
| | | Int64 HAuxPropID = 0;
|
| | | Int64 HUnitID = 0;
|
| | | double HQty2 = 0;
|
| | | string HBatchNo2 = "";
|
| | | Int64 HSupID = 0;
|
| | | Int64 HGroupID = 0;
|
| | | int HPrintQty = 0;
|
| | | Int64 HBarcodeNo = 0; //æå·
|
| | | Int64 HBarcodeQtys = 0; //æ»ææ°
|
| | | Int64 HDeptID = 0;
|
| | | Int64 HWhID = 0;
|
| | | Int64 HSPID = 0;
|
| | | string HRemark = "";
|
| | | string HMaterName = "";
|
| | | string HMaterModel = "";
|
| | | string HPinfan = "";
|
| | | string HMTONo = "";
|
| | | Int64 HCusID = 0;
|
| | | string HCusType = "";
|
| | | DateTime HEndDate;
|
| | | string HWorkLineName = "";
|
| | | DateTime HBeginDate;
|
| | | string HSeOrderBillNo = "";
|
| | | string HJiaYe2 = "";
|
| | | string HPressModel = "";
|
| | | string HCusModel = "";
|
| | | string HMaterialModel = "";
|
| | | string HColor = "";
|
| | | string HLogo = "";
|
| | | string HPackageSize = "";
|
| | | double HMaterialJQty = 0;
|
| | | double HMaterialMQty = 0;
|
| | | string HCustomBatchNo = "";
|
| | | string HGBBarCode = "";
|
| | | string POOrderBillNo = "";
|
| | | //
|
| | | cmdHSaveBill.Enabled = false;
|
| | | //夿æ¯å¦åå¨ æºåä¿¡æ¯ï¼
|
| | | if (HSourceInterID <= 0 || HSourceEntryID <= 0 || DBUtility.ClsPub.isLong(txtHMaterName.Tag) <= 0 || DBUtility.ClsPub.isLong(txtHUnitName.Tag) <= 0)//夿æ¯å¦ææºå
|
| | | {
|
| | | MessageBox.Show("没æéåï¼");
|
| | | cmdHSaveBill.Enabled = true;
|
| | | return false;
|
| | | }
|
| | | if (DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text) >= 0)
|
| | | {
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text) - DBUtility.ClsPub.isDoule(txtHKSQty.Text), 1); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | lblHRelQty.Text = txtHSJQty.Text;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (MessageBox.Show("å½åç±³æ°å°äºå¼å§ç±³æ°ï¼æ¯å¦ç¡®å®è¦æ¸
é¶å¼å§ç±³æ°", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
|
| | | {
|
| | | txtHKSQty.Text = "0";
|
| | | txtHSJQty.Text = DBUtility.ClsPub.isDoule(DBUtility.ClsPub.isDoule(txtHDQQty.Text), 1); //å®é
ç±³æ°= å½åç±³æ°-å¼å§ç±³æ°
|
| | | lblHRelQty.Text = txtHSJQty.Text;
|
| | | }
|
| | | }
|
| | | if (DBUtility.ClsPub.isDoule(txtHSJQty.Text) <= 0)
|
| | | {
|
| | | MessageBox.Show("å½åæ°éä¸è½å°äºçäº0ï¼");
|
| | | cmdHSaveBill.Enabled = true;
|
| | | return false;
|
| | | }
|
| | | //if (DBUtility.ClsPub.isDoule(txtHSYQty.Text) <= 0)
|
| | | //{
|
| | | // MessageBox.Show("å©ä½æ°éå·²ç»ä¸º0ï¼ä¸è½å¨è£åï¼");
|
| | | // cmdHSaveBill.Enabled = true;
|
| | | // return false;
|
| | | //}
|
| | | if (DBUtility.ClsPub.isLong(txtHEmpID.Tag) == 0 || DBUtility.ClsPub.isLong(txtHEmpID2.Tag) == 0 ) |
| | | {
|
| | | MessageBox.Show("èå1æè
èå2没æéæ©ï¼");
|
| | | cmdHSaveBill.Enabled = true;
|
| | | return false;
|
| | | }
|
| | | if (DBUtility.ClsPub.isLong(txtHGroupID.Tag) == 0 )
|
| | | {
|
| | | MessageBox.Show("çç»æ²¡æéæ©ï¼");
|
| | | cmdHSaveBill.Enabled = true;
|
| | | return false;
|
| | | }
|
| | | |
| | |
|
| | | //æ ¹æ®æºå çææ¡å½¢ç å¹¶ä¿å妿°æ®åº
|
| | | HNumber = DBUtility.ClsPub.isStrNull(txtHMaterName.Tag);
|
| | | HBatchNo = DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
|
| | | sDate = dtpHDate.Value.ToShortDateString();
|
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2);
|
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
|
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
|
| | | sDay = "0" + ClsPub.isDate(sDate).Day.ToString();
|
| | | >>>>>>> parent of d95a654 (nothing)
|
| | | sDay = sDay.Substring(sDay.Length - 2, 2);
|
| | |
|
| | | //æ¡ç åç¼ = ç»ç»ä»£ç + ç©æå
ç + å¹´ + æ + æ¥
|
| | |
| | | else if (sType == "Sample")
|
| | | {
|
| | | sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text) + "B";
|
| | | txtHCheckerResult.Text = "";
|
| | | }
|
| | | else
|
| | | {
|
| | | sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
|
| | | txtHCheckerResult.Text = "";
|
| | | }
|
| | | //sTMNumber = HNumber + ";" + DBUtility.ClsPub.isStrNull(txtHBatchNo.Text);
|
| | |
|
| | |
| | | + ",'" + HLogo + "','" + HPackageSize + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + ",'" + HCustomBatchNo + "'"
|
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HBeginDate.ToShortDateString() + "','" + HSeOrderBillNo + "','" + HGBBarCode + "'"
|
| | | + ",'" + POOrderBillNo + "'" + "," + DBUtility.ClsPub.isLong(txtHSourceID.Tag)
|
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + txtHReasonList.Text + "','"+ HRemark + "')";
|
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','"+ txtHReasonList.Text + "','"+ HRemark + "')";
|
| | | oWeb.getRunProc(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo);
|
| | |
|
| | |
|
| | |
| | | Report.FieldByName("ç»å").AsString = ClsPub.isStrNull(txtHEmpID.Text) + ";" + ClsPub.isStrNull(txtHEmpID2.Text) + ";" + ClsPub.isStrNull(txtHEmpID3.Text);
|
| | | Report.FieldByName("æ°é").AsString = ClsPub.isStrNull(txtHSJQty.Text);
|
| | | Report.FieldByName("æ§ç©æç¼ç ").AsString = ClsPub.isStrNull(txtHOldMaterNumber.Text);
|
| | | Report.FieldByName("ä¸è¯åå ").AsString = ClsPub.isStrNull(txtHCheckerResult.Text);
|
| | | //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);
|
| | |
| | | {
|
| | | txtHReasonList.Text = "";
|
| | | txtHReasonList.Text = oGy_BadReasonList.txtHBadReason.Text;
|
| | | txtHCheckerResult.Text = "";
|
| | | txtHCheckerResult.Text = oGy_BadReasonList.txtHBadReason.Text;
|
| | | if (SaveBadReasonBill())
|
| | | {
|
| | | MessageBox.Show("ä¿åä¸è¯åå æåï¼");
|
| | |
| | | {
|
| | | txtHReasonList.Text = "";
|
| | | txtHReasonList.Text = oGy_BadReasonList.txtHBadReason.Text;
|
| | | txtHCheckerResult.Text = "";
|
| | | txtHCheckerResult.Text = oGy_BadReasonList.txtHBadReason.Text;
|
| | | oGy_BadReasonList = null;
|
| | | if (SaveBill("SaveDown"))
|
| | | {
|