示例#1
0
        public JsonResult GetAddressesAndAccountCodesByCustomer(string customerId)
        {
            var model = new CustomerViewModel();

            model.SelectableCustomerAddresses = _customerAddressDynamicsRepository.GetSelectableCustomerAddresses(customerId);

            model.SelectableAccountCodes = _accountCodeRepository.GetSelectableAccountCodesByCustomer(customerId);

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public ActionResult EditPackingList(Guid packingListId)
        {
            var packingList = _packingListRepository.GetPackingList(packingListId);

            PackingListViewModel model = new PackingListConverter().ConvertToView(packingList);

            var carriers = _carrierRepository.GetSelectableCarriers();

            var defaultCarrier = new SelectListItem()
            {
                Text  = "--Select Carrier--",
                Value = null
            };

            carriers.Insert(0, defaultCarrier);

            model.SelectableCarriers = carriers;

            model.SelectableCustomerAddresses = _customerAddressDynamicsRepository.GetSelectableCustomerAddresses(model.CustomerId);

            var parts = _partRepository.GetSelectableParts();

            model.SelectableParts = parts;

            model.SelectablePONumbers = new List <SelectListItem>();

            return(View(model));
        }
示例#3
0
        public ActionResult Convert(Guid rfqId)
        {
            var currentRfq = _rfqRepository.GetRfq(rfqId);

            QuoteViewModel model = new QuoteConverter().ConvertToView(currentRfq);

            model.QuoteNumber = QuoteNumber();

            _quoteRepository.RemoveQuoteNumber(model.QuoteNumber);

            model.SelectableCustomerAddresses = _customerAddressDynamicsRepository.GetSelectableCustomerAddresses(model.CustomerId);

            model.SelectableShipmentTerms = _shipmentTermRepository.GetSelectableShipmentTerms();

            var defaultShipmentTerm = new SelectListItem()
            {
                Text  = "--Select Shipment Term--",
                Value = null
            };

            model.SelectableShipmentTerms.Insert(0, defaultShipmentTerm);

            model.SelectablePaymentTerms = _paymentTermRepository.GetSelectablePaymentTerms();

            var defaultPaymentTerm = new SelectListItem()
            {
                Text  = "--Select Payment Term--",
                Value = null
            };

            model.SelectablePaymentTerms.Insert(0, defaultPaymentTerm);

            model.SelectableMaterial = _materialRepository.GetSelectableMaterials();

            var defaultMaterial = new SelectListItem()
            {
                Text  = "--Select Material--",
                Value = null
            };

            model.SelectableMaterial.Insert(0, defaultMaterial);

            model.SelectableCoatingTypes = _coatingTypeRepository.GetSelectableCoatingTypes();

            var defaultCoatingType = new SelectListItem()
            {
                Text  = "--Select Coating Type--",
                Value = null
            };

            model.SelectableCoatingTypes.Insert(0, defaultCoatingType);

            model.SelectableHtsNumbers = _htsNumberRepository.GetSelectableHtsNumbers();

            var defaultHtsNumber = new SelectListItem()
            {
                Text  = "--Select HtsNumber--",
                Value = null
            };

            model.SelectableHtsNumbers.Insert(0, defaultHtsNumber);

            return(View(model));
        }