コード例 #1
0
        public ActionResult AddNewQuotation()
        {
            InsertQuotation quot = new InsertQuotation();

            quot.CustomerTypeID           = null;
            quot.QuotationServiceTypeID   = null;
            quot.CustomerID               = null;
            quot.CustomerTypeList         = new SelectList(_quotationService.GetCustomerTypeList(), "CustomerTypeID", "CustomerTypeName", quot.CustomerTypeID);
            quot.QuotationServiceTypeList = new SelectList(_quotationService.GetQuotationServiceTypeList(), "ServiceTypeID", "ServiceTypeName", quot.QuotationServiceTypeID);
            var custList = _quotationService.GetAllActiveCustomerByBranchId(1).Select(c => new { CustomerID = c.CustomerID, CustomerName = c.CustomerFirstName + " " + c.CustomerMidName + " " + c.CustomerLastName });

            quot.CustomerList = new SelectList(custList, "CustomerID", "CustomerName", quot.CustomerID);
            return(View(quot));
        }