Esempio n. 1
0
        public ActionResult Create(AddMatterViewModel matter)
        {
            if (ModelState.IsValid)
            {
                mattersService.Add(matter, User.GetAttorneyIdentity().User_Id);

                return RedirectToAction("Index");
            }

            ViewBag.Client_Id = selectListService.Clients(matter.Client_Id);

            return View(matter);
        }
Esempio n. 2
0
        public void Add(AddMatterViewModel matter, Guid attorneyId)
        {
            var newMatter = new Matter()
            {
                Matter_Id = Guid.NewGuid(),
                Matter_Code = matter.Matter_Code,

                Due_Client_Date = matter.Due_Client_Date,
                Due_File_Date = matter.Due_File_Date,
                Bar_Date = matter.Bar_Date,

                Client_Id = matter.Client_Id,
                User_Id = attorneyId,
            };

            db.Matters.Add(newMatter);
            db.SaveChanges();
        }