Пример #1
0
        public ActionResult billCreate()
        {
            BillCreateVM billCreateVM = new BillCreateVM();

            billCreateVM.customerList = GetCustomerList();
            billCreateVM.bill_date    = DateTime.Now.Date;
            return(View(billCreateVM));
        }
Пример #2
0
        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"));
        }