public ActionResult Create([Bind(Include = "userID,OwnerName,CompanyName,Type,Phone,Email,Password,Address,City,ZIPCode")] Company company) { if (ModelState.IsValid) { db.Companies.Add(company); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(company)); }
public ActionResult Create([Bind(Include = "C_ID,FirstName,LastName,Phone,Email,Password,Address,City,ZIPCode,Status,UCode")] Client client) { if (ModelState.IsValid) { db.Clients.Add(client); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(client)); }
public ActionResult Create([Bind(Include = "P_ID,Ammount,Paid,Due,Date")] Payment payment) { if (ModelState.IsValid) { db.Payments.Add(payment); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(payment)); }
public ActionResult Create([Bind(Include = "E_ID,FirstName,LastName,Phone,Password,Address,City,ZIPCode")] Employee employee) { if (ModelState.IsValid) { db.Employees.Add(employee); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee)); }
public ActionResult Create([Bind(Include = "coID,month,C_ID,code1")] Code code) { if (ModelState.IsValid) { db.Codes.Add(code); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.C_ID = new SelectList(db.Clients, "C_ID", "FirstName", code.C_ID); return(View(code)); }