| | |
| | | using System.Printing; |
| | | using uPLibrary.Networking.M2Mqtt; |
| | | using uPLibrary.Networking.M2Mqtt.Messages; |
| | | using WebAPI; |
| | | using Newtonsoft.Json; |
| | | |
| | | namespace WarM |
| | | { |
| | |
| | | } |
| | | |
| | | this.Sub_SaveBill(); |
| | | LogService.Write("=============================================================================================="); |
| | | LogService.Write("è·åæå°å表ã" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ã"); |
| | | Display(); |
| | | LogService.Write("è·åæå°åè¡¨ç»æã" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ã"); |
| | | LogService.Write("=============================================================================================="); |
| | | |
| | | if (radioButton_IsPrint_Yes.Checked == true) |
| | | { |
| | |
| | | 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); |
| | | HRemark = "PLCèªå¨çæ"; |
| | | 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); |
| | |
| | | string LIU = ""; |
| | | int LEN = 4; |
| | | DataSet ds; |
| | | string sql = "select * from h_v_IF_BarCodeBillList Where HMaterID = " + grdMain.Rows[0].Cells[HMaterIDCol].Value + " and HSTOCKORGID = " + HOrgID + " and CONVERT(varchar(100),æ¡ç æ¥æ, 23) = '" + HDate + "' order by æ¹å· desc"; |
| | | string sql = "select * from h_v_IF_BarCodeBillList Where HMaterID = " + grdMain.Rows[0].Cells[HMaterIDCol].Value + " and HSTOCKORGID = " + HOrgID + " and CONVERT(varchar(100),æ¡ç æ¥æ, 23) = '" + HDate + "' and 夿³¨ = 'PLCèªå¨çæ' order by æ¹å· desc"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_IF_BarCodeBillList"); |
| | | if (ds != null) |
| | | { |
| | | long count = 0; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | count = ClsPub.isLong(ds.Tables[0].Rows[0]["æ¹å·"].ToString().Replace(sYear + sPeriod + sDay, "")); |
| | | count = ClsPub.isLong(ds.Tables[0].Rows[0]["æ¹å·"].ToString().Replace(sYear + sPeriod + sDay + " ", "")); |
| | | } |
| | | LIU += count + 1; |
| | | while (LIU.Length < LEN) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 |
| | |
| | | } |
| | | |
| | | //æ¼æ¥æ¹å· |
| | | HBatchNo = sYear + sPeriod + sDay + LIU; |
| | | HBatchNo = sYear + sPeriod + sDay + " " + LIU; |
| | | } |
| | | |
| | | |
| | |
| | | this.Sub_SaveBill(); |
| | | |
| | | //è·åéè¦æå°çæ°æ® |
| | | LogService.Write("=============================================================================================="); |
| | | LogService.Write("è·åæå°å表ã" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ã"); |
| | | Display(); |
| | | LogService.Write("è·åæå°åè¡¨ç»æã" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "ã"); |
| | | LogService.Write("=============================================================================================="); |
| | | |
| | | if (radioButton_IsPrint_Yes.Checked == true) |
| | | { |
| | |
| | | //è·åéè¦æå°çæ°æ®å¹¶åæ¾å¨å表grdList |
| | | private void Display() |
| | | { |
| | | LogService.Write("æå°å表æç´¢è¯å¥ï¼ãselect * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemIDã"); |
| | | |
| | | //设置档æ¡å表é项å¡è¡¨æ ¼æ°æ® |
| | | DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemID", "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | |
| | | DBUtility.Xt_BaseBillFun.DisplayGrid(grdList, this.Name + "grdList", s, FrCol); |
| | | //ç»çº¿ |
| | | //GraphLine(); |
| | | |
| | | LogService.Write("æå°åè¡¨æ°æ®ï¼ã" + JsonConvert.SerializeObject(DSet.Tables[0]) + "ã"); |
| | | } |
| | | |
| | | //è·åå·¥åå½å¤©ç©æçæçæ¡ç è®°å½ |