| | |
| | | public const Int16 POOrderBillNoCol = 74; |
| | | public const Int16 HBarCode_PackCol = 75; |
| | | public const Int16 HCustomQty1Col = 76; |
| | | public const Int16 HProduceDateCol = 77; |
| | | public const Int16 HExpiryDateCol = 78; |
| | | public const Int16 HISKFPERIODCol = 79; |
| | | public const Int16 HEXPUNITCol = 80; |
| | | public const Int16 HEXPPERIODCol = 81; |
| | | |
| | | public Int16 HSelectCol = 0; |
| | | public Int16 HSno2Col = 1; |
| | |
| | | public Int16 HBarCode_Pack2Col = 73; |
| | | public Int16 HCustomQty12Col = 74; |
| | | public Int16 HCusBarCodeCol = 75; |
| | | public Int16 HProduceDate2Col = 76; |
| | | public Int16 HExpiryDate2Col = 77; |
| | | public Int16 HISKFPERIOD2Col = 78; |
| | | public Int16 HEXPUNIT2Col = 79; |
| | | public Int16 HEXPPERIOD2Col = 80; |
| | | // |
| | | public string ModName = "85"; |
| | | public string ModCaption = "æ¡ç çæ"; |
| | |
| | | public Int64 HOrgID = -1; |
| | | public string HOrgNumber = ""; |
| | | public string CampanyName = ""; //客æ·å®å¶ååç§° |
| | | public string SourceQtyCtl = "Y"; //è¶
æºåæ°éæ§å¶ |
| | | //------------------------------------------------------------------------- |
| | | #region åºå®ä»£ç |
| | | |
| | |
| | | MessageBox.Show("æç»è¡ä¸åå¨ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | |
| | | string sHRemark = ""; |
| | | for (int j = 0; j < grdMain.Rows.Count; j++) |
| | | { |
| | | long HSno = DBUtility.ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value); // åºå· |
| | | string HBarCodeType = cmbHBarCodeType.Text; // æ¡ç ç±»å |
| | | string HSourceBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBillNoCol].Value); // æºååå· |
| | | long HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value); // ç©æå
ç |
| | | string HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HBatchNoCol].Value); // æ¹å· |
| | | long HAuxPropID = DBUtility.ClsPub.isLong(grdMain.Rows[j].Cells[HAuxPropIDCol].Value); // è¾
å©å±æ§ID |
| | | double HSourceQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[HinitQtyCol].Value); // æºåæ°é |
| | | double HQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value); // æ°é |
| | | double HMinQty = DBUtility.ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value); // æå°å
è£
æ° |
| | | |
| | | if (HMaterID != 0) |
| | | { |
| | | DataSet oDsCheck = oWeb.getDataSetBySQL("exec h_p_Gy_BarCodeBill_AddCheck " + HSno.ToString() + ",'" + HBarCodeType + "','" + HSourceBillNo + "'," + HMaterID.ToString() + ",'" + HBatchNo + "'," + HAuxPropID.ToString() + "," + HSourceQty.ToString() + "," + HQty.ToString() + "," + HMinQty.ToString() + "," + HOrgID.ToString() + ",'" + SourceQtyCtl + "'", "h_p_Gy_BarCodeBill_AddCheck", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // |
| | | if (oDsCheck == null && oDsCheck.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("æ¡ç çæå®æ´æ§å¤æé误ï¼"); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | sHRemark = sHRemark + DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]); |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isBool(oDsCheck.Tables[0].Rows[0]["HISKFPERIOD"])) |
| | | { |
| | | DateTime HProduceDate; //çäº§æ¥æ |
| | | string HEXPUNIT; //ä¿è´¨æåä½ |
| | | int HEXPPERIOD; //ä¿è´¨æ |
| | | |
| | | HProduceDate = dtpHDate.Value; |
| | | HEXPUNIT = DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HEXPUNIT"]); |
| | | HEXPPERIOD = DBUtility.ClsPub.isInt(oDsCheck.Tables[0].Rows[0]["HEXPPERIOD"]); |
| | | |
| | | grdMain.Rows[j].Cells[HISKFPERIODCol].Value = 1; |
| | | grdMain.Rows[j].Cells[HEXPUNITCol].Value = HEXPUNIT; |
| | | grdMain.Rows[j].Cells[HEXPPERIODCol].Value = HEXPPERIOD.ToString(); |
| | | grdMain.Rows[j].Cells[HProduceDateCol].Value = HProduceDate.ToShortDateString(); |
| | | |
| | | if (HEXPUNIT == "Y") |
| | | { |
| | | grdMain.Rows[j].Cells[HExpiryDateCol].Value = HProduceDate.AddYears(HEXPPERIOD).ToShortDateString(); |
| | | } |
| | | else if (HEXPUNIT == "M") |
| | | { |
| | | grdMain.Rows[j].Cells[HExpiryDateCol].Value = HProduceDate.AddMonths(HEXPPERIOD).ToShortDateString(); |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[j].Cells[HExpiryDateCol].Value = HProduceDate.AddDays(HEXPPERIOD).ToShortDateString(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[j].Cells[HISKFPERIODCol].Value = 0; |
| | | grdMain.Rows[j].Cells[HEXPUNITCol].Value = ""; |
| | | grdMain.Rows[j].Cells[HEXPPERIODCol].Value = 0; |
| | | grdMain.Rows[j].Cells[HProduceDateCol].Value = ""; |
| | | grdMain.Rows[j].Cells[HExpiryDateCol].Value = ""; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0 && (ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value) == 0 || ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value) == 0 || ClsPub.isDoule(grdMain.Rows[j].Cells[HBQtyCol].Value) == 0)) |
| | | { |
| | | MessageBox.Show(" 第" + ClsPub.isLong(grdMain.Rows[j].Cells[HSnoCol].Value) + "è¡ï¼ç©æï¼" + ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNameCol].Value) + " ï¼ä¸å卿°éãæå°å
è£
æ°ãç®±æ°ä¸º 0ï¼ä¸å
è®¸çææ¡ç ï¼"); |
| | |
| | | // return false; |
| | | //} |
| | | } |
| | | } |
| | | if (sHRemark != "") |
| | | { |
| | | MessageBox.Show(sHRemark); |
| | | return false; |
| | | } |
| | | if (CampanyName == "森楷") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | |
| | | grdSub.Rows[i].Cells[HCustomQty12Col].Value = ClsPub.isLong(txtHCaseNo.Text) + i; |
| | | grdSub.Rows[i].Cells[HCusBarCodeCol].Value = CusTM; |
| | | grdSub.Rows[i].Cells[HLayerNumber2Col].Value = grdMain.Rows[j].Cells[HLayerNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HProduceDate2Col].Value = grdMain.Rows[j].Cells[HProduceDateCol].Value; |
| | | grdSub.Rows[i].Cells[HExpiryDate2Col].Value = grdMain.Rows[j].Cells[HExpiryDateCol].Value; |
| | | grdSub.Rows[i].Cells[HISKFPERIOD2Col].Value = grdMain.Rows[j].Cells[HISKFPERIODCol].Value; |
| | | grdSub.Rows[i].Cells[HEXPUNIT2Col].Value = grdMain.Rows[j].Cells[HEXPUNITCol].Value; |
| | | grdSub.Rows[i].Cells[HEXPPERIOD2Col].Value = grdMain.Rows[j].Cells[HEXPPERIODCol].Value; |
| | | //ç½æ ¼æå¾ |
| | | //æ¯å¦å¯ç¨ä¿è´¨æ |
| | | DataGridViewCheckBoxCell oCell2 = new DataGridViewCheckBoxCell(); |
| | | oCell2.ThreeState = false; |
| | | oCell2.Value = grdSub.Rows[i].Cells[HISKFPERIOD2Col].Value; |
| | | oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdSub.Rows[i].Cells[HISKFPERIOD2Col] = oCell2; |
| | | k = k + 1; |
| | | n = n + 1; |
| | | //oWeb.getRunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | string HCusBarCode = ""; |
| | | string HBarCodeStatus = ""; |
| | | Int64 sHLayerNumber = 0; //ç æ¾å±æ° |
| | | string HProduceDate; |
| | | string HExpiryDate; |
| | | bool HISKFPERIOD = false; |
| | | string HEXPUNIT = ""; |
| | | double HEXPPERIOD = 0; |
| | | |
| | | string[] sSQLMul = new string[grdSub.Rows.Count]; |
| | | |
| | |
| | | HCustomQty1 = ClsPub.isLong(grdSub.Rows[i].Cells[HCustomQty12Col].Value); //ç®±å·ï¼æ£®æ¥·ï¼ |
| | | HCusBarCode = ClsPub.isStrNull(grdSub.Rows[i].Cells[HCusBarCodeCol].Value); |
| | | sHLayerNumber = ClsPub.isLong(grdSub.Rows[i].Cells[HLayerNumber2Col].Value); |
| | | if (ClsPub.isDate(grdSub.Rows[i].Cells[HProduceDate2Col].Value) < Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | HProduceDate = ""; |
| | | } |
| | | else |
| | | { |
| | | HProduceDate = ClsPub.isStrNull(grdSub.Rows[i].Cells[HProduceDate2Col].Value); |
| | | } |
| | | if (ClsPub.isDate(grdSub.Rows[i].Cells[HExpiryDate2Col].Value) < Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | HExpiryDate = ""; |
| | | } |
| | | else |
| | | { |
| | | HExpiryDate = ClsPub.isStrNull(grdSub.Rows[i].Cells[HExpiryDate2Col].Value); |
| | | } |
| | | HISKFPERIOD = ClsPub.isBool(grdSub.Rows[i].Cells[HISKFPERIOD2Col].Value); |
| | | HEXPUNIT = ClsPub.isStrNull(grdSub.Rows[i].Cells[HEXPUNIT2Col].Value); |
| | | HEXPPERIOD = ClsPub.isDoule(grdSub.Rows[i].Cells[HEXPPERIOD2Col].Value); |
| | | sSQLMul[mm] = "insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | |
| | | ",HLogo,HPackageSize,HMaterialJQty,HMaterialMQty,HCustomBatchNo " + |
| | | ",HSTOCKORGID,HOWNERID,HBeginDate,HSeOrderBillNo,HGBBarCode " + |
| | | ",POOrderBillNo,HInterID,HInitSourceEntryID,HBarCode_Pack " + |
| | | ",HProduceDate,HExpiryDate " + |
| | | ",HISKFPERIOD,HEXPUNIT,HEXPPERIOD " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo " + |
| | | ",HCustomQty1,HLayerNumber,HCusBarCode,HBarCodeStatus " + |
| | | ") values (" |
| | |
| | | + ",'" + HLogo + "','" + HPackageSize + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + ",'" + HCustomBatchNo + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HBeginDate.ToShortDateString() + "','" + HSeOrderBillNo + "','" + HGBBarCode + "'" |
| | | + ",'" + POOrderBillNo + "'," + HInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HBarCode_Pack + "'" |
| | | + ", " + (HProduceDate == "" ? "NULL" : "'" + HProduceDate + "'") + "," + (HExpiryDate == "" ? "NULL" : "'" + HExpiryDate + "'") |
| | | + ", " + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",'" + HEXPUNIT + "'," + HEXPPERIOD.ToString() |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "'" |
| | | + ", " + HCustomQty1.ToString() + "," + sHLayerNumber.ToString() + ",'" + HCusBarCode + "','" + HBarCodeStatus + "')"; |
| | | //oCn.RunProc("exec setLSH '" + ClsPub.GetServerDate(0) + "'"); |
| | |
| | | { |
| | | grdMain.RowCount = 0; |
| | | grdSub.RowCount = 0; |
| | | grdMain.ColumnCount = 77; //æ»åæ° |
| | | grdMain.ColumnCount = 82; //æ»åæ° |
| | | ClsPub1.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | |
| | | grdMain.Columns[POOrderBillNoCol].HeaderText = "éè´è®¢åå·"; |
| | | grdMain.Columns[HBarCode_PackCol].HeaderText = "ææ¡ç ç¼å·"; |
| | | grdMain.Columns[HLayerNumberCol].HeaderText = "ç æ¾å±æ°"; |
| | | grdMain.Columns[HProduceDateCol].HeaderText = "çäº§æ¥æ"; |
| | | grdMain.Columns[HExpiryDateCol].HeaderText = "æææè³"; |
| | | grdMain.Columns[HISKFPERIODCol].HeaderText = "æ¯å¦å¯ç¨ä¿è´¨æ"; |
| | | grdMain.Columns[HEXPUNITCol].HeaderText = "ä¿è´¨æåä½"; |
| | | grdMain.Columns[HEXPPERIODCol].HeaderText = "ä¿è´¨æ"; |
| | | //// |
| | | //æ ¼å¼å éèå |
| | | grdMain.Columns[HTagCol].Visible = false; |
| | |
| | | grdMain.Columns[HBarCode_PackCol].Visible = false; |
| | | grdMain.Columns[HCustomQty1Col].Visible = false; |
| | | grdMain.Columns[HLayerNumberCol].Visible = false; |
| | | grdMain.Columns[HProduceDateCol].Visible = false; |
| | | grdMain.Columns[HExpiryDateCol].Visible = false; |
| | | grdMain.Columns[HISKFPERIODCol].Visible = false; |
| | | grdMain.Columns[HEXPUNITCol].Visible = false; |
| | | grdMain.Columns[HEXPPERIODCol].Visible = false; |
| | | |
| | | if (CampanyName == "é©çµ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | |
| | | ClsPub1.initGridLast(sAllowCol, sTotalCol, oSumGrid); |
| | | //---------------------------- |
| | | |
| | | grdSub.ColumnCount = 76; //æ»åæ° |
| | | grdSub.ColumnCount = 81; //æ»åæ° |
| | | ClsPub1.initGridFst(grdSub, this.Name); |
| | | grdSub.Columns[HSelectCol].HeaderText = "éæ©"; |
| | | grdSub.Columns[HTMCol].HeaderText = "æ¡ç ç¼å·"; |
| | |
| | | grdSub.Columns[HBarCode_Pack2Col].HeaderText = "ææ¡ç ç¼å·"; |
| | | grdSub.Columns[HCusBarCodeCol].HeaderText = "å®¢æ·æ¡ç "; |
| | | grdSub.Columns[HLayerNumber2Col].HeaderText = "ç æ¾å±æ°"; |
| | | grdSub.Columns[HProduceDate2Col].HeaderText = "çäº§æ¥æ"; |
| | | grdSub.Columns[HExpiryDate2Col].HeaderText = "æææè³"; |
| | | grdSub.Columns[HISKFPERIOD2Col].HeaderText = "æ¯å¦å¯ç¨ä¿è´¨æ"; |
| | | grdSub.Columns[HEXPUNIT2Col].HeaderText = "ä¿è´¨æåä½"; |
| | | grdSub.Columns[HEXPPERIOD2Col].HeaderText = "ä¿è´¨æ"; |
| | | |
| | | //æ ¼å¼å éèå |
| | | grdSub.Columns[HBarCodeType2Col].Visible = false; |
| | |
| | | grdSub.Columns[HCustomQty12Col].Visible = false; |
| | | grdSub.Columns[HCusBarCodeCol].Visible = false; |
| | | grdSub.Columns[HLayerNumber2Col].Visible = false; |
| | | |
| | | //è®¾ç½®ç¹æ®å |
| | | for (int i = 0; i < grdSub.Rows.Count; i++) |
| | | { |
| | | //ç½æ ¼æå¾ |
| | | //æ¯å¦å¯ç¨ä¿è´¨æ |
| | | DataGridViewCheckBoxCell oCell2 = new DataGridViewCheckBoxCell(); |
| | | oCell2.ThreeState = false; |
| | | oCell2.Value = 0; |
| | | oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdSub.Rows[i].Cells[HISKFPERIOD2Col] = oCell2; |
| | | } |
| | | |
| | | if (CampanyName == "é©çµ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | { |
| | |
| | | grdMain.Rows[i].Cells[HGroupIDCol].Value = oTable.Rows[0]["HGroupID"].ToString(); |
| | | grdMain.Rows[i].Cells[HGroupNumberCol].Value = oTable.Rows[0]["çç»ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HGroupNameCol].Value = oTable.Rows[0]["çç»"].ToString(); |
| | | grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["HProduceDate"].ToString(); |
| | | grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["HExpiryDate"].ToString(); |
| | | grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString(); |
| | | grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString(); |
| | | grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString(); |
| | | //-- |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HTagCol.ToString(); |