Ejemplo n.º 1
0
        public IActionResult DeleteProduct(int id)
        {
            var res = new SingleRsp();

            res.Data = _svc.DeleteProduct(id);
            return(Ok(res));
        }
        /// <summary>
        /// 删除产品
        /// </summary>
        /// <param name="guid">要删除的guid</param>
        /// <returns></returns>
        public string DeleteProduct(string guid)
        {
            ExceResult res    = new ExceResult();
            string     C_GUID = Session["CurrentCompanyGuid"].ToString();

            var result = ProductSvc.DeleteProduct(guid, C_GUID);

            if (result == 1)
            {
                res.success = true;
                res.msg     = "";
            }
            else
            {
                res.success = false;
                res.msg     = "不可以删除";
            }

            return(JsonConvert.SerializeObject(res));
        }
        public IActionResult DeleteProduct(String id)
        {
            var result = _svc.DeleteProduct(id);

            return(Ok(result));
        }