//
        // GET: /Crm/Project/Create

        public ActionResult Create()
        {
            var ProjectBasedataIDList = this.ProjectService.GetProjectBasedataList(new ProjectRequest());
            this.ViewBag.ProjectBasedataID = new SelectList(ProjectBasedataIDList, "ID", "PName");
            
            var model = new ProjectCtrl();
            return View("Edit", model);
        }
 public ActionResult Create(FormCollection collection)
 {
     var model = new ProjectCtrl();
     this.TryUpdateModel<ProjectCtrl>(model);
     model.oddnum = model.CreateTime.ToFileTimeUtc().ToString();
     this.ProjectService.SaveProjectCtrl(model);
     return this.RefreshParent();
 }
Beispiel #3
0
 public void SaveProjectCtrl(ProjectCtrl project)
 {
     using (var dbContext = new ProjectDbContext())
     {
         if (project.ID > 0)
         {
             dbContext.Update<ProjectCtrl>(project);
         }
         else
         {
             dbContext.Insert<ProjectCtrl>(project);
         }
     }
 }
        //
        // GET: /Crm/Project/Create

        public ActionResult Create()
        {
            var model = new ProjectCtrl();
            return View("Edit", model);
        }