| | |
| | | public string sYear4 = ""; //å¹´ï¼4ä½ï¼ |
| | | public string sPeriod = ""; //æ |
| | | public string sDay = ""; //æ¥ |
| | | public string HBarCodeType = "è¶
èåå
æ ç¾"; //æ¡ç ç±»å |
| | | |
| | | |
| | | #region åºå®ä»£ç |
| | |
| | | HCode2 = HCode2.ToUpper(); |
| | | string HCode3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCode3Col].Value); // çæ¬å· |
| | | string HBatchNoNumber = ""; // æ¹æ¬¡çæåç¼ |
| | | string HBarCodeType = "è¶
èåå
æ ç¾"; // æ¡ç ç±»å |
| | | string HInnerBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HInnerBillNoCol].Value); // 客æ·è®¢åå· |
| | | |
| | | if (HMaterID != 0) |
| | |
| | | |
| | | Int64 HEntryID = 0; |
| | | string HBarCode = ""; //æ¡å½¢ç |
| | | string HBarCodeType = ""; //æ¡ç ç±»å |
| | | Int64 HMaterID = 0; //ç©æID |
| | | Int64 HUnitID = 0; //计éåä½ID |
| | | Int64 HAuxPropID = 0; //è¾
å©å±æ§ID |
| | |
| | | |
| | | HEntryID = j + 1; |
| | | HBarCode = TM.ToUpper(); |
| | | HBarCodeType = "è¶
èåå
æ ç¾"; |
| | | HMaterID = ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value); |
| | | HUnitID = ClsPub.isLong(grdMain.Rows[j].Cells[HUnitIDCol].Value); |
| | | HAuxPropID = ClsPub.isLong(grdMain.Rows[j].Cells[HAuxPropIDCol].Value); |
| | |
| | | grdMain.Rows[sRow].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber; |
| | | grdMain.Rows[sRow].Cells[HMaterNameCol].Value = oMater.omodel.HName; |
| | | grdMain.Rows[sRow].Cells[HMaterModelCol].Value = oMater.omodel.HModel; |
| | | grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin; |
| | | grdMain.Rows[sRow].Cells[HAuxPropIDCol].Value = 0; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HAuxPropNameCol].Value = ""; |
| | | if (HBarCodeType == "è¶
èåå
æ ç¾") |
| | | { |
| | | grdMain.Rows[sRow].Cells[HMinQtyCol].Value =1; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[sRow].Cells[HMinQtyCol].Value = oMater.omodel.HQtyMin; |
| | | } |
| | | if (oUnit.GetInfoByID(oMater.omodel.HUnitID)) |
| | | { |
| | | grdMain.Rows[sRow].Cells[HUnitIDCol].Value = oUnit.omodel.HItemID.ToString(); |
| | |
| | | return; |
| | | } |
| | | |
| | | //æå°å夿æ¡ç æ¯å¦å·²æå°è¿ |
| | | if (ReportPrintBegin()) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | //éæ©æå°æ¨¡æ¿ |
| | | BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp(); |
| | | oFrm.sBillName = ModName; |
| | |
| | | return; |
| | | } |
| | | |
| | | //æå°å夿æ¡ç æ¯å¦å·²æå°è¿ |
| | | if (ReportPrintBegin()) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | //éæ©æå°æ¨¡æ¿ |
| | | BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp(); |
| | | oFrm.sBillName = ModName; |
| | |
| | | |
| | | #endregion |
| | | |
| | | //æå°å夿æ¡ç æ¯å¦è¶
è¿å
è®¸å¯æå°æ¬¡æ° |
| | | private bool ReportPrintBegin() |
| | | { |
| | | DataSet DS; |
| | | if (HBarCodeType == "è¶
èåå
æ ç¾") |
| | | { |
| | | DS = oCn.RunProcReturn("select top 1 1 from Gy_BarCodeBill_Cus with(nolock) where HPrintQty >=1 and HInterID = " + HInterID, "Gy_BarCodeBill_Cus"); |
| | | if (DS == null || DS.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æ¡ç å·²æå°ï¼ä¸å
è®¸åæ¬¡æå°ï¼"); |
| | | return true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | private void Sub_SetReport(string sOpenTmp) |
| | | { |
| | | //å¤æè¡æ° |
| | |
| | | Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf"); //here . |
| | | Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord); |
| | | Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable); |
| | | Report.PrintBegin += new _IGridppReportEvents_PrintBeginEventHandler(ReportPrintBegin2); |
| | | Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //æå°å¼å§å夿 |
| | | private void ReportPrintBegin2() |
| | | { |
| | | //æå°å夿æ¡ç æ¯å¦å·²æå°è¿ |
| | | if (ReportPrintBegin()) |
| | | { |
| | | Report.AbortPrint(); |
| | | } |
| | | } |
| | | |
| | | //æå°ç»æååå¡«æ¡ç æå°æ¬¡æ° |
| | | private void ReportPrintEnd() |
| | | { |