예제 #1
0
        private void InitControls()
        {
            CompanyApplication    comApp = new CompanyApplication();
            List <CompanysEntity> list   = comApp.GetAllCompanies();

            list.BindDropdown(ddlCompany, "CompanyName", "ComID", "Please select", "0");
            InitPM();
            txtFreeHour.Text = "40";
        }
예제 #2
0
        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", ""));
        }
예제 #3
0
        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");
        }
예제 #4
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...", ""));
        }
예제 #5
0
        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);
        }
예제 #6
0
        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";
            }
        }
예제 #7
0
        public void ddlCompanyBind()
        {
            List <CompanysEntity> list = companyApp.GetAllCompanies();

            list.BindDropdown <CompanysEntity>(ddlCompany, "CompanyName", "ComID", "All", "", QS("Company"));
        }