private void InitControls() { CompanyApplication comApp = new CompanyApplication(); List <CompanysEntity> list = comApp.GetAllCompanies(); list.BindDropdown(ddlCompany, "CompanyName", "ComID", "Please select", "0"); InitPM(); txtFreeHour.Text = "40"; }
public void ddlCompanyBind() { List <CompanysEntity> list = companyApp.GetAllCompanies(); list.BindDropdown <CompanysEntity>(ddlCompany, "CompanyName", "ComID", "All", "", QS("Company")); ddlStatus.DataSource = InvoiceStatus.Awaiting_Payment.ToSelectList().ToList(); ddlStatus.DataValueField = "Value"; ddlStatus.DataTextField = "Text"; ddlStatus.DataBind(); ddlStatus.Items.Insert(0, new ListItem("All", "")); }
private void InitProject() { ProjectApplication projApp = new ProjectApplication(); List <ProjectDetailDTO> list = projApp.GetUserProjects(UserInfo); list.BindDropdown <ProjectDetailDTO>(ddlProject, "Title", "ID", "All", "0"); CompanyApplication comApp = new CompanyApplication(); List <CompanysEntity> listCom = comApp.GetAllCompanies(); listCom.BindDropdown(ddlCompany, "CompanyName", "ComID", "All", "0"); }
private void InitCompanyBind() { CompanyApplication comApp = new CompanyApplication(); List <CompanysEntity> list = comApp.GetAllCompanies(); this.ddlCompany.DataTextField = "CompanyName"; this.ddlCompany.DataValueField = "ComID"; this.ddlCompany.DataSource = list; this.ddlCompany.DataBind(); this.ddlCompany.Items.Insert(0, new ListItem("Please select...", "")); }
private void InitCompany() { CompanyApplication comApp = new CompanyApplication(); if (UserInfo.Role == RolesEnum.CLIENT) { CompanysEntity model = comApp.GetCompany(UserInfo.CompanyID); ddlCompany.Items.Add(new ListItem(model.CompanyName, model.ID.ToString())); tdCompanyLabel.Visible = false; tdCompanyDdl.Visible = false; } else { List <CompanysEntity> list = comApp.GetAllCompanies(); list.BindDropdown <CompanysEntity>(ddlCompany, "CompanyName", "ID", "All", "0"); } ddlCompany_OnSelectedIndexChanged(null, null); }
private void InitCompany() { CompanyApplication comApp = new CompanyApplication(); if (UserInfo.Role == RolesEnum.CLIENT) { CompanysEntity model = comApp.GetCompany(UserInfo.CompanyID); ddlCompany.Items.Add(new ListItem(model.CompanyName, model.ID.ToString())); tdCompanyLabel.Visible = false; tdCompanyDdl.Visible = false; ltlWhosCompany.Text = ""; } else { List <CompanysEntity> list = comApp.GetAllCompanies(); list = list.FindAll(c => c.ID > 1); list.BindDropdown <CompanysEntity>(ddlCompany, "CompanyName", "ID", "All", "0"); ltlWhosCompany.Text = " - All company files"; } }
public void ddlCompanyBind() { List <CompanysEntity> list = companyApp.GetAllCompanies(); list.BindDropdown <CompanysEntity>(ddlCompany, "CompanyName", "ComID", "All", "", QS("Company")); }