| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | sMoney = ClsPub.isDoule(grdMain.Rows[sRow].Cells[HQtyCol].Value) / ClsPub.isDoule(grdMain.Rows[sRow].Cells[HMinQtyCol].Value); |
| | | } |
| | | sMoney = Math.Round(sMoney, 10); // ä¿ç10ä½å°æ°è¿è¡åèäºå
¥ |
| | | sMoney = Math.Ceiling(sMoney); |
| | | grdMain.Rows[sRow].Cells[HBQtyCol].Value = sMoney; |
| | | } |