public async Task <IActionResult> DeliveryPerformance()
        {
            var model = new DeliveryPerforListModel();

            model.AvailableVendors.Add(new SelectListItem {
                Text = "Select", Value = "0"
            });
            foreach (var item in (await _selecteItems.GetVendorList((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableVendors.Add(new SelectListItem {
                    Text = item.Vname, Value = item.Vname
                });
            }


            model.AvailableShip.Add(new SelectListItem {
                Text = "ALL", Value = "0"
            });
            foreach (var item in (await _costCenterService.SelectCostCenter((int)_workContext.CurrentCustomer.ClientId,
                                                                            (int)_workContext.CurrentCustomer.UserType,
                                                                            _workContext.CurrentCustomer.LogonId)))
            {
                model.AvailableShip.Add(new SelectListItem {
                    Text = item.SName, Value = item.SName
                });
            }

            return(View(model));
        }
Exemple #2
0
        public async Task <IActionResult> UsageReportItemExpense()
        {
            var model = new UsageReportItemListModel();

            model.AvailableVendors.Add(new SelectListItem {
                Text = "All", Value = "0"
            });
            foreach (var item in (await _selectItemsServices.GetVendorList((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableVendors.Add(new SelectListItem {
                    Text = item.Vname, Value = item.Vname
                });
            }

            model.AvailableShip.Add(new SelectListItem {
                Text = "All", Value = "0"
            });
            foreach (var item in (await _costCenterService.SelectCostCenter((int)_workContext.CurrentCustomer.ClientId,
                                                                            (int)_workContext.CurrentCustomer.UserType,
                                                                            _workContext.CurrentCustomer.LogonId)))
            {
                model.AvailableShip.Add(new SelectListItem {
                    Text = item.Both, Value = item.SName
                });
            }

            return(View(model));
        }
        public async Task <IActionResult> Vendors()
        {
            var model = new VendorListModel();

            try
            {
                //vendor list
                foreach (var item in (await _selectItemsServices.GetVendorList((int)_workContext.CurrentCustomer.ClientId)))
                {
                    if (!string.IsNullOrEmpty(item.Vname) && !string.IsNullOrEmpty(model.VendorID.ToString()))
                    {
                        model.AvailableVendors.Add(new SelectListItem {
                            Text = item.Vname, Value = item.VendorId.ToString()
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(View(model));
        }
Exemple #4
0
        public async Task PrepareRFQVendorModel(RFPVendorModel model, Rfpvendor rfpvendor, int RfpPID)
        {
            var RFPrfq = await GetRfpNamesById(Convert.ToInt32(RfpPID));

            if (RFPrfq != null)
            {
                model.rfpName = RFPrfq.Rfptitle;
                model.Rfpid   = RfpPID;
            }

            foreach (var item in (await _selectItemsServices.GetVendorList((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableVendors.Add(new SelectListItem {
                    Text = item.Vname, Value = item.VendorId.ToString()
                });
            }
        }