| | |
| | | public const Int16 HMaterIDCol = 6; |
| | | public const Int16 HMaterNumberCol = 7; |
| | | public const Int16 HMaterNameCol = 8; |
| | | public const Int16 HPinfanCol = 9; |
| | | public const Int16 HMaterModelCol = 10; |
| | | public const Int16 HPinfanCol = 9;// |
| | | public const Int16 HMaterModelCol = 10;// |
| | | public const Int16 HModelCol = 11; |
| | | public const Int16 HAuxPropIDCol = 12; |
| | | public const Int16 HAuxPropNumberCol = 13; |
| | |
| | | cmbHBarCodeType.Items.Clear(); |
| | | cmbSourceBillType.Items.Clear(); |
| | | |
| | | cmbHBarCodeType.Items.Add("å¯ä¸æ¡ç "); |
| | | cmbHBarCodeType.Items.Add("åç§æ¡ç "); |
| | | cmbHBarCodeType.Items.Add("æ¹æ¬¡æ¡ç "); |
| | | //cmbHBarCodeType.Items.Add("æçæ¡ç "); |
| | | //æ ¹æ®ç³»ç»åæ°è·å对åºçæ¡ç ç±»åï¼å¤å®çµå¨ã忥 以åä½¿ç¨æ¡ç è§åè¡¨ï¼ |
| | | ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter(); |
| | | string sCapName = oClsXt_SystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if(sCapName=="å¤å®çµå¨") |
| | | { |
| | | cmbHBarCodeType.Items.Add("å
éæºæ¡ç "); |
| | | cmbHBarCodeType.Items.Add("å¤éæºæ¡ç "); |
| | | cmbHBarCodeType.Items.Add("åæåæ¡ç "); |
| | | } |
| | | else if (sCapName == "åæ¥ç§æ") |
| | | { |
| | | cmbHBarCodeType.Items.Add("仪å¨å¤è´ä»¶æ¡ç æ®éè§å"); |
| | | cmbHBarCodeType.Items.Add("仪å¨å¤è´ä»¶æ¡ç 容å¨è§å"); |
| | | cmbHBarCodeType.Items.Add("ä»ªå¨æåæ¡ç è§å"); |
| | | cmbHBarCodeType.Items.Add("è¯åæåæ¡ç è§å"); |
| | | } |
| | | else |
| | | { |
| | | // |
| | | cmbHBarCodeType.Items.Add("å¯ä¸æ¡ç "); |
| | | cmbHBarCodeType.Items.Add("åç§æ¡ç "); |
| | | cmbHBarCodeType.Items.Add("æ¹æ¬¡æ¡ç "); |
| | | //cmbHBarCodeType.Items.Add("æçæ¡ç "); |
| | | } |
| | | |
| | | // |
| | | cmbSourceBillType.Items.Add("ç产订å"); |
| | | cmbSourceBillType.Items.Add("çäº§æ±æ¥å"); |
| | |
| | | return false; |
| | | } |
| | | bc.Enabled = false; |
| | | SaveBarCode(); |
| | | if (cmbHBarCodeType.Text == "ä»ªå¨æåæ¡ç è§å") |
| | | { |
| | | SaveBarCode_bori(); //ç©æç¼ç +åºåå·+çäº§æ¥æ |
| | | } |
| | | else |
| | | { |
| | | SaveBarCode(); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | int LSHlen = 6; //æµæ°´å·é¿åº¦ |
| | | int SumLen = 10; //æ»é¿åº¦ |
| | | string TM = ""; //æ¡ç |
| | | string HNumber = ""; //ç©æä»£ç |
| | | string HNumber = ""; //ç©æå
ç |
| | | string HMaterNumber = ""; //ç©æä»£ç |
| | | double HSumQty = 0; //äº§åæ°é |
| | | double HMinQty = 0; //æå°å
è£
æ° |
| | | int HBQty = 0; //ç®±æ° |
| | |
| | | string sPeriod = ""; //æ |
| | | string sDay = ""; //æ¥ |
| | | string HBatchNo = ""; //æ¹æ¬¡ |
| | | string HYasuoji = ""; //åç¼©æº |
| | | string HModelName = ""; //æºå |
| | | string HICMOBillNo = ""; //æºåå· |
| | | string HBarCodeBatchNo = ""; //æ¡ç æ¹æ¬¡å· |
| | | string HBarCodeDate = ""; //æ¡ç æ¥æ |
| | | int k = 0; |
| | | int n = 0; //å䏿¹çææ¡ç ä¸çç¬¬å æ¡ |
| | | string sTMNumber = ""; //æ¡ç èªå®ä¹åç¼ |
| | |
| | | if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0) |
| | | { |
| | | HNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterIDCol].Value); |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNumberCol].Value); |
| | | HBatchNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBatchNoCol].Value); |
| | | //æ¥æè·åæ¹å¼ |
| | | sDate = dtpHDate.Value.ToShortDateString(); |
| | | // |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") //åæ®æ¥æ(æ¶æéç¥å) |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HDateCol].Value); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å")// å¤±ææ¥æï¼ç产订åï¼ |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HEndDateCol].Value); |
| | | } |
| | | else if (CampanyName == "å¤å®çµå¨")// æ¥æï¼çäº§è®¢å æ¡ç æ¥æ |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HDateCol].Value); |
| | | } |
| | | HYasuoji= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanCol].Value); //å缩æºä»£ç ï¼å¤å®çµå¨ï¼ |
| | | HModelName= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusTypeCol].Value); //æºåï¼å¤å®çµå¨ï¼ |
| | | HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSourceBillNoCol].Value); //ç产订åå·ï¼å¤å®çµå¨ï¼ |
| | | HBarCodeBatchNo= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanBarCodeCol].Value); //æ¡ç æ¹æ¬¡å·ï¼å¤å®çµå¨ï¼ |
| | | HBarCodeDate= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSupNumberCol].Value); //æ¡ç æ¥æï¼å¤å®çµå¨ï¼ |
| | | // |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | |
| | | else if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç ") |
| | | { |
| | | TM = HOrgNumber + HNumber + HBatchNo; |
| | | }//åæ¥ç¹æ®å¤ç |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | //ç©æç¼ç +åæ®æ¥æï¼YYMMDDï¼+æµæ°´4ä½ |
| | | sTMNumber = HMaterNumber + sYear + sPeriod + sDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | } |
| | | else if (cmbHBarCodeType.Text == "ä»ªå¨æåæ¡ç è§å") //å¦å¤å¤çäº |
| | | { |
| | | //ç©æç¼ç +åºåå·+çäº§æ¥æ |
| | | //sTMNumber = HMaterNumber + sYear + sPeriod + sDay; |
| | | //Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | // //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | //LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å") |
| | | { |
| | | //ç©æç¼ç +ç产æ¹å·+å¤±ææ¥æï¼YYMMDDï¼+æµæ°´å·6ä½- |
| | | sTMNumber = HMaterNumber + HBatchNo + sYear + sPeriod + sDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 6; |
| | | } |
| | | else if (cmbHBarCodeType.Text == "å
éæºæ¡ç ") |
| | | { |
| | | //å¶é æ¬é¨1ä½ï¼é»è®¤1ï¼+æºå代ç 5ä½ï¼ï¼+å¹´2ä½+æ1ä½ï¼AãBãC代æ¿10æä»½ï¼ |
| | | //+æ¥2ä½+æ¡ç æ¹æ¬¡ç 2ä½+å缩æºä»£ç 1ä½+00+æµæ°´å·4ä½+æ ¡éªç ï¼é»è®¤0ï¼ |
| | | sTMNumber = "1" + HModelName + HBarCodeDate + HBarCodeBatchNo + HYasuoji + "00" ; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | if (sTMNumber.Length != 16) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤16ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼å¶é æ¬é¨1ä½:[0] + æºå代ç 5ä½:[" + HModelName + "] + å¹´ææ¥5ä½:["+ HBarCodeDate + "] + æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "]+ å缩æº1ä½:["+ HYasuoji + "]+00 ; "); |
| | | return; |
| | | } |
| | | } |
| | | else if (cmbHBarCodeType.Text == "å¤éæºæ¡ç ") |
| | | { |
| | | //ç©æä»£ç 11ä½+å¹´2ä½+æ1ä½ï¼AãBãC代æ¿10æä»½ï¼+æ¥2ä½+æ¹æ¬¡2ä½+æµæ°´å·4ä½ |
| | | //sTMNumber = HMaterNumber.Replace(Convert.ToChar("."),Convert.ToChar("")) + HBarCodeDate + HBarCodeBatchNo; |
| | | sTMNumber = HMaterNumber.Replace( "." , "" ) + HBarCodeDate + HBarCodeBatchNo; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | if (sTMNumber.Length != 18) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤18ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼ç©æä»£ç 11ä½:["+ HMaterNumber.Replace(".", "") + "]+å¹´ææ¥5ä½:["+ HBarCodeDate + "]+æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "];"); |
| | | return; |
| | | } |
| | | } |
| | | else if (cmbHBarCodeType.Text == "åæåæ¡ç ") |
| | | { |
| | | //ç产订åå·+4使µæ°´å· |
| | | sTMNumber = HICMOBillNo; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | } |
| | | //else if (cmbHBarCodeType.Text == "æçæ¡ç ") |
| | | //{ |
| | |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | TM = sTMNumber + LSH2; |
| | | } |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å" || cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å" |
| | | || cmbHBarCodeType.Text == "åæåæ¡ç " || cmbHBarCodeType.Text == "å¤éæºæ¡ç ") |
| | | { |
| | | TM = sTMNumber + LSH2; |
| | | |
| | | } |
| | | else if (cmbHBarCodeType.Text == "å
éæºæ¡ç ") |
| | | { |
| | | TM = sTMNumber + LSH2 + "0"; |
| | | } |
| | | // |
| | | if (i + 1 > grdSub.Rows.Count) |
| | | { |
| | | grdSub.RowCount = grdSub.RowCount + 1; |
| | |
| | | { |
| | | HWei = ClsPub.isStrNull(grdSub.Rows[i].Cells[HWeiCol].Value); |
| | | HBarCode = ClsPub.isStrNull(grdSub.Rows[i].Cells[HTMCol].Value); |
| | | // |
| | | HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | | if (CampanyName == "åæ¥ç§æ" || CampanyName == "å¤å®çµå¨") |
| | | { |
| | | HBarCodeType = "å¯ä¸æ¡ç "; |
| | | } |
| | | // |
| | | HMaterID = ClsPub.isLong(grdSub.Rows[i].Cells[HMaterID2Col].Value); |
| | | HAuxPropID = ClsPub.isLong(grdSub.Rows[i].Cells[HAuxPropID2Col].Value); |
| | | HUnitID = ClsPub.isLong(grdSub.Rows[i].Cells[HUnitID2Col].Value); |
| | | HQty2 = ClsPub.isDoule(grdSub.Rows[i].Cells[HQty2Col].Value); |
| | | HBatchNo2 = ClsPub.isStrNull(grdSub.Rows[i].Cells[HBatchNo2Col].Value); |
| | | HSourceInterID = ClsPub.isLong(grdSub.Rows[i].Cells[HSourceInterID2Col].Value); |
| | | HSourceEntryID = ClsPub.isLong(grdSub.Rows[i].Cells[HSourceEntryID2Col].Value); |
| | | HSourceBillNo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HSourceBillNo2Col].Value); |
| | | HSourceBillType = ClsPub.isStrNull(grdSub.Rows[i].Cells[HSourceBillType2Col].Value); |
| | | HBarcodeQtys = ClsPub.isLong(grdSub.Rows[i].Cells[HBarcodeQtysCol].Value); |
| | | HBarcodeNo = ClsPub.isLong(grdSub.Rows[i].Cells[HBarcodeNoCol].Value); |
| | | HSupID = ClsPub.isLong(grdSub.Rows[i].Cells[HSupID2Col].Value); |
| | | HDeptID = ClsPub.isLong(grdSub.Rows[i].Cells[HDeptID2Col].Value); |
| | | HWhID = ClsPub.isLong(grdSub.Rows[i].Cells[HWhID2Col].Value); |
| | | HSPID = ClsPub.isLong(grdSub.Rows[i].Cells[HSPID2Col].Value); |
| | | HRemark = ClsPub.isStrNull(grdSub.Rows[i].Cells[HRemark2Col].Value); |
| | | HMaterName = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterName2Col].Value); |
| | | HMaterModel = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterModel2Col].Value); |
| | | HPinfan = ClsPub.isStrNull(grdSub.Rows[i].Cells[HPinfan2Col].Value); |
| | | HMTONo = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMTONo2Col].Value); |
| | | HCusID = ClsPub.isLong(grdSub.Rows[i].Cells[HCusID2Col].Value); |
| | | HCusType = ClsPub.isStrNull(grdSub.Rows[i].Cells[HCusType2Col].Value); |
| | | HEndDate = ClsPub.isDate(grdSub.Rows[i].Cells[HEndDate2Col].Value); |
| | | 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() |
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.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() |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | |
| | | |
| | | //HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value); |
| | | //if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") |
| | | //{ |
| | | // if (CampanyName == "åå") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | | // { |
| | | // //æ¡ç åç¼ = ç©æä»£ç + å¹´ + æ + æ¥ |
| | | // sTMNumber = HNumber + sYear + sPeriod + sDay; |
| | | // } |
| | | // else if (CampanyName == "é£é¾") |
| | | // { |
| | | // string HWorksNumber = ""; |
| | | // HWorksNumber = cmbHWorksNumber.Text; |
| | | // if (HWorksNumber == "") |
| | | // { |
| | | // MessageBox.Show("å·¥å代ç ä¸è½ä¸ºç©ºï¼"); |
| | | // return; |
| | | // } |
| | | // //æ¡ç åç¼ = å·¥å代ç + ç©æå
ç + æ¥æ |
| | | // sTMNumber = HWorksNumber + HNumber + sYear + sPeriod + sDay; |
| | | // } |
| | | // else //éç¨æ¹æ³ |
| | | // { |
| | | // //æ¡ç åç¼ = ç»ç»ä»£ç + ç©æä»£ç + å¹´ + æ + æ¥ |
| | | // sTMNumber = HOrgNumber + HNumber + sYear + sPeriod + sDay; |
| | | // } |
| | | //} |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | } |
| | | } |
| | | //å¢å æ¡ç è¶
è¿æªçæåè½æ§å¶ |
| | | |
| | | // |
| | | oCn.Commit(); |
| | | MessageBox.Show("æ¡ç çæå®æ¯ï¼"); |
| | | //grdSub.RowCount = 0; |
| | | tabControl1.SelectedIndex = 1; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | MessageBox.Show("æ¡ç çæå¤±è´¥ï¼" + e.Message); |
| | | grdSub.RowCount = 0; |
| | | } |
| | | } |
| | | |
| | | ////æä»½è½¬å |
| | | //private string Sub_PeriodChange(string sPeriod) |
| | | //{ |
| | | // if(sPeriod=="10") |
| | | // { |
| | | // return "A"; |
| | | // } |
| | | // else if (sPeriod == "11") |
| | | // { |
| | | // return "B"; |
| | | // } |
| | | // else if (sPeriod == "12") |
| | | // { |
| | | // return "C"; |
| | | // } |
| | | // else |
| | | // { |
| | | // return sPeriod.Substring(1, 1); |
| | | // } |
| | | //} |
| | | |
| | | |
| | | //çææ¡ç 忥 |
| | | //ç©æç¼ç +åºåå·+çäº§æ¥æ |
| | | private void SaveBarCode_bori() |
| | | { |
| | | grdSub.Rows.Clear(); |
| | | int LSHlen = 6; //æµæ°´å·é¿åº¦ |
| | | int SumLen = 10; //æ»é¿åº¦ |
| | | string TM = ""; //æ¡ç |
| | | string HNumber = ""; //ç©æå
ç |
| | | string HMaterNumber = ""; //ç©æä»£ç |
| | | 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; |
| | | //Ds = oCn.RunProcReturn("exec GetLSH '" + ClsPub.GetServerDate(0) + "'", "GetLSH"); |
| | | //LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | for (int j = 0; j < grdMain.Rows.Count; j++) |
| | | { |
| | | if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0) |
| | | { |
| | | HNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterIDCol].Value); |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterNumberCol].Value); |
| | | HBatchNo = ClsPub.isStrNull(grdMain.Rows[j].Cells[HBatchNoCol].Value); |
| | | //æ¥æè·åæ¹å¼ |
| | | sDate = dtpHDate.Value.ToShortDateString(); |
| | | // |
| | | if (cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å")// å¤±ææ¥æï¼ç产订åï¼ |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HEndDateCol].Value); |
| | | } |
| | | // |
| | | 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(); |
| | | sDay = sDay.Substring(sDay.Length - 2, 2); |
| | | //================================== |
| | | //if (cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å") |
| | | //{ |
| | | // //æ¡ç åç¼ = ç»ç»ä»£ç + ç©æä»£ç + å¹´ + æ + æ¥ |
| | | //sTMNumber = HMaterNumber + HNumber + sYear + sPeriod + sDay; |
| | | // Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | // //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | // LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | //} |
| | | //else |
| | | //{ |
| | | // MessageBox.Show("éè¯¯çæ¡ç ç±»åï¼ä¸è½çææ¡ç ï¼"); |
| | | // return; |
| | | //} |
| | | |
| | | HBQty = HBQty + ClsPub.isInt(grdMain.Rows[j].Cells[HBQtyCol].Value); |
| | | HMinQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value); |
| | | HSumQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value); |
| | | n = 0; |
| | | //ä»éè¶åºåå·è¡¨è·ååºåå· |
| | | DataSet DSet = oCn.RunProcReturn("exec h_p_CLD_GetBarCodeSno "+ ClsPub.isStrNull(grdMain.Rows[j].Cells[HMainIDCol].Value) + "," + ClsPub.isStrNull(grdMain.Rows[j].Cells[HSubIDCol].Value) + " ", "h_p_CLD_GetBarCodeSno", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | | MessageBox.Show("没æè¿åä»»ä½ç»æ,éè¶äºåºåå·ä¸åå¨ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | continue; |
| | | } |
| | | // |
| | | |
| | | for (int i = k; i < DSet.Tables[0].Rows.Count; i++) |
| | | //for (int i = k; i < HBQty; i++) |
| | | { |
| | | if (HSumQty - HMinQty > 0) |
| | | { |
| | | WeiShu = ""; |
| | | HSumQty = HSumQty - HMinQty; |
| | | } |
| | | else |
| | | { |
| | | if (HSumQty == HMinQty) |
| | | { |
| | | WeiShu = ""; |
| | | } |
| | | else |
| | | { |
| | | WeiShu = "å°¾æ°"; |
| | | } |
| | | HMinQty = HSumQty; |
| | | } |
| | | // |
| | | //LSH = LSH + 1; |
| | | LSH2 =DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[n]["SHNO"]); |
| | | //while (LSH2.Length < LSHlen) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 |
| | | //{ |
| | | // LSH2 = "0" + LSH2; |
| | | //} |
| | | //if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") |
| | | //{ |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | //T/*M*/ = HMaterNumber + LSH2 + sYear + sPeriod + sDay; |
| | | TM = LSH2 + sYear + sPeriod + sDay; |
| | | //} |
| | | |
| | | if (i + 1 > grdSub.Rows.Count) |
| | | { |
| | | grdSub.RowCount = grdSub.RowCount + 1; |
| | | } |
| | | grdSub.Rows[i].Cells[HSno2Col].Value = ClsPub.isStrNull(i + 1); |
| | | if (TM.Trim() == "") |
| | | { |
| | | MessageBox.Show("æ¡å½¢ç ä¸è½ä¸ºç©ºï¼ä¸è½çææ¡ç ï¼"); |
| | | return; |
| | | } |
| | | grdSub.Rows[i].Cells[HTMCol].Value = TM; |
| | | grdSub.Rows[i].Cells[HMaterID2Col].Value = grdMain.Rows[j].Cells[HMaterIDCol].Value; |
| | | grdSub.Rows[i].Cells[HMaterNumber2Col].Value = grdMain.Rows[j].Cells[HMaterNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HMaterName2Col].Value = grdMain.Rows[j].Cells[HMaterNameCol].Value; |
| | | grdSub.Rows[i].Cells[HMaterModel2Col].Value = grdMain.Rows[j].Cells[HMaterModelCol].Value; |
| | | grdSub.Rows[i].Cells[HPinfan2Col].Value = grdMain.Rows[j].Cells[HPinfanCol].Value; |
| | | grdSub.Rows[i].Cells[HPinfanBarCode2Col].Value = grdMain.Rows[j].Cells[HPinfanBarCodeCol].Value; |
| | | |
| | | grdSub.Rows[i].Cells[HAuxPropID2Col].Value = grdMain.Rows[j].Cells[HAuxPropIDCol].Value; |
| | | grdSub.Rows[i].Cells[HAuxPropNumber2Col].Value = grdMain.Rows[j].Cells[HAuxPropNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HAuxPropName2Col].Value = grdMain.Rows[j].Cells[HAuxPropNameCol].Value; |
| | | |
| | | grdSub.Rows[i].Cells[HUnitID2Col].Value = grdMain.Rows[j].Cells[HUnitIDCol].Value; |
| | | grdSub.Rows[i].Cells[HUnitNumber2Col].Value = grdMain.Rows[j].Cells[HUnitNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HUnitName2Col].Value = grdMain.Rows[j].Cells[HUnitNameCol].Value; |
| | | |
| | | grdSub.Rows[i].Cells[HQty2Col].Value = HMinQty; |
| | | grdSub.Rows[i].Cells[HBatchNo2Col].Value = grdMain.Rows[j].Cells[HBatchNoCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceInterID2Col].Value = grdMain.Rows[j].Cells[HMainIDCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceEntryID2Col].Value = grdMain.Rows[j].Cells[HSubIDCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceBillNo2Col].Value = grdMain.Rows[j].Cells[HBillNoCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceBillType2Col].Value = grdMain.Rows[j].Cells[HBillTypeCol].Value; |
| | | grdSub.Rows[i].Cells[HPrintCol].Value = "0"; |
| | | grdSub.Rows[i].Cells[HWeiCol].Value = WeiShu; |
| | | grdSub.Rows[i].Cells[HBarcodeNoCol].Value = n + 1; |
| | | grdSub.Rows[i].Cells[HBarcodeQtysCol].Value = grdMain.Rows[j].Cells[HBQtyCol].Value; |
| | | grdSub.Rows[i].Cells[HSupID2Col].Value = grdMain.Rows[j].Cells[HSupIDCol].Value; |
| | | grdSub.Rows[i].Cells[HSupNumber2Col].Value = grdMain.Rows[j].Cells[HSupNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HSupName2Col].Value = grdMain.Rows[j].Cells[HSupNameCol].Value; |
| | | grdSub.Rows[i].Cells[HDeptID2Col].Value = grdMain.Rows[j].Cells[HDeptIDCol].Value; |
| | | grdSub.Rows[i].Cells[HDeptNumber2Col].Value = grdMain.Rows[j].Cells[HDeptNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HDeptName2Col].Value = grdMain.Rows[j].Cells[HDeptNameCol].Value; |
| | | grdSub.Rows[i].Cells[HRemark2Col].Value = grdMain.Rows[j].Cells[HRemarkCol].Value; |
| | | grdSub.Rows[i].Cells[HDate2Col].Value = grdMain.Rows[j].Cells[HDateCol].Value; |
| | | grdSub.Rows[i].Cells[HShowDate2Col].Value = grdMain.Rows[j].Cells[HShowDateCol].Value; |
| | | grdSub.Rows[i].Cells[HWhID2Col].Value = grdMain.Rows[j].Cells[HWhIDCol].Value; |
| | | grdSub.Rows[i].Cells[HWhNumber2Col].Value = grdMain.Rows[j].Cells[HWhNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HWhName2Col].Value = grdMain.Rows[j].Cells[HWhNameCol].Value; |
| | | grdSub.Rows[i].Cells[HSPID2Col].Value = grdMain.Rows[j].Cells[HSPIDCol].Value; |
| | | grdSub.Rows[i].Cells[HSPNumber2Col].Value = grdMain.Rows[j].Cells[HSPNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HSPName2Col].Value = grdMain.Rows[j].Cells[HSPNameCol].Value; |
| | | grdSub.Rows[i].Cells[HMTONo2Col].Value = grdMain.Rows[j].Cells[HMTONoCol].Value; |
| | | grdSub.Rows[i].Cells[HCusID2Col].Value = grdMain.Rows[j].Cells[HCusIDCol].Value; |
| | | grdSub.Rows[i].Cells[HCusNumber2Col].Value = grdMain.Rows[j].Cells[HCusNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HCusName2Col].Value = grdMain.Rows[j].Cells[HCusNameCol].Value; |
| | | grdSub.Rows[i].Cells[HCusType2Col].Value = grdMain.Rows[j].Cells[HCusTypeCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceID2Col].Value = grdMain.Rows[j].Cells[HSourceIDCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceNumber2Col].Value = grdMain.Rows[j].Cells[HSourceNumberCol].Value; |
| | | grdSub.Rows[i].Cells[HSourceName2Col].Value = grdMain.Rows[j].Cells[HSourceNameCol].Value; |
| | | grdSub.Rows[i].Cells[HEndDate2Col].Value = grdMain.Rows[j].Cells[HEndDateCol].Value; |
| | | 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 HWei = ""; //å°¾æ° |
| | | string 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 HSourceInterID = 0; |
| | | Int64 HSourceEntryID = 0; |
| | | string HSourceBillNo = ""; |
| | | string HSourceBillType = ""; |
| | | 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 = ""; |
| | | string HSeOrderBillNo = ""; |
| | | string HInnerBillNo = ""; |
| | | bool HGiveAwayFlag = false; |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | for (int i = 0; i < grdSub.Rows.Count; i++) |
| | | { |
| | | if (ClsPub.isLong(grdSub.Rows[i].Cells[HMaterID2Col].Value) != 0) |
| | | { |
| | | HWei = ClsPub.isStrNull(grdSub.Rows[i].Cells[HWeiCol].Value); |
| | | HBarCode = ClsPub.isStrNull(grdSub.Rows[i].Cells[HTMCol].Value); |
| | | // |
| | | HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | | if (CampanyName == "åæ¥ç§æ" || CampanyName == "å¤å®çµå¨") |
| | | { |
| | | HBarCodeType = "å¯ä¸æ¡ç "; |
| | | } |
| | | // |
| | | HMaterID = ClsPub.isLong(grdSub.Rows[i].Cells[HMaterID2Col].Value); |
| | | HAuxPropID = ClsPub.isLong(grdSub.Rows[i].Cells[HAuxPropID2Col].Value); |
| | | HUnitID = ClsPub.isLong(grdSub.Rows[i].Cells[HUnitID2Col].Value); |
| | |
| | | grdMain.Rows[i].Cells[HMainIDCol].Value = oTable.Rows[0]["hmainid"].ToString(); |
| | | grdMain.Rows[i].Cells[HSubIDCol].Value = oTable.Rows[0]["hsubid"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillNoCol].Value = oTable.Rows[0]["åæ®å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HSourceBillNoCol].Value = oTable.Rows[0]["åæ®å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillTypeCol].Value = oTable.Rows[0]["HBillType"].ToString(); |
| | | grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["æ¥æ"].ToString(); |
| | | grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["æ¥æ"].ToString(); //忥 æ¶æåæ®æ¥æ |
| | | grdMain.Rows[i].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString(); |
| | | 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[HCusNumberCol].Value = oTable.Rows[0]["客æ·ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HCusNameCol].Value = oTable.Rows[0]["客æ·"].ToString(); |
| | | grdMain.Rows[i].Cells[HCusTypeCol].Value = oTable.Rows[0]["客æ·åå·"].ToString(); |
| | | grdMain.Rows[i].Cells[HPinfanBarCodeCol].Value = oTable.Rows[0]["HPinfanBarCode"].ToString(); |
| | | grdMain.Rows[i].Cells[HPinfanCol].Value = oTable.Rows[0]["HPinfan"].ToString(); |
| | | //grdMain.Rows[i].Cells[HSourceIDCol].Value = oTable.Rows[0]["HSourceID"].ToString(); |
| | | //grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["ç产线代ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["ç产线"].ToString(); |
| | | grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["计åå®å·¥æ¥æ"].ToString(); |
| | | if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç " && CampanyName == "åæ¥ç§æ") |
| | | grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["计åå®å·¥æ¥æ"].ToString();//忥 ç产订å å¤±ææ¥æ |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å" ) |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" |
| | | || cmbHBarCodeType.Text == "ä»ªå¨æåæ¡ç è§å" |
| | | || cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å") |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = "1"; |
| | | } |
| | | else |
| | | { |
| | |
| | | grdMain.Rows[i].Cells[HSubIDCol].Value = oTable.Rows[0]["hsubid"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillNoCol].Value = oTable.Rows[0]["åæ®å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillTypeCol].Value = oTable.Rows[0]["HBillType"].ToString(); |
| | | grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["æ¥æ"].ToString(); |
| | | grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["æ¥æ"].ToString(); //忥 åæ®æ¥æ |
| | | grdMain.Rows[i].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString(); |
| | | grdMain.Rows[i].Cells[HDeptIDCol].Value = oTable.Rows[0]["HDeptID"].ToString(); |
| | | grdMain.Rows[i].Cells[HDeptNumberCol].Value = oTable.Rows[0]["é¨é¨ä»£ç "].ToString(); |
| | |
| | | grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["计éåä½"].ToString(); |
| | | grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["夿³¨"].ToString(); |
| | | grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["计åè·è¸ªå·"].ToString(); |
| | | if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç " && CampanyName == "åæ¥ç§æ") |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å") |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = "1"; |
| | | } |
| | | else |
| | | { |
| | |
| | | for (int i = 0; i < grdList.Rows.Count; i++) |
| | | { |
| | | grdList.Rows[i].Cells[0].Value = "*"; |
| | | } |
| | | // |
| | | Report = new GridppReport(); |
| | | Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf"); //here . |
| | | Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord); |
| | | Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable); |
| | | Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd); |
| | | } |
| | | |
| | | |
| | | private void Sub_SetReportView(string sOpenTmp) |
| | | { |
| | | //å¤æè¡æ° |
| | | for (int i = 0; i < grdList.Rows.Count; i++) |
| | | { |
| | | grdList.Rows[i].Cells[0].Value = ""; |
| | | } |
| | | for (int i = 0; i < grdList.SelectedRows.Count; i++) |
| | | { |
| | | grdList.Rows[grdList.SelectedRows[i].Index].Cells[0].Value = "*"; |
| | | } |
| | | // |
| | | Report = new GridppReport(); |
| | |
| | | } |
| | | } |
| | | |
| | | private void sdy_Click(object sender, EventArgs e) |
| | | { |
| | | //夿æ¯å¦å·²ç»çææ¡ç |
| | | if (DBUtility.ClsPub.isStrNull(grdSub.Rows[0].Cells[HTMCol].Value) == "") |
| | | { |
| | | MessageBox.Show("æ¡ç æªçæï¼è¯·å
çææ¡ç ååé¢è§ï¼"); |
| | | return; |
| | | } |
| | | |
| | | //æå°å夿æ¡ç æ¯å¦å·²æå°è¿ |
| | | if (ReportPrintBegin()) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //éæ©æå°æ¨¡æ¿ |
| | | BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp(); |
| | | oFrm.sBillName = ModName; |
| | | oFrm.sBillModel = ModCaption; |
| | | oFrm.ShowDialog(); |
| | | if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK) |
| | | { |
| | | Sub_SetReportView(oFrm.sOpenTmp); |
| | | Report.PrintPreview(false); |
| | | Thread.Sleep(1000); |
| | | } |
| | | } |
| | | } |
| | | } |