コード例 #1
0
 private void LoadAssignCompanyDDL()
 {
     try
     {
         _objUserList           = new UserList();
         _objUserList.UserName  = txtLoginUserName.Text == string.Empty ? null : txtLoginUserName.Text;
         _objUserListController = new UserListController();
         DataTable dtAssignCompany = _objUserListController.GetAssignCompany(_objUserList);
         _objUserListController.LoadCompanyDDL(dtAssignCompany, ddlCompany);
         if (dtAssignCompany.Rows.Count > 0)
         {
             lblCompanyText.Visible = true;
             ddlCompany.Visible     = true;
             btnLogin.Visible       = true;
         }
         else
         {
             lblCompanyText.Visible = false;
             ddlCompany.Visible     = false;
             btnLogin.Visible       = false;
         }
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
コード例 #2
0
 private void ControllnkbtnChangeCompany()
 {
     try
     {
         _objUserList           = new UserList();
         _objUserList.UserName  = LoginUserInformation.UserName;
         _objUserListController = new UserListController();
         DataTable dtAssignCompany = _objUserListController.GetAssignCompany(_objUserList);
         if (dtAssignCompany.Rows.Count > 1)
         {
             lnkbtnChangeCompany.Visible = true;
         }
         else
         {
             lnkbtnChangeCompany.Visible = false;
         }
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }