public ActionResult billCreate() { BillCreateVM billCreateVM = new BillCreateVM(); billCreateVM.customerList = GetCustomerList(); billCreateVM.bill_date = DateTime.Now.Date; return(View(billCreateVM)); }
public ActionResult billCreate(BillCreateVM billCreateVM) { var bills = new Bill { customer_id = billCreateVM.customer_id, bill_total = billCreateVM.total, bill_date = billCreateVM.bill_date }; db.Bills.Add(bills); db.SaveChanges(); return(RedirectToAction("billDetail")); }