| | |
| | | MessageBox.Show("æ¨æ²¡æå 餿éï¼"); |
| | | return; |
| | | } |
| | | DataSet DS; |
| | | DataSet DS2; |
| | | bool sBool = true; |
| | | Int64 lngBillKey = 0; |
| | | string HBarCode = ""; |
| | | if (grdMain.CurrentRow == null) |
| | | return; |
| | | if (MessageBox.Show("ç¡®å®è¦å 餿éåæ®ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | if (grdMain.SelectedRows.Count != 1) |
| | | { |
| | | for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | MessageBox.Show("ä¸å
许å¤è¡å é¤ï¼è¯·éæ°éæ©è¦å é¤çæ¡ç ï¼"); |
| | | return; |
| | | } |
| | | |
| | | if (MessageBox.Show("ç¡®å®è¦å 餿鿡ç ï¼å é¤åä¸è½æ¢å¤ï¼è¯·è°¨æ
æä½ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | { |
| | | lngBillKey = DBUtility.ClsPub.isLong(grdMain.SelectedRows[0].Cells[Fun_GetCol("hmainid")].Value); |
| | | HBarCode = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[0].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | if (lngBillKey == 0) |
| | | return; |
| | | try |
| | | { |
| | | lngBillKey = DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value); |
| | | if (lngBillKey == 0) |
| | | DataSet DS = oWeb.getDataSetBySQL("exec h_p_Gy_BarCodeBill_Delete " + lngBillKey + ",'" + HBarCode + "','" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','" + DBUtility.ClsPub.IPAddress + "'", "h_p_Gy_BarCodeBill_Delete", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (DS == null || DS.Tables[0].Rows.Count <= 0) |
| | | { |
| | | MessageBox.Show("å é¤å¤±è´¥ï¼"); |
| | | return; |
| | | try |
| | | { |
| | | DS = oWeb.getDataSetBySQL("Select * from Gy_BarCodeBill Where HItemID=" + lngBillKey, "Gy_BarCodeBill", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | DS2 = oWeb.getDataSetBySQL("Select * from Gy_BarCodeBill a inner join Kf_ICStockBillSub_WMS b on a.HBarCode=b.HBarCode where a.HItemID=" + lngBillKey, "Gy_BarCodeBill", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DS2.Tables[0].Rows.Count == 0) |
| | | { |
| | | sBool = false; |
| | | } |
| | | else |
| | | { |
| | | sBool = true; |
| | | } |
| | | if (DS.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("åæ®æªæ¾å°ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | if (sBool) |
| | | { |
| | | MessageBox.Show("å é¤å¤±è´¥ï¼æ¡ç " + grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value + "已被使ç¨", "æç¤º"); |
| | | Display(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | oWeb.getRunProc("Delete from Gy_BarCodeBill where HItemID=" + lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oWeb.getRunProc("insert into System_log values(GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.CurUserName + "','å 餿¡ç ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + "' ,'WMSç³»ç»','','å é¤')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | else |
| | | { |
| | | throw (e); |
| | | MessageBox.Show(DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"])); |
| | | Display(); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | MessageBox.Show("å 餿åï¼", "æç¤º"); |
| | | Display(); |
| | | |
| | | |
| | | //åå
å 餿¡ç æ¹æ³ |
| | | //DataSet DS; |
| | | //DataSet DS2; |
| | | //bool sBool = true; |
| | | //Int64 lngBillKey = 0; |
| | | //if (grdMain.CurrentRow == null) |
| | | // return; |
| | | //if (MessageBox.Show("ç¡®å®è¦å 餿éåæ®ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | //{ |
| | | // for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | // { |
| | | // lngBillKey = DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value); |
| | | // if (lngBillKey == 0) |
| | | // return; |
| | | // try |
| | | // { |
| | | // DS = oWeb.getDataSetBySQL("Select * from Gy_BarCodeBill Where HItemID=" + lngBillKey, "Gy_BarCodeBill", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // DS2 = oWeb.getDataSetBySQL("Select * from Gy_BarCodeBill a inner join Kf_ICStockBillSub_WMS b on a.HBarCode=b.HBarCode where a.HItemID=" + lngBillKey, "Gy_BarCodeBill", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // if (DS2.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sBool = false; |
| | | // } |
| | | // else |
| | | // { |
| | | // sBool = true; |
| | | // } |
| | | // if (DS.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // MessageBox.Show("åæ®æªæ¾å°ï¼", "æç¤º"); |
| | | // return; |
| | | // } |
| | | // else |
| | | // { |
| | | // if (sBool) |
| | | // { |
| | | // MessageBox.Show("å é¤å¤±è´¥ï¼æ¡ç " + grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value + "已被使ç¨", "æç¤º"); |
| | | // Display(); |
| | | // return; |
| | | // } |
| | | // else |
| | | // { |
| | | // oWeb.getRunProc("Delete from Gy_BarCodeBill where HItemID=" + lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // oWeb.getRunProc("insert into System_log values(GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.CurUserName + "','å 餿¡ç ï¼" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + "' ,'WMSç³»ç»','','å é¤')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // } |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // throw (e); |
| | | // } |
| | | // } |
| | | //} |
| | | //MessageBox.Show("å 餿åï¼", "æç¤º"); |
| | | //Display(); |
| | | } |
| | | |
| | | |
| | |
| | | MessageBox.Show("æ¨æ²¡æå 餿éï¼"); |
| | | return; |
| | | } |
| | | DataSet DS; |
| | | DataSet DS2; |
| | | bool sBool = true; |
| | | Int64 lngBillKey = 0; |
| | | if (grdMain.SelectedRows == null) |
| | | string HItemID = ""; |
| | | string HBarCode = ""; |
| | | string HRemark = ""; |
| | | if (grdMain.CurrentRow == null) |
| | | return; |
| | | if (MessageBox.Show("ç¡®å®è¦æ¹éå 餿éåæ®ï¼å é¤åä¸è½æ¢å¤ï¼è¯·è°¨æ
æä½", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | |
| | | 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++) |
| | | for (int i = 0; i < grdMain.SelectedRows.Count; 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ç³»ç»','','å é¤')"; |
| | | 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); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æåå
¥åºæ¥æ")].Value)!="" |
| | | || DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("çäº§æ±æ¥æ¥æ")].Value) != "") |
| | | { |
| | | HRemark = HRemark + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | } |
| | | } |
| | | |
| | | oWeb.getRunProcByMul(sSQLMul, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (HRemark!="") |
| | | { |
| | | MessageBox.Show("æ¡ç ç¼å·ï¼"+ HRemark.Remove(0, 1) + "ï¼å·²è¢«ä½¿ç¨ï¼ä¸å
许å é¤ï¼"); |
| | | return; |
| | | } |
| | | try |
| | | { |
| | | 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 + "ï¼æ¹éå 餿åï¼"); |
| | | Display(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | MessageBox.Show("æ¹éå 餿åï¼", "æç¤º"); |
| | | Display(); |
| | | |
| | | |
| | | ////åå
æ¹éå 餿¡ç æ¹æ³ |
| | | //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(); |
| | | } |
| | | |
| | | private void timer2_Tick(object sender, EventArgs e) |
| | |
| | | |
| | | GridppReport Report; |
| | | string sBarCode = ""; |
| | | string sBarCodeItemID = ""; |
| | | |
| | | //é¢è§ |
| | | int CurRows = 0; |
| | |
| | | private bool ReportPrintBegin() |
| | | { |
| | | sBarCode = ""; |
| | | sBarCodeItemID = ""; |
| | | string sRelQty = ""; |
| | | for (int i = 0; i < grdMain.SelectedRows.Count; i++) |
| | | { |
| | | sBarCode = sBarCode + "," + DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value); |
| | | sBarCodeItemID = sBarCodeItemID + "," + DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[i].Index].Cells[Fun_GetCol("HItemID")].Value).ToString(); |
| | | } |
| | | |
| | | if (oWeb.Set_BPrintQtyBarCode(sBarCode.Substring(1), ref sRelQty)) |
| | |
| | | { |
| | | try |
| | | { |
| | | oWeb.getRunProc("exec h_p_Gy_BarCodePrintQty_Update '" + sBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | sBarCodeItemID = sBarCodeItemID.Remove(0, 1); |
| | | oWeb.getRunProc("update Gy_BarCodeBill_PrintQty set HPrintQty=isnull(HPrintQty,0)+1 where HBarCodeItemID in (" + sBarCodeItemID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //oWeb.getRunProc("exec h_p_Gy_BarCodePrintQty_Update '" + sBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | catch (Exception e) |
| | | { |