示例#1
0
        public ActionResult Edit(T_Sys_Business model)
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            result.Add("success", true);
            try
            {
                int resultUpdate = _businessService.Update(model);
                if (resultUpdate == 0)
                {
                    result["success"] = false;
                }
            }
            catch (Exception ex)
            {
                result["success"] = false;
            }
            return(Json(result));
        }
示例#2
0
        public ActionResult Add(T_Sys_Business model)
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            result.Add("success", true);
            try
            {
                model.F_CreateTime = DateTime.Now;
                int resultInsert = _businessService.Insert(model);
                if (resultInsert == 0)
                {
                    result["success"] = false;
                }
            }
            catch (Exception ex)
            {
                result["success"] = false;
            }
            return(Json(result));
        }
示例#3
0
 public int Update(T_Sys_Business entity, bool isSave = true)
 {
     return(_repository.Update(entity, isSave));
 }
示例#4
0
 public int Insert(T_Sys_Business entity, bool isSave = true)
 {
     return(_repository.Insert(entity, isSave));
 }