| | |
| | | public const Int16 HShowDateCol = 60; |
| | | public const Int16 HInnerBillNoCol = 61; |
| | | public const Int16 HMakerCol = 62; |
| | | public const Int16 HProduceDateCol = 63; |
| | | public const Int16 HExpiryDateCol = 64; |
| | | public const Int16 HISKFPERIODCol = 65; |
| | | public const Int16 HEXPUNITCol = 66; |
| | | public const Int16 HEXPPERIODCol = 67; |
| | | |
| | | public Int16 HSelectCol = 0; |
| | | public Int16 HSno2Col = 1; |
| | |
| | | public Int16 HInnerBillNo2Col = 57; |
| | | public Int16 HMaker2Col = 58; |
| | | public Int16 HEntryID2Col = 59; |
| | | public Int16 HProduceDate2Col = 60; |
| | | public Int16 HExpiryDate2Col = 61; |
| | | public Int16 HISKFPERIOD2Col = 62; |
| | | public Int16 HEXPUNIT2Col = 63; |
| | | public Int16 HEXPPERIOD2Col = 64; |
| | | // |
| | | public string ModName = "85"; |
| | | public string ModCaption = "æ¡ç çæ"; |
| | |
| | | { |
| | | 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(sHRemark!="") |
| | |
| | | grdSub.Rows[i].Cells[HInnerBillNo2Col].Value = grdMain.Rows[j].Cells[HInnerBillNoCol].Value; |
| | | grdSub.Rows[i].Cells[HMaker2Col].Value = grdMain.Rows[j].Cells[HMakerCol].Value; |
| | | grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value = grdMain.Rows[j].Cells[HGiveAwayFlagCol].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 oCell = new DataGridViewCheckBoxCell(); |
| | | oCell.ThreeState = false; |
| | | oCell.Value = grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value; |
| | | oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdSub.Rows[i].Cells[HGiveAwayFlag2Col] = oCell; |
| | | //æ¯å¦å¯ç¨ä¿è´¨æ |
| | | 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; |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | |
| | | string HInnerBillNo = ""; |
| | | bool HGiveAwayFlag = false; |
| | | Int64 HEntryID = 0; |
| | | string HProduceDate; |
| | | string HExpiryDate; |
| | | bool HISKFPERIOD = false; |
| | | string HEXPUNIT = ""; |
| | | double HEXPPERIOD = 0; |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | |
| | | HSeOrderSEQ = ClsPub.isLong(grdSub.Rows[i].Cells[HSeOrderSEQ2Col].Value); |
| | | HInnerBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HInnerBillNo2Col].Value); |
| | | HGiveAwayFlag = ClsPub.isBool(grdSub.Rows[i].Cells[HGiveAwayFlag2Col].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); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + |
| | | ",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " + |
| | | ",HProduceDate,HExpiryDate " + |
| | | ",HISKFPERIOD,HEXPUNIT,HEXPPERIOD " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" |
| | | + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) + "," + HSeOrderSEQ.ToString() + "," + HSourceEntryID.ToString() |
| | | + ", " + (HProduceDate == "" ? "NULL" : "'" + HProduceDate + "'") + "," + (HExpiryDate == "" ? "NULL" : "'" + HExpiryDate + "'") |
| | | + ", " + DBUtility.ClsPub.BoolToString(HISKFPERIOD) + ",'" + HEXPUNIT + "'," + HEXPPERIOD.ToString() |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | |
| | |
| | | // |
| | | grdMain.RowCount = 0; |
| | | grdSub.RowCount = 0; |
| | | grdMain.ColumnCount = 63; //æ»åæ° |
| | | grdMain.ColumnCount = 68; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | |
| | | grdMain.Columns[HShowDateCol].HeaderText = "æ¥æ"; |
| | | grdMain.Columns[HInnerBillNoCol].HeaderText = "å
é¨éè´è®¢åå·"; |
| | | grdMain.Columns[HMakerCol].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[HSourceIDCol].Visible = false; |
| | | grdMain.Columns[HSourceNumberCol].Visible = false; |
| | | grdMain.Columns[HSourceNameCol].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; |
| | | |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HQtyCol.ToString()+ |
| | | "," + HMinQtyCol.ToString() + |
| | |
| | | DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol,oSumGrid); |
| | | //---------------------------- |
| | | |
| | | grdSub.ColumnCount = 60; //æ»åæ° |
| | | grdSub.ColumnCount = 65; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdSub, this.Name); |
| | | grdSub.Columns[HSelectCol].HeaderText = "éæ©"; |
| | | grdSub.Columns[HTMCol].HeaderText = "æ¡ç ç¼å·"; |
| | |
| | | grdSub.Columns[HInnerBillNo2Col].HeaderText = "å
é¨éè´è®¢åå·"; |
| | | grdSub.Columns[HMaker2Col].HeaderText = "å¶å人"; |
| | | grdSub.Columns[HEntryID2Col].HeaderText = "è¡å·"; |
| | | grdSub.Columns[HProduceDate2Col].HeaderText = "çäº§æ¥æ"; |
| | | grdSub.Columns[HExpiryDate2Col].HeaderText = "æææè³"; |
| | | grdSub.Columns[HISKFPERIOD2Col].HeaderText = "æ¯å¦å¯ç¨ä¿è´¨æ"; |
| | | grdSub.Columns[HEXPUNIT2Col].HeaderText = "ä¿è´¨æåä½"; |
| | | grdSub.Columns[HEXPPERIOD2Col].HeaderText = "ä¿è´¨æ"; |
| | | //æ ¼å¼å |
| | | grdSub.Columns[HMaterID2Col].Visible = false; |
| | | grdSub.Columns[HModel2Col].Visible = false; |
| | |
| | | for (int i = 0; i < grdSub.Rows.Count; i++) |
| | | { |
| | | //ç½æ ¼æå¾ |
| | | //æ¯å¦èµ å |
| | | DataGridViewCheckBoxCell oCell = new DataGridViewCheckBoxCell(); |
| | | oCell.ThreeState = false; |
| | | oCell.Value = 0; |
| | | oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdSub.Rows[i].Cells[HGiveAwayFlag2Col] = oCell; |
| | | //æ¯å¦å¯ç¨ä¿è´¨æ |
| | | DataGridViewCheckBoxCell oCell2 = new DataGridViewCheckBoxCell(); |
| | | oCell2.ThreeState = false; |
| | | oCell2.Value = 0; |
| | | oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdSub.Rows[i].Cells[HISKFPERIOD2Col] = oCell2; |
| | | } |
| | | |
| | | DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name); |