| | |
| | | string sql1 = string.Format(@"select * from h_v_Gy_MaterialList where 组织名称='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by 物料代码 ", "h_v_Gy_MaterialList"); |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by 物料代码 desc", "h_v_Gy_MaterialList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by 物料代码 "; |
| | | string sql = sql1 + sWhere + " order by 物料代码 desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterialList"); |
| | | } |
| | | |
| | |
| | | string HInter = sArray[0].ToString(); |
| | | string HInterID = HInter.Replace("\"", ""); |
| | | string user = sArray[1].ToString(); |
| | | |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string HBarCode = sArray[2].ToString().Replace("\"",""); |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | |
| | | try |
| | | { |
| | | DataSet Ds; |
| | | |
| | | string[] NewBarCode; |
| | | NewBarCode = HBarCode.Split(Convert.ToChar(",")); |
| | | |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Del", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //删除条码前进行判断 |
| | | Ds = oCN.RunProcReturn("exec h_p_Gy_BarCodeBill_MulDelete_Before '" + HInterID + "','" + HBarCode + "'", "h_p_Gy_BarCodeBill_MulDelete_Before", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除条码前判断发生错误!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //Int64 lngBillKey = 0; |
| | | //lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (HInterID == "") |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DataSet Ds; |
| | | |
| | | Ds = oCN.RunProcReturn("Select * from h_v_IF_BarCodeBillList Where HItemID in (" + HInterID + ")", "h_v_IF_BarCodeBillList"); |
| | | if (Ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")"); |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断是否只能删除自己生成的条码 |
| | | if (oSystemParameter.omodel.BarCode_DeleterAndMakerMustSame == "Y") //系统参数 |
| | | { |
| | | oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")" + " and HMaker = '" + user + "'"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")"); |
| | | } |
| | | } |
| | | |
| | | //写入系统日志 |
| | | for (int i = 0; i <= NewBarCode.Length - 1; i++) |
| | | { |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "网页版删除条码:" + NewBarCode[i] + "','WMS系统-条码档案列表模块','" + DBUtility.ClsPub.IPAddress + "','删除条码'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |