protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var depts = dao.GetDepartments(); depts.RemoveAt(0); depts.Sort(delegate(SimpleLookupDTO d1, SimpleLookupDTO d2) { return(d1.Description.CompareTo(d2.Description)); } ); ddlOUID.DataSource = depts; ddlOUID.DataTextField = "description"; ddlOUID.DataValueField = "ID"; ddlOUID.DataBind(); ddlDepartment.DataSource = depts; ddlDepartment.DataTextField = "description"; ddlDepartment.DataValueField = "ID"; ddlDepartment.DataBind(); int val = int.Parse(ddlDepartment.SelectedValue); var employees = registryDao.GetEmployees(val); ddlEmployee.DataSource = employees; ddlEmployee.DataTextField = "Description"; ddlEmployee.DataValueField = "ID"; ddlEmployee.DataBind(); Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("CasesPending", "Lista spraw z kończącym się terminem realizacji"); dict.Add("CasesOutOfDate", "Lista spraw przeterminowanych"); ddlReports.DataSource = dict; ddlReports.DataTextField = "Value"; ddlReports.DataValueField = "Key"; ddlReports.DataBind(); List <string> reportTypes = new List <string>(); reportTypes.Add("PDF"); reportTypes.Add("Excel"); ddlReportType.DataSource = reportTypes; ddlReportType.DataBind(); FillSubscriptionGrid(); } }
public System.Collections.ObjectModel.Collection <Pemi.Esoda.DTO.SimpleLookupDTO> GetEmployees(int organizationalUnitId) { System.Collections.ObjectModel.Collection <Pemi.Esoda.DTO.SimpleLookupDTO> lista = dao.GetEmployees(organizationalUnitId); lista.Insert(0, new Pemi.Esoda.DTO.SimpleLookupDTO(0, "- nieokreœlony -")); return(lista); }