private void FillDropDown() { DataBindingHelper.PopulateActiveBranches(ddlBranch, User.Identity.Name, false); WebFormHelper.BindDropDown(ddlMonth, CommonHelper.GetMonthNames(), "value", "key"); ddlMonth.SelectedValue = DateTime.Today.Month.ToString(); ddlYear.Items.Clear(); ddlYear.Items.Add(Convert.ToString(DateTime.Today.Year - 1)); ddlYear.Items.Add(Convert.ToString(DateTime.Today.Year)); ddlYear.SelectedValue = DateTime.Today.Year.ToString(); }
private void FillDropDown() { DataBindingHelper.PopulateActiveBranches(BranchService, ddlBranch, User.Identity.Name); chkExcludeFirstAccrual.Checked = true; WebFormHelper.BindDropDown(ddlMonth, CommonHelper.GetMonthNames(), "value", "key"); ddlMonth.SelectedValue = DateTime.Today.Month.ToString(); ddlYear.Items.Clear(); ddlYear.Items.Add(new DropDownListItem(Convert.ToString(DateTime.Today.Year - 1))); ddlYear.Items.Add(new DropDownListItem(Convert.ToString(DateTime.Today.Year))); ddlYear.SelectedValue = DateTime.Today.Year.ToString(); }
private void LoadContractInfo(int contractID) { var contract = ContractService.Get(contractID); var customer = contract.Customer; var package = contract.PackageHeader; lblContractNo.Text = contract.ContractNo; lblContractDate.Text = contract.Date.ToString("dddd, dd MMMM yyyy"); lblCustomer.Text = String.Format("{0} - {1} {2}", customer.Barcode, customer.FirstName, customer.LastName); lblPackage.Text = package.Name; WebFormHelper.BindDropDown(ddlSales, EmployeeService.GetAll(contract.BranchID), "FirstName", "ID", true); btnAddSales.Enabled = !contract.VoidDate.HasValue; }
private void PopulateDropDown() { WebFormHelper.BindDropDown(ddlItem, ItemService.GetMaterialItems(), "Description", "ID", true); }