1
yxj
2021-11-26 7f5fd4b07afcf2f41371829d3f9774b2618d5916
WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -18,6 +18,7 @@
        public DataSet ds = new DataSet();
        public WebServer webserver = new WebServer();
        public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill();   //模具报废入库对应单据类
        public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill();   //模具报废入库对应单据类
@@ -829,7 +830,36 @@
                return objJsonResult;
            }
        }
        /// <summary>
        ///销售出库单删除功能
        /// </summary>
        /// <returns></returns>
        [Route("Kf_SellOutBill/DeltetSellOutBill")]
        [HttpGet]
        public object DeltetSeOutStockBackBill(string HInterID)
        {
            try
            {
                oCN.BeginTran();
                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #region sql语句
@@ -1026,7 +1056,36 @@
                return objJsonResult;
            }
        }
        /// <summary>
        ///产品入库单删除功能
        /// </summary>
        /// <returns></returns>
        [Route("Kf_ProductInBill/DeltetProductInBill")]
        [HttpGet]
        public object DeltetProductInBill(string HInterID)
        {
            try
            {
                oCN.BeginTran();
                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #region sql语句
@@ -1096,24 +1155,12 @@
        {
            try
            {
                ds = Sc_GetEntrustInBill(sWhere);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "返回记录成功!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception ex)
            {