| | |
| | | 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"); |
| | | } |
| | | |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!物料属性不能为空!"; |
| | | objJsonResult.Message = "保存失败!物料分类不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | if (user == "10000")//api同步方式 |
| | | { |
| | | oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Material_Delete", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RollBack();//回滚事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有数据,无法删除!"; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack();//回滚事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + e.ToString(); |
| | |
| | | string HInterID = HInter.Replace("\"", ""); |
| | | string user = sArray[1].ToString(); |
| | | string HBarCode = sArray[2].ToString().Replace("\"",""); |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | |
| | | //编辑权限 |
| | | 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 HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | |
| | | try |
| | | { |
| | |
| | | |
| | | 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.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++) |