| | |
| | | } |
| | | string HItemID = ""; |
| | | string HBarCode = ""; |
| | | string HBarCode2 = ""; |
| | | string HRemark = ""; |
| | | if (grdMain.CurrentRow == null) |
| | | return; |
| | |
| | | for (int i = 0; i < grdMain.SelectedRows.Count; i++) |
| | | { |
| | | HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | | HBarCode = HBarCode + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | |
| | | HBarCode2 = HBarCode2 + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | if (i!=0 && i % 100 == 0) |
| | | { |
| | | HBarCode = HBarCode + "#" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | } |
| | | else |
| | | { |
| | | HBarCode = HBarCode + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æåå
¥åºæ¥æ")].Value)!="" |
| | | || DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("çäº§æ±æ¥æ¥æ")].Value) != "") |
| | | { |
| | |
| | | } |
| | | try |
| | | { |
| | | HItemID = HItemID.Remove(0, 1); |
| | | HItemID = HItemID.Remove(0, 1); //廿å符串第ä¸ä¸ªå符 |
| | | HBarCode = HBarCode.Remove(0, 1); |
| | | oWeb.getRunProc("Delete from Gy_BarCodeBill where HItemID in (" + HItemID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oWeb.getRunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','æ¹éå 餿¡ç ï¼" + HBarCode + "','WMSç³»ç»-æ¡ç æ¡£æ¡å表模å','" + DBUtility.ClsPub.IPAddress + "','å é¤'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | MessageBox.Show("æ¡ç ç¼å·ï¼" + HBarCode + "ï¼æ¹éå 餿åï¼"); |
| | | HBarCode2 = HBarCode2.Remove(0, 1); |
| | | |
| | | string[] NewBarCode; |
| | | NewBarCode = HBarCode.Split(Convert.ToChar("#")); |
| | | |
| | | string[] sSQLMul = new string[grdMain.SelectedRows.Count]; |
| | | sSQLMul[0] = "Delete from Gy_BarCodeBill where HItemID in (" + HItemID + ")"; |
| | | |
| | | for (int i = 0; i <= NewBarCode.Length-1; i++) |
| | | { |
| | | sSQLMul[i + 1] = "Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','æ¹éå 餿¡ç ï¼" + NewBarCode[i] + "','WMSç³»ç»-æ¡ç æ¡£æ¡å表模å','" + DBUtility.ClsPub.IPAddress + "','å é¤'"; |
| | | } |
| | | oWeb.getRunProcByMul(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | MessageBox.Show("æ¡ç ç¼å·ï¼" + HBarCode2 + "ï¼æ¹éå 餿åï¼"); |
| | | Display(); |
| | | } |
| | | catch (Exception e) |
| | |
| | | } |
| | | |
| | | |
| | | ////åå
æ¹éå 餿¡ç æ¹æ³ |
| | | //DataSet DS; |
| | | //DataSet DS2; |
| | | //bool sBool = true; |
| | | //Int64 lngBillKey = 0; |
| | | //if (grdMain.SelectedRows == null) |
| | | // return; |
| | | //if (MessageBox.Show("ç¡®å®è¦æ¹éå 餿éåæ®ï¼å é¤åä¸è½æ¢å¤ï¼è¯·è°¨æ
æä½", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | //{ |
| | | // string[] sSQLMul = new string[grdMain.SelectedRows.Count]; |
| | | // for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | // { |
| | | // lngBillKey = DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value); |
| | | // sSQLMul[i] = " Delete from Gy_BarCodeBill where HItemID= " + lngBillKey ; |
| | | // sSQLMul[i] = sSQLMul[i] + " " + "insert into System_log values(GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.CurUserName + "','å 餿¡ç ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + "' ,'WMSç³»ç»','','å é¤')"; |
| | | // } |
| | | ////åå
æ¹éå 餿¡ç æ¹æ³ |
| | | //DataSet DS; |
| | | //DataSet DS2; |
| | | //bool sBool = true; |
| | | //Int64 lngBillKey = 0; |
| | | //if (grdMain.SelectedRows == null) |
| | | // return; |
| | | //if (MessageBox.Show("ç¡®å®è¦æ¹éå 餿éåæ®ï¼å é¤åä¸è½æ¢å¤ï¼è¯·è°¨æ
æä½", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | //{ |
| | | // string[] sSQLMul = new string[grdMain.SelectedRows.Count]; |
| | | // for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | // { |
| | | // lngBillKey = DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value); |
| | | // sSQLMul[i] = " Delete from Gy_BarCodeBill where HItemID= " + lngBillKey ; |
| | | // sSQLMul[i] = sSQLMul[i] + " " + "insert into System_log values(GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.CurUserName + "','å 餿¡ç ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + "' ,'WMSç³»ç»','','å é¤')"; |
| | | // } |
| | | |
| | | // oWeb.getRunProcByMul(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //} |
| | | //MessageBox.Show("æ¹éå 餿åï¼", "æç¤º"); |
| | | //Display(); |
| | | } |
| | | // oWeb.getRunProcByMul(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //} |
| | | //MessageBox.Show("æ¹éå 餿åï¼", "æç¤º"); |
| | | //Display(); |
| | | } |
| | | |
| | | private void timer2_Tick(object sender, EventArgs e) |
| | | { |