Exemple #1
0
        public ActionResult CreateCustomerInvoicePopup(int id)
        {
            var customer = _customerInvoiceComponent.GetCustomerInvoice(id);

            if (customer == null)
            {
                customer = new CustomerInvoiceViewModel();
            }
            customer.CustomerList = new SelectList(_customerComponent.GetAllCustomer(), "CustomerId", "NameEmail");
            return(PartialView("/Views/Shared/Partials/_CustomerInvoice.cshtml", customer));
        }
        public ActionResult GetInvoiceAmount(int id)
        {
            CustomerInvoiceViewModel objectCustomerInvoiceViewModel = _customerInvoiceComponent.GetCustomerInvoice(id);

            return(Json(new
            {
                TotalHours = objectCustomerInvoiceViewModel.TotalHours,
                Amount = objectCustomerInvoiceViewModel.Amount
            }, JsonRequestBehavior.AllowGet));

            return(null);
        }