protected void ResetForm() { OverrideButton.Visible = false; Error = ""; ActionList.SelectedIndex = 1; BrandsList.Visible = false; BrandsListLabel.Visible = false; NewBrandNameTextBox.Visible = true; NewBrandNameLabel.Visible = true; NewD3CodeTextBox.Visible = true; NewD3CodeLabel.Visible = true; D3CodeTextBox.Visible = false; D3CodeLabel.Visible = false; D3PartBrandTextBox.Enabled = true; BeerCodeTextBox.Enabled = true; BrandAbbrTextBox.Enabled = true; NewBrandNameTextBox.Text = ""; D3CodeTextBox.Text = ""; NewD3CodeTextBox.Text = ""; D3PartBrandTextBox.Text = ""; BeerCodeTextBox.Text = ""; BrandAbbrTextBox.Text = ""; BrandsList.DataBind(); }
public IActionResult ShowAllBrands() { var viewModel = new BrandsList { Brands = this.brandService.GetAllBrands(), }; return(this.View(viewModel)); }
protected void Page_Load(object sender, EventArgs e) { ProductsList1.DataSource = ProductsFactory.GetProductsList(); ProductsList1.DataBind(); BrandsList.DataSource = BrandsFactory.GetBrandsList(); BrandsList.DataBind(); ProductsList2.DataSource = ProductsFactory.GetProductsList(); ProductsList2.DataBind(); if (Session["customer"] == null) { login.InnerText = "登录"; } }
private void FillFilterValues() { BrandsList = DaoController.Current.getBrandLists(); BrandsList.Insert(0, null); RaisePropertyChanged(() => BrandsList); ManufactureList = DaoController.Current.getManufactureLists(); ManufactureList.Insert(0, null); RaisePropertyChanged(() => ManufactureList); VehicleGroupList = DaoController.Current.getVehicleGroupList(); VehicleGroupList.Insert(0, null); RaisePropertyChanged(() => VehicleGroupList); ModelNosList = DaoController.Current.getModelNosLists(); ModelNosList.Insert(0, null); RaisePropertyChanged(() => ModelNosList); //CabTypesList = DaoController.Current.getCabTypesLists(); //CabTypesList.Insert(0, null); //RaisePropertyChanged(() => CabTypesList); YearsFrom = DaoController.Current.getManufactureYearsListsFrom().Select(i => (int?)i.Year).ToList().Distinct().ToList(); YearsFrom.Insert(0, null); RaisePropertyChanged(() => YearsFrom); YearsTo = DaoController.Current.getManufactureYearsListsTo().Where(i => i.HasValue).Select(i => (int?)i.Value.Year).ToList().Distinct().ToList(); YearsTo.Insert(0, null); RaisePropertyChanged(() => YearsTo); //EnglinesList = DaoController.Current.getEnginesLists(); //EnglinesList.Insert(0, null); //RaisePropertyChanged(() => EnglinesList); }
internal void InitializeCompleted() { if (!DesignerProperties.IsInDesignTool) { Types = new ObservableCollection <Transactions>(); if (LoggedUserInfo.CurrLang == 0) { Types.Add(new Transactions { TransactionId = 0, TransactionName = "أمر الشراء" }); Types.Add(new Transactions { TransactionId = 1, TransactionName = "صباغة" }); Types.Add(new Transactions { TransactionId = 2, TransactionName = "Transfer" }); } else { Types.Add(new Transactions { TransactionId = 0, TransactionName = "Purshase Order" }); Types.Add(new Transactions { TransactionId = 1, TransactionName = "Dyeing" }); Types.Add(new Transactions { TransactionId = 2, TransactionName = "Transfer" }); } Client = new CRUD_ManagerServiceClient(); GetItemPermissions(PermissionItemName.Reservation.ToString()); ObservableCollection <GetItemOnhand_Result> OnHandList = new ObservableCollection <GetItemOnhand_Result>(); Client.GetReservationMainDetailByFabricCompleted += (s, f) => { if (f.OnHandList != null) { OnHandList = f.OnHandList; } TransactionHeader = new TblReservationHeaderViewModel(); foreach (var variable in f.Result) { TransactionHeader.TransactionMainDetails.Add(ReservationMappers.MaptoViewModel(variable, f.mainFabricList, OnHandList)); } Loading = false; }; Client.GetAllSeasonsCompleted += (s, sv) => { foreach (var row in sv.Result) { if (SeasonList.All(x => x.Iserial != row.Iserial)) { SeasonList.Add(new TblLkpSeason().InjectFrom(row) as TblLkpSeason); } } }; Client.GetAllSeasonsAsync(); Client.GetAllBrandsCompleted += (s, sv) => { BrandsList.Clear(); foreach (var variable in sv.Result.OrderBy(x => x.Brand_Code)) { BrandsList.Add(variable); } }; Client.GetAllBrandsAsync(0); TransactionGuid = Guid.NewGuid().ToString(); TransactionHeader = new TblReservationHeaderViewModel { DocDate = DateTime.Now.Date }; SelectedMainDetails = new TblReservationMainDetailsViewModel(); Client.GetReservationHeaderListCompleted += (d, i) => { foreach (var item in i.Result) { TransactionHeaderList.Add(ReservationMappers.MaptoViewModel(item)); } }; lkpClient.GetTblBrandSectionLinkCompleted += (x, sv) => { BrandSectionList.Clear(); foreach (var row in sv.Result) { BrandSectionList.Add(row.TblLkpBrandSection1); } }; SalesorderList = new ObservableCollection <CRUD_ManagerServiceSalesOrderDto>(); SalesorderList.CollectionChanged += SalesorderList_CollectionChanged; Client.GetPurchaseOrderSalesOrdersCompleted += (d, s) => { foreach (var variable in s.Result) { if (!SalesorderList.Any( x => x.SalesOrder.Contains(variable.SalesOrder) && x.SalesOrderColor.Contains(variable.SalesOrderColor)) && !SelectedMainDetails.ReservationDetailsViewModelList.Any(x => x.SalesOrder.Contains(variable.SalesOrder) && x.SalesOrderColor.Contains(variable.SalesOrderColor))) { SalesorderList.Add(variable); } } }; Client.GetPurchaseOrderLinesCompleted += (s, f) => { foreach (var item in f.Result.Where(item => !OrderLineList.Contains(FabricInspectionMapper.MapToOrderLine(item)))) { OrderLineList.Add(FabricInspectionMapper.MapToOrderLine(item)); } Loading = false; }; Client.GetRecivedDyedOrdersCompleted += (s, f) => { foreach (var item in f.Result.Where(item => !OrderLineList.Contains(FabricInspectionMapper.MapToOrderLine(item)))) { OrderLineList.Add(FabricInspectionMapper.MapToOrderLine(item)); } }; Client.GetTransferInventDimLinesCompleted += (s, f) => { foreach (var item in f.Result.Where(item => !OrderLineList.Contains(FabricInspectionMapper.MapToOrderLine(item)))) { OrderLineList.Add(FabricInspectionMapper.MapToOrderLine(item)); } }; Client.GetReservationMainDetailsCompleted += (s, f) => { foreach (var variable in f.Result) { if (variable.Inspected) { Client.GetResInspectionListAsync(variable.LineNum, TransactionHeader.TransOrder); } //f.mainFabricList; TransactionHeader.TransactionMainDetails.Add(ReservationMappers.MaptoViewModel(variable, f.mainFabricList)); } }; Client.SaveReservationCompleted += (a, f) => { if (f.ErrorExists) { var visList = TransactionHeader.TransactionMainDetails.Where(x => f.Result.All(s => s.Fabric == x.Fabric && s.FabricColor == x.FabricColor)); foreach (var item in TransactionHeader.TransactionMainDetails) { item.ErrorVisbility = visList.Contains(item) ? Visibility.Visible : Visibility.Collapsed; } } else { var tblFabricInspectionDetail = f.Result.FirstOrDefault(); if (tblFabricInspectionDetail != null) { TransactionHeader.Iserial = tblFabricInspectionDetail.Tbl_ReservationHeader; } TransactionHeader.TransactionMainDetails.Clear(); foreach (var item in f.Result) { TransactionHeader.TransactionMainDetails.Add((TblReservationMainDetailsViewModel) new TblReservationMainDetailsViewModel().InjectFrom(item)); } var currentUi = Thread.CurrentThread.CurrentUICulture; if (currentUi.DisplayName == "العربية") { MessageBox.Show("Saved"); } else { MessageBox.Show("Saved"); } } }; Client.GenerateReservationFromPlanCompleted += (s, sv) => Client.GetReservationMainDetailsAsync(TransactionHeader.Iserial); Client.GetSalesOrderReservationCompleted += (s, sv) => { GenericMapper.InjectFromObCollection(SelectedMainDetails.ReservationDetailsViewModelList, sv.Result); foreach (var item in (SelectedMainDetails.ReservationDetailsViewModelList)) { item.Tbl_ReservationMainDetails = SelectedMainDetails.Iserial; } }; Client.ReservationLineNumCompleted += (s, p) => { var lines = new ObservableCollection <decimal>(p.Result); if (TransactionHeader.TransactionMainDetails.Count() != 0) { foreach (var variable in TransactionHeader.TransactionMainDetails.Select(x => x.LineNum)) { lines.Add(variable); } } if (SortBy == null) { SortBy = "it.PURCHQTY"; } if (TransactionHeader.TransactionType == 0) { Client.GetPurchaseOrderLinesAsync(OrderLineList.Count, PageSize, "ccm", TransactionHeader.TransOrder, lines, "it.PURCHQTY desc", Filter, ValuesObjects); } if (TransactionHeader.TransactionType == 1) { Client.GetRecivedDyedOrdersAsync(OrderLineList.Count, PageSize, TransactionHeader.TransOrder, lines, "it.PURCHQTY desc", Filter, ValuesObjects); } else if (TransactionHeader.TransactionType == 2) { Client.GetTransferInventDimLinesAsync(OrderLineList.Count, PageSize, "ccm", TransactionHeader.TransOrder, lines, "it.PURCHQTY desc", Filter, ValuesObjects); } }; } }