| | |
| | | public const Int16 HBarCodeTypeCol = 18; |
| | | public const Int16 HBatchManagerCol = 19; |
| | | public const Int16 HBatchNoCol = 20; |
| | | public const Int16 HQtyCol = 21; |
| | | public const Int16 HMinQtyCol = 22; |
| | | public const Int16 HBQtyCol = 23; |
| | | public const Int16 HDeptIDCol = 24; |
| | | public const Int16 HDeptNumberCol = 25; |
| | | public const Int16 HDeptNameCol = 26; |
| | | public const Int16 HSourceIDCol = 27; |
| | | public const Int16 HSourceNumberCol = 28; |
| | | public const Int16 HSourceNameCol = 29; |
| | | public const Int16 HDateCol = 30; |
| | | public const Int16 HEndDateCol = 31; |
| | | public const Int16 HSupIDCol = 32; |
| | | public const Int16 HSupNumberCol = 33; |
| | | public const Int16 HSupNameCol = 34; |
| | | public const Int16 HCusIDCol = 35; |
| | | public const Int16 HCusNumberCol = 36; |
| | | public const Int16 HCusNameCol = 37; |
| | | public const Int16 HCusTypeCol = 38; |
| | | public const Int16 HSourceInterIDCol = 39; |
| | | public const Int16 HSourceEntryIDCol = 40; |
| | | public const Int16 HSourceBillNoCol = 41; |
| | | public const Int16 HSourceBillTypeCol = 42; |
| | | public const Int16 HInstructIDCol = 43; |
| | | public const Int16 HInstructNoCol = 44; |
| | | public const Int16 HSeOrderBillIDCol = 45; |
| | | public const Int16 HSeOrderBillNoCol = 46; |
| | | public const Int16 HWhIDCol = 47; |
| | | public const Int16 HWhNumberCol = 48; |
| | | public const Int16 HWhNameCol = 49; |
| | | public const Int16 HSPIDCol = 50; |
| | | public const Int16 HSPNumberCol = 51; |
| | | public const Int16 HSPNameCol = 52; |
| | | public const Int16 HinitQtyCol = 53; |
| | | public const Int16 HRemarkCol = 54; |
| | | public const Int16 HPinfanBarCodeCol = 55; |
| | | public const Int16 HMTONoCol = 56; |
| | | public const Int16 HShowDateCol = 57; |
| | | public const Int16 HInnerBillNoCol = 58; |
| | | public const Int16 HMakerCol = 59; |
| | | public const Int16 HGiveAwayFlagCol = 21; |
| | | public const Int16 HQtyCol = 22; |
| | | public const Int16 HMinQtyCol = 23; |
| | | public const Int16 HBQtyCol = 24; |
| | | public const Int16 HDeptIDCol = 25; |
| | | public const Int16 HDeptNumberCol = 26; |
| | | public const Int16 HDeptNameCol = 27; |
| | | public const Int16 HSourceIDCol = 28; |
| | | public const Int16 HSourceNumberCol = 29; |
| | | public const Int16 HSourceNameCol = 30; |
| | | public const Int16 HDateCol = 31; |
| | | public const Int16 HEndDateCol = 32; |
| | | public const Int16 HSupIDCol = 33; |
| | | public const Int16 HSupNumberCol = 34; |
| | | public const Int16 HSupNameCol = 35; |
| | | public const Int16 HCusIDCol = 36; |
| | | public const Int16 HCusNumberCol = 37; |
| | | public const Int16 HCusNameCol = 38; |
| | | public const Int16 HCusTypeCol = 39; |
| | | public const Int16 HSourceInterIDCol = 40; |
| | | public const Int16 HSourceEntryIDCol = 41; |
| | | public const Int16 HSourceBillNoCol = 42; |
| | | public const Int16 HSourceBillTypeCol = 43; |
| | | public const Int16 HInstructIDCol = 44; |
| | | public const Int16 HInstructNoCol = 45; |
| | | public const Int16 HSeOrderBillIDCol = 46; |
| | | public const Int16 HSeOrderBillNoCol = 47; |
| | | public const Int16 HWhIDCol = 48; |
| | | public const Int16 HWhNumberCol = 49; |
| | | public const Int16 HWhNameCol = 50; |
| | | public const Int16 HSPIDCol = 51; |
| | | public const Int16 HSPNumberCol = 52; |
| | | public const Int16 HSPNameCol = 53; |
| | | public const Int16 HinitQtyCol = 54; |
| | | public const Int16 HRemarkCol = 55; |
| | | public const Int16 HPinfanBarCodeCol = 56; |
| | | public const Int16 HMTONoCol = 57; |
| | | public const Int16 HShowDateCol = 58; |
| | | public const Int16 HInnerBillNoCol = 59; |
| | | public const Int16 HMakerCol = 60; |
| | | |
| | | public Int16 HSelectCol = 0; |
| | | public Int16 HSno2Col = 1; |
| | |
| | | public Int16 HAuxPropNumber2Col = 11; |
| | | public Int16 HAuxPropName2Col = 12; |
| | | public Int16 HBatchNo2Col = 13; |
| | | public Int16 HUnitID2Col = 14; |
| | | public Int16 HUnitNumber2Col = 15; |
| | | public Int16 HUnitName2Col = 16; |
| | | public Int16 HQty2Col = 17; |
| | | public Int16 HWeiCol = 18; |
| | | public Int16 HPrintCol = 19; |
| | | public Int16 HDeptID2Col = 20; |
| | | public Int16 HDeptNumber2Col = 21; |
| | | public Int16 HDeptName2Col = 22; |
| | | public Int16 HSourceID2Col = 23; |
| | | public Int16 HSourceNumber2Col = 24; |
| | | public Int16 HSourceName2Col = 25; |
| | | public Int16 HDate2Col = 26; |
| | | public Int16 HEndDate2Col = 27; |
| | | public Int16 HBarcodeNoCol = 28; |
| | | public Int16 HBarcodeQtysCol = 29; |
| | | public Int16 HSupID2Col = 30; |
| | | public Int16 HSupNumber2Col = 31; |
| | | public Int16 HSupName2Col = 32; |
| | | public Int16 HCusID2Col = 33; |
| | | public Int16 HCusNumber2Col = 34; |
| | | public Int16 HCusName2Col = 35; |
| | | public Int16 HCusType2Col = 36; |
| | | public Int16 HSourceInterID2Col = 37; |
| | | public Int16 HSourceEntryID2Col = 38; |
| | | public Int16 HSourceBillNo2Col = 39; |
| | | public Int16 HSourceBillType2Col = 40; |
| | | public Int16 HInstructID2Col = 41; |
| | | public Int16 HInstructNo2Col = 42; |
| | | public Int16 HSeOrderBillID2Col = 43; |
| | | public Int16 HSeOrderBillNo2Col = 44; |
| | | public Int16 HWhID2Col = 45; |
| | | public Int16 HWhNumber2Col = 46; |
| | | public Int16 HWhName2Col = 47; |
| | | public Int16 HSPID2Col = 48; |
| | | public Int16 HSPNumber2Col = 49; |
| | | public Int16 HSPName2Col = 50; |
| | | public Int16 HRemark2Col = 51; |
| | | public Int16 HPinfanBarCode2Col = 52; |
| | | public Int16 HMTONo2Col = 53; |
| | | public Int16 HShowDate2Col = 54; |
| | | public Int16 HInnerBillNo2Col = 55; |
| | | public Int16 HMaker2Col = 56; |
| | | public Int16 HGiveAwayFlag2Col = 14; |
| | | public Int16 HUnitID2Col = 15; |
| | | public Int16 HUnitNumber2Col = 16; |
| | | public Int16 HUnitName2Col = 17; |
| | | public Int16 HQty2Col = 18; |
| | | public Int16 HWeiCol = 19; |
| | | public Int16 HPrintCol = 20; |
| | | public Int16 HDeptID2Col = 21; |
| | | public Int16 HDeptNumber2Col = 22; |
| | | public Int16 HDeptName2Col = 23; |
| | | public Int16 HSourceID2Col = 24; |
| | | public Int16 HSourceNumber2Col = 25; |
| | | public Int16 HSourceName2Col = 26; |
| | | public Int16 HDate2Col = 27; |
| | | public Int16 HEndDate2Col = 28; |
| | | public Int16 HBarcodeNoCol = 29; |
| | | public Int16 HBarcodeQtysCol = 30; |
| | | public Int16 HSupID2Col = 31; |
| | | public Int16 HSupNumber2Col = 32; |
| | | public Int16 HSupName2Col = 33; |
| | | public Int16 HCusID2Col = 34; |
| | | public Int16 HCusNumber2Col = 35; |
| | | public Int16 HCusName2Col = 36; |
| | | public Int16 HCusType2Col = 37; |
| | | public Int16 HSourceInterID2Col = 38; |
| | | public Int16 HSourceEntryID2Col = 39; |
| | | public Int16 HSourceBillNo2Col = 40; |
| | | public Int16 HSourceBillType2Col = 41; |
| | | public Int16 HInstructID2Col = 42; |
| | | public Int16 HInstructNo2Col = 43; |
| | | public Int16 HSeOrderBillID2Col = 44; |
| | | public Int16 HSeOrderBillNo2Col = 45; |
| | | public Int16 HWhID2Col = 46; |
| | | public Int16 HWhNumber2Col = 47; |
| | | public Int16 HWhName2Col = 48; |
| | | public Int16 HSPID2Col = 49; |
| | | public Int16 HSPNumber2Col = 50; |
| | | public Int16 HSPName2Col = 51; |
| | | public Int16 HRemark2Col = 52; |
| | | public Int16 HPinfanBarCode2Col = 53; |
| | | public Int16 HMTONo2Col = 54; |
| | | public Int16 HShowDate2Col = 55; |
| | | public Int16 HInnerBillNo2Col = 56; |
| | | public Int16 HMaker2Col = 57; |
| | | // |
| | | public string ModName = "85"; |
| | | public string ModCaption = "æ¡ç çæ"; |
| | |
| | | grdSub.Rows[i].Cells[HSeOrderBillNo2Col].Value = grdMain.Rows[j].Cells[HSeOrderBillNoCol].Value; |
| | | 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; |
| | | //ç½æ ¼æå¾ |
| | | 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; |
| | | k = k + 1; |
| | | n = n + 1; |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | |
| | | string HWorkLineName = ""; |
| | | string HSeOrderBillNo = ""; |
| | | string HInnerBillNo = ""; |
| | | bool HGiveAwayFlag = false; |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | |
| | | HWorkLineName = ClsPub.isStrNull(grdSub.Rows[i].Cells[HSourceName2Col].Value); |
| | | HSeOrderBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HSeOrderBillNo2Col].Value); |
| | | HInnerBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HInnerBillNo2Col].Value); |
| | | HGiveAwayFlag = ClsPub.isBool(grdSub.Rows[i].Cells[HGiveAwayFlag2Col].Value); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " + |
| | | ",HGiveAwayFlag " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | |
| | | + ", " + 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() |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | |
| | |
| | | // |
| | | grdMain.RowCount = 0; |
| | | grdSub.RowCount = 0; |
| | | grdMain.ColumnCount = 60; //æ»åæ° |
| | | grdMain.ColumnCount = 61; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name); |
| | | grdMain.Columns[HSnoCol].HeaderText = "åºå·"; |
| | | grdMain.Columns[HMainIDCol].HeaderText = "æºå主ID"; |
| | |
| | | grdMain.Columns[HBarCodeTypeCol].HeaderText = "æ¡ç ç±»å"; |
| | | grdMain.Columns[HBatchManagerCol].HeaderText = "æ¯å¦å¯ç¨æ¹æ¬¡"; |
| | | grdMain.Columns[HBatchNoCol].HeaderText = "æ¹å·"; |
| | | grdMain.Columns[HGiveAwayFlagCol].HeaderText = "æ¯å¦èµ å"; |
| | | grdMain.Columns[HQtyCol].HeaderText = "æ°é"; |
| | | grdMain.Columns[HMinQtyCol].HeaderText = "æå°å
è£
æ°"; |
| | | grdMain.Columns[HBQtyCol].HeaderText = "ç®±æ°"; |
| | |
| | | "," + HRemarkCol.ToString(); |
| | | //设置å计å |
| | | string sTotalCol = HQtyCol.ToString(); |
| | | |
| | | //è®¾ç½®ç¹æ®å |
| | | for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | { |
| | | //ç½æ ¼æå¾ |
| | | DataGridViewCheckBoxCell oCell = new DataGridViewCheckBoxCell(); |
| | | oCell.ThreeState = false; |
| | | oCell.Value = 0; |
| | | oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdMain.Rows[i].Cells[HGiveAwayFlagCol] = oCell; |
| | | } |
| | | // |
| | | |
| | | DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol,oSumGrid); |
| | | //---------------------------- |
| | | |
| | | grdSub.ColumnCount = 57; //æ»åæ° |
| | | grdSub.ColumnCount = 58; //æ»åæ° |
| | | DBUtility.Xt_BaseBillFun.initGridFst(grdSub, this.Name); |
| | | grdSub.Columns[HSelectCol].HeaderText = "éæ©"; |
| | | grdSub.Columns[HTMCol].HeaderText = "æ¡ç ç¼å·"; |
| | |
| | | grdSub.Columns[HPinfan2Col].HeaderText = "åçª"; |
| | | grdSub.Columns[HPinfanBarCode2Col].HeaderText = "HPinfanBarCode"; |
| | | grdSub.Columns[HBatchNo2Col].HeaderText = "æ¹å·"; |
| | | grdSub.Columns[HGiveAwayFlag2Col].HeaderText = "æ¯å¦èµ å"; |
| | | grdSub.Columns[HUnitID2Col].HeaderText = "计éåä½ID"; |
| | | grdSub.Columns[HUnitNumber2Col].HeaderText = "计éåä½ä»£ç "; |
| | | grdSub.Columns[HUnitName2Col].HeaderText = "计éåä½"; |
| | |
| | | grdSub.Columns[HSourceID2Col].Visible = false; |
| | | grdSub.Columns[HSourceNumber2Col].Visible = false; |
| | | grdSub.Columns[HSourceName2Col].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; |
| | | } |
| | | |
| | | DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name); |
| | | DBUtility.Xt_BaseBillFun.GetGrid(grdSub, this.Name + "grdSub"); |
| | |
| | | grdMain.Rows[i].Cells[HSupIDCol].Value = oTable.Rows[0]["hsupid"].ToString(); |
| | | grdMain.Rows[i].Cells[HSupNumberCol].Value = oTable.Rows[0]["ä¾åºå代ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HSupNameCol].Value = oTable.Rows[0]["ä¾åºå"].ToString(); |
| | | if (cmbSourceBillType.Text.Trim() == "æ¶æéç¥å") |
| | | { |
| | | if (oTable.Rows[0]["æ¯å¦èµ å"].ToString() == "æ¯") |
| | | { |
| | | grdMain.Rows[i].Cells[HGiveAwayFlagCol].Value = 1; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[i].Cells[HGiveAwayFlagCol].Value = 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (cmbSourceBillType.Text.Trim() == "éè´§éç¥å") |
| | | { |