public async Task <ActionResult> Add(TransactionHead cus) { _context.Add(cus); await _context.SaveChangesAsync(); return(RedirectToRoute("sales")); }
public async Task <ActionResult> Add(Product cus) { _context.Add(cus); await _context.SaveChangesAsync(); return(RedirectToRoute("product")); }
public async Task <ActionResult> Add(Customer cus) { _context.Add(cus); await _context.SaveChangesAsync(); return(RedirectToRoute("customer")); }
public async Task <IActionResult> Create([Bind("Id,Name,Location,RoleId")] Staff staff) { if (ModelState.IsValid) { _context.Add(staff); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["RoleId"] = new SelectList(_context.Role, "Id", "RoleName", staff.RoleId); return(View(staff)); }