Exemplo n.º 1
0
        public ActionResult Create(string id)
        {
            DEF_CaseTypeModel entity = new DEF_CaseTypeModel()
            {
                ParentId = id,
            };

            return(View(entity));
        }
Exemplo n.º 2
0
        public ActionResult Create(string id)
        {
            ViewBag.Perm = GetPermission();
            DEF_CaseTypeModel entity = new DEF_CaseTypeModel()
            {
                ParentId = id,
            };

            return(View(entity));
        }
Exemplo n.º 3
0
        public virtual DEF_CaseTypeModel GetById(string id)
        {
            if (IsExists(id))
            {
                DEF_CaseType      entity = m_Rep.GetById(id);
                DEF_CaseTypeModel model  = new DEF_CaseTypeModel();
                model.Id       = entity.Id;
                model.Name     = entity.Name;
                model.ParentId = entity.ParentId;
                model.IsLast   = entity.IsLast;

                return(model);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 4
0
 public JsonResult Edit(DEF_CaseTypeModel model)
 {
     if (model != null && ModelState.IsValid)
     {
         if (m_BLL.Edit(ref errors, model))
         {
             LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name, "成功", "修改", "DEF_CaseType");
             return(Json(JsonHandler.CreateMessage(1, Resource.EditSucceed)));
         }
         else
         {
             string ErrorCol = errors.Error;
             LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name + "," + ErrorCol, "失败", "修改", "DEF_CaseType");
             return(Json(JsonHandler.CreateMessage(0, Resource.EditFail + ":" + ErrorCol)));
         }
     }
     else
     {
         return(Json(JsonHandler.CreateMessage(0, Resource.EditFail)));
     }
 }
Exemplo n.º 5
0
 public JsonResult Create(DEF_CaseTypeModel model)
 {
     model.Id     = ResultHelper.NewId;
     model.IsLast = false;
     if (model != null && ModelState.IsValid)
     {
         if (m_BLL.Create(ref errors, model))
         {
             LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name, "成功", "创建", "DEF_CaseType");
             return(Json(JsonHandler.CreateMessage(1, Resource.InsertSucceed)));
         }
         else
         {
             string ErrorCol = errors.Error;
             LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name + "," + ErrorCol, "失败", "创建", "DEF_CaseType");
             return(Json(JsonHandler.CreateMessage(0, Resource.InsertFail + ErrorCol)));
         }
     }
     else
     {
         return(Json(JsonHandler.CreateMessage(0, Resource.InsertFail)));
     }
 }
Exemplo n.º 6
0
        public ActionResult Details(string id)
        {
            DEF_CaseTypeModel entity = m_BLL.GetById(id);

            return(View(entity));
        }