public void LoadCompanyDropDownList()
 {
     List<Company> companyList=new List<Company>();
     Company aCompany=new Company();
     companyList = aCompany.GetAllCompany(0);
     companyIdRadDropDownList1.DataSource = companyList;
     companyIdRadDropDownList1.DataTextField = "CompanyName";
     companyIdRadDropDownList1.DataValueField = "CompanyId";
     companyIdRadDropDownList1.DataBind();
 }
 public void LoadAllCompany()
 {
     try
     {
         Company aCompany = new Company();
         companyList = aCompany.GetAllCompany(0);
     }
     catch (Exception exc)
     {
         Alert.Show(exc.Message);
     }
 }
 private void LoadAllCompany()
 {
     Company company = new Company();
     allCompanyList = company.GetAllCompany(_company.CompanyId);
     List<string> nameList = new List<string>();
     foreach (Company com in allCompanyList)
     {
         nameList.Add(com.CompanyName);
     }
 }
        public void LoadCompanyList()
        {
            Company aCompany = new Company();

            companyList = aCompany.GetAllCompany(_company.CompanyId);
        }
Beispiel #5
0
        void LoadCompanyIdDropDown()
        {
            try
            {
                List<Company> companyList = new List<Company>();
                Company aCompany = new Company();

                companyList = aCompany.GetAllCompany(_company.CompanyId);

                CompanyNameDropDownList.DataSource = companyList;
                CompanyNameDropDownList.DataTextField = "CompanyName";
                CompanyNameDropDownList.DataValueField = "CompanyId";
                CompanyNameDropDownList.DataBind();
            }
            catch (Exception exp)
            {
                Alert.Show(exp.Message);
            }
        }
Beispiel #6
0
        private void LoadUserInfoTable()
        {
            Users newUsers = new Users();
            List<Users> userList = new List<Users>();
            userList = newUsers.GetAllUsersList();
            Company aCompanyList = new Company();

            List<Company> companyNameList = aCompanyList.GetAllCompany(_company.CompanyId);

            string htmlContent = "";

            foreach (Users aUserInfo in userList)
            {
                if ((aUserInfo.UserName == "Super") || (aUserInfo.UserName == "Admin"))
                {
                    continue;
                }
                else
                {
                    string companyName = "";
                    foreach (Company aCompany in companyNameList)
                    {
                        if (aCompany.CompanyId == aUserInfo.CompanyId)
                            companyName = aCompany.CompanyName;
                    }
                    htmlContent +=
                        String.Format(
                            @"<tr><th>{0}</th><th>{1}</th><th>{2}</th><th>{3}</th></tr>", aUserInfo.UserName,
                            aUserInfo.UpdateBy, aUserInfo.UpdateDate,  aUserInfo.IsActive
                            );
                }

            }
            userInformationTableBody.InnerHtml += htmlContent;
        }