Exemplo n.º 1
0
        public ActionResult Add(OrganizeModel model)
        {
            model.CreateTime   = DateTime.Now;
            model.CreateUserId = Operator.UserId;
            model.UpdateTime   = DateTime.Now;
            model.UpdateUserId = Operator.UserId;
            var result = OrganizeService.Insert(model) ? SuccessTip("添加成功") : ErrorTip("添加失败");

            return(Json(result));
        }
Exemplo n.º 2
0
 public ActionResult Form(Sys_Organize model)
 {
     if (model.Id == 0)
     {
         var primaryKey = OrganizeService.Insert(model);
         return(primaryKey > 0 ? Success() : Error());
     }
     else
     {
         int row = OrganizeService.Update(model);
         return(row > 0 ? Success() : Error());
     }
 }