public void LoadDefaultValues() { //Load employees EmployeeBL e = new EmployeeBL(); var employeelist = e.GetEmployeelist(); foreach (var elist in employeelist) { ComboboxItem item = new ComboboxItem(); item.Text = elist.FirstName; item.Value = elist.EmployeeID; ddlEmployees.Items.Add(item); } //Load Vehicle Model Name VehicleInfoBL v = new VehicleInfoBL(); var vlist = v.GetAllVehicleInfo(); foreach (var vl in vlist) { ComboboxItem item = new ComboboxItem(); item.Text = vl.ModelName;; item.Value = vl.VehicleInfoID; ddlModel.Items.Add(item); } //Load Colors ddlColor1.DataSource = GlobalSetup.colors; ddlColor2.DataSource = GlobalSetup.colors2; ddlColor3.DataSource = GlobalSetup.colors3; //Load Status string searchMode = ""; if (_mode != "" && _mode != "EDIT") { searchMode = "ALL"; } var slist = v.GetVehicleSalesStatus(searchMode); foreach (var vl in slist) { ComboboxItem item = new ComboboxItem(); item.Text = vl.Description;; item.Value = vl.VehicleSalesStatusID; ddlStatus.Items.Add(item); } //Load finance FinanceInfoBL fBL = new FinanceInfoBL(); foreach (var vl in fBL.GetAllFinanceInfo()) { ComboboxItem item = new ComboboxItem(); item.Text = vl.Name; item.Value = vl.FinanceInfoID; ddlFinance.Items.Add(item); } }
private void LoadDefaultValues() { //Load finance FinanceInfoBL fBL = new FinanceInfoBL(); foreach (var vl in fBL.GetAllFinanceInfo()) { ComboboxItem item = new ComboboxItem(); item.Text = vl.Name; item.Value = vl.FinanceInfoID; ddlFinance.Items.Add(item); } }