protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { List <CompanysEntity> list = companyApplication.GetCompaniesHasProject(); list.BindDropdown(ddlCompany, "CompanyName", "ComID", "All", "0", QS("company")); InitControl(); } }
protected void Page_Load(object sender, EventArgs e) { AddNewObject.Visible = CheckRoleCanAccessPage("/Sunnet/Projects/AddProject.aspx"); projApp = new ProjectApplication(); if (!IsPostBack) { List <CompanysEntity> list = companyApplication.GetCompaniesHasProject(); list.BindDropdown(ddlCompany, "CompanyName", "ComID", "All", "0"); InitControl(); } }
private void InitDdlBind() { CompanysRepositorySqlDataProvider crsp = new CompanysRepositorySqlDataProvider(); int cid = crsp.GetCompanyId("Sunnet"); IList <ProjectDetailDTO> listProject = proApp.GetAllProjects(); listProject = listProject.Where(c => c.CompanyID != cid).ToList(); this.ddlProject.DataSource = listProject; this.ddlProject.DataBind((ProjectDetailDTO project, string status) => project.Status.ToString() == status); this.ddlProject.SelectItem("0"); this.tm_ddlProject.DataSource = listProject; this.tm_ddlProject.DataBind((ProjectDetailDTO project, string status) => project.Status.ToString() == status); this.tm_ddlProject.SelectItem("0"); List <CompanysEntity> list = companyApp.GetCompaniesHasProject(); list.BindDropdown(tm_ddlCompany, "CompanyName", "ComID", "All", "0", QS("company")); }