示例#1
0
 public ActionResult Save(ParkLeader mode, FormCollection collection)
 {
     try
     {
         if (mode.ParkLeaderId > 0)
         {
             mode.ModifyTime = DateTime.Now;
             mode.ModifyName = CurrentUser.UserName;
             _parkLeaderServ.UpdateModel(mode);
             return(Content(Msg("true", "保存成功!")));
         }
         else
         {
             mode.CreatedTime = DateTime.Now;
             mode.Creator     = CurrentUser.UserName;
             mode.ModifyTime  = DateTime.Now;
             mode.ModifyName  = CurrentUser.UserName;
             _parkLeaderServ.CreateModel(mode);
             return(Content(Msg("true", "保存成功!")));
         }
     }
     catch (Exception)
     {
         return(Content(Msg("false", "保存失败!")));
     }
 }
示例#2
0
        public ActionResult Create()
        {
            var ParkLeader = new ParkLeader();

            return(View(ParkLeader));
        }