| | |
| | | grdMain.Rows.Add(); |
| | | Application.DoEvents(); |
| | | //å¾å°ä¿¡æ¯ |
| | | Ds = oCn.RunProcReturn("select * from h_v_KF_ICInventoryList_IF where hmaterid=" + oSelectRow.BillMainID + " and hwhid=" + oSelectRow.BillSubID + " and hspid=" + oSelectRow.SPID + " and æ¹æ¬¡='" + oSelectRow.BatchNo + "' and 计åè·è¸ªå·='" + oSelectRow.BillNo + "'", "h_v_KF_ICInventoryList_IF"); |
| | | Ds = oCn.RunProcReturn("select * from h_v_KF_ICInventoryList_IF where hmaterid=" + oSelectRow.BillMainID + " and hwhid=" + oSelectRow.BillSubID + " and hspid=" + oSelectRow.SPID + " and HAuxPropID=" + oSelectRow.HAuxPropID + " and æ¹æ¬¡='" + oSelectRow.BatchNo + "' and 计åè·è¸ªå·='" + oSelectRow.BillNo + "'", "h_v_KF_ICInventoryList_IF"); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm2(Ds.Tables[0], i); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //æ¹æ¬¡æé® |
| | | private void BatchNo_Click(object sender, EventArgs e) |
| | | { |
| | | bool b = false; |
| | | for (int i = 0; i < grdMain.RowCount; i++) |
| | | { |
| | | long HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value); // ç©æå
ç |
| | | string HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HBatchNoCol].Value); // æ¹å· |
| | | |
| | | if (HMaterID != 0) |
| | | { |
| | | DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + dtpHDate.Value.ToShortDateString()+ "','" + CampanyName+"'", "h_p_Gy_BarCodeBill_GetBatchNo"); |
| | | // |
| | | if (oDs == null && oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("çææ¹æ¬¡å¤±è´¥ï¼"); |
| | | return; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | grdMain.Rows[i].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | b = true; |
| | | } |
| | | } |
| | | } |
| | | //æç»è¡¨æ¯å¦ä¸ºé¶è¡ |
| | | if (b == false) |
| | | { |
| | | MessageBox.Show("没æéè¦çææ¹æ¬¡çæç»è¡ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |