Exemplo n.º 1
0
        public ActionResult Delete(string Num)
        {
            MeasureProvider provider = new MeasureProvider();
            int             line     = provider.DeleteMeasure(Num);

            if (line > 0)
            {
                this.ReturnJson.AddProperty("Key", "1000");
                this.ReturnJson.AddProperty("Value", "删除成功");
            }
            else
            {
                this.ReturnJson.AddProperty("Key", "1001");
                this.ReturnJson.AddProperty("Value", "删除失败");
            }
            return(Content(this.ReturnJson.ToString()));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除单位
        /// </summary>
        /// <returns></returns>
        public ActionResult Delete()
        {
            List <string>   list      = WebUtil.GetFormObject <List <string> >("List");
            string          CompanyID = WebUtil.GetFormValue <string>("CompanyID");
            MeasureProvider provider  = new MeasureProvider(CompanyID);
            int             line      = provider.DeleteMeasure(list, CompanyID);
            DataResult      result    = new DataResult();

            if (line > 0)
            {
                result.Code    = (int)EResponseCode.Success;
                result.Message = string.Format("单位删除成功,受影响行数{0}行", line);
            }
            else
            {
                result.Code    = (int)EResponseCode.Exception;
                result.Message = "单位删除失败";
            }
            return(Content(JsonHelper.SerializeObject(result)));
        }