Beispiel #1
0
        public ActionResult Create(FormCollection collection)
        {
            var model = new OfficeCtrl();

            this.TryUpdateModel <OfficeCtrl>(model);
            model.oddnum = model.CreateTime.ToFileTimeUtc().ToString();
            this.ProjectService.SaveOfficeCtrl(model);
            return(this.RefreshParent());
        }
Beispiel #2
0
 public void SaveOfficeCtrl(OfficeCtrl offices)
 {
     using (var dbContext = new ProjectDbContext())
     {
         if (offices.ID > 0)
         {
             dbContext.Update <OfficeCtrl>(offices);
         }
         else
         {
             dbContext.Insert <OfficeCtrl>(offices);
         }
     }
 }
Beispiel #3
0
        //
        // GET: /Cms/Office/Create

        public ActionResult Create()
        {
            var model = new OfficeCtrl();

            return(View("Edit", model));
        }