public ActionResult Create(Specialties Specialy) { if (ModelState.IsValid) { db.Specialties.Add(Specialy); db.SaveChanges(); return(RedirectToAction("Index")); } else { return(RedirectToAction("Index")); } }
public ActionResult Create(Company Company) { if (ModelState.IsValid) { db.Company.Add(Company); db.SaveChanges(); return(RedirectToAction("Index")); } else { return(RedirectToAction("Index")); } }
public ActionResult Create(Service Service) { if (ModelState.IsValid) { db.Service.Add(Service); db.SaveChanges(); return(RedirectToAction("Index")); } else { return(RedirectToAction("Index")); } }
public ActionResult Create(Testimonials Test, HttpPostedFileBase file) { if (ModelState.IsValid) { if (file != null) { string fileName = DateTime.Now.ToString("yyyyMMddHHssmmffff") + file.FileName; file.SaveAs(Server.MapPath("~/Content/SiteImages/") + fileName); Test.Photo = fileName; } db.Testimonials.Add(Test); db.SaveChanges(); return(RedirectToAction("Index")); } else { return(RedirectToAction("Index")); } }
public void AddDepatment(Depatment dep) { _db.Depatment.Add(dep); _db.SaveChanges(); }
public void AddEmployee(Employee empl) { _db.Employee.Add(empl); _db.SaveChanges(); }
public void AddTypeOfPosition(TypeOfPosition top) { _db.TypeOfPosition.Add(top); _db.SaveChanges(); }
public int Save() { return(companyDB.SaveChanges()); }
public void AddPosition(Position pos) { _db.Position.Add(pos); _db.SaveChanges(); }