Esempio n. 1
0
 public ActionResult StaffingUnitCreate(DB.Material doc)
 {
     doc.Id = Guid.NewGuid();
     db.Materials.Add(doc);
     db.SaveChanges();
     return(RedirectToAction("StaffingUnitList"));
 }
Esempio n. 2
0
        public ActionResult MaterialCreate(DB.Material doc)
        {
            doc.MaterialType_Id = 1;
            //ViewBag.Employees = db.Employees.ToDictionary(x => x.Id, x => $@"{x.LastName} {x.FirstName} {x.SecondName}");
            //ViewBag.Departments = db.Departments.ToDictionary(x => x.Id, x => x.Name);
            doc.Id = Guid.NewGuid();
            db.Materials.Add(doc);

            db.SaveChanges();
            return(RedirectToAction("MaterialList"));
        }