private void Init() { FromDate = DateTime.Now.AddMonths(-6); ToDate = DateTime.Now; BrokersList = DictionariesService.ReadBrokers(); SelectedBroker = BrokersList[0]; RecordsCount = "0"; }
private void Init() { // Load default lists suppliersListStorage = DictionariesService.ReadSuppliers(); BrokersList = DictionariesService.ReadBrokers(); // Load supplier order UpdateSupplierOrderView(SupplierOrder.id); }
private void Init() { SectionsList = DictionariesService.ReadSections(); TypesList = DictionariesService.ReadTypes(); StatusesList = DictionariesService.ReadStatuses().Where(s => s.Id < 5).ToList(); SourcesList = DictionariesService.ReadSites(); CustomersList = DictionariesService.ReadCustomers(); BrokersList = DictionariesService.ReadBrokers(); TradersList = DictionariesService.ReadTraders().OrderBy(t => t.id).ToList(); Init(Auction.Id == 0 ? true : false); }
private void Init() { // Default parameters FromDate = DateTime.Now.AddDays(-10); ToDate = DateTime.Now.AddDays(10); StatusesList = DictionariesService.ReadStatuses().Where(s => s.Id < 5).ToList(); SelectedStatus = StatusesList[3]; // Load orders OrdersList = AuctionService.ReadOrders(1); // Load auctions UpdateAuctionsList(); }
public ActionResult TestCertInfo() { var user = UserService.GetByPK(User.UserID); if (user.EngFullName.IsEmpty()) { user.EngFullName = Linguistics.Translite(user.LastName + " " + user.FirstName, true); } var userAddress = user .UserAddresses.FirstOrDefault(); if (userAddress == null) { userAddress = new UserAddress { CountryID = Countries.Russian } } ; var currentOrder = OrderService.GetCurrentOrder(); if (currentOrder == null) { return(RedirectToCart()); } var isEngCert = currentOrder.OrderDetails.Any(x => _.List(TestCertLang.Eng, TestCertLang.RusEng).Contains(x.Params.Lang)); var isPaper = currentOrder.OrderDetails.Any(x => x.Params.Type == TestCertType.Papper); var model = new TestCertInfoVM { Countries = DictionariesService.GetCountries(), UserAddress = userAddress, User = user, IsEngCert = isEngCert, IsPaper = isPaper }; if (!isEngCert && !isPaper) { return(RedirectToAction(() => Contract())); } return(View(model)); }
private void Init() { TypesList = DictionariesService.ReadDocumentTypes(); if (auction.Id != 0) { FilesList = DocumentService.ReadDocuments(auction.FilesListId); } if (Order.id == 0) { Order = AuctionService.ReadOrder(auction.Id); } if (Order != null) { if ((Order.id != null || Order.id != 0) && (Order.filesListId != null || Order.filesListId != 0)) { CustomerFilesList = DocumentService.ReadDocuments(Order.filesListId); } } }
public void UpdateSupplierOrderView(int supplierOrderId) { if (supplierOrderId == 0) { SupplierOrder = new SupplierOrderView() { id = 0 }; SelectedSupplier = new Supplier(); SelectedBroker = BrokersList[0]; SelectedContract = new Contract(); SelectedRate = new RatesList(); } else { SupplierOrder = SupplierOrderService.ReadSupplierOrder(supplierOrderId); SelectedSupplier = suppliersListStorage.FirstOrDefault(s => s.Id == SupplierOrder.supplierId); SearchCompany = SelectedSupplier.Name; if (SupplierOrder.brokerId != null) { SelectedBroker = BrokersList.FirstOrDefault(s => s.Id == SupplierOrder.brokerId); } else { SelectedBroker = null; } if (SupplierOrder.brokerId != null) { ContractsList = DictionariesService.ReadContracts(SelectedSupplier.companyId, SelectedBroker.Id); SelectedContract = ContractsList.FirstOrDefault(c => c.id == SupplierOrder.contractId); } else { ContractsList = new List <Contract>(); } } }
private void Init() { UnitsList = DictionariesService.ReadUnits(); UpdateLotView(Lot.Id); }
public void SetDictionaries(EditProfileVM result) { result.Countries = DictionariesService.GetCountries(); }