示例#1
0
        public void PopulateGrid()
        {
            objclsBALUsers = new clsBALUsers();
            DataSet ds = objclsBALUsers.GetUserDetails();

            gvRole.DataSource = ds;
            gvRole.DataBind();
            Session[clsEALSession.UserDetails] = ds;
            if (ViewState["SortExpression"] != null && ViewState["sortDirection"] != null)
            {
                SortGridView(ViewState["SortExpression"].ToString(), ViewState["sortDirection"].ToString());
            }
        }
示例#2
0
        public void deleteUserNotExisting()
        {
            objclsBALUsers = new clsBALUsers();
            DataSet ds = objclsBALUsers.GetUserDetails();

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        string       strUSERADID     = ds.Tables[0].Rows[i][4].ToString();
                        clsEALUser   objclsEALUser   = new clsEALUser();
                        clsBALCommon objclsBALCommon = new clsBALCommon();
                        objclsEALUser = objclsBALCommon.FetchUserDetailsFromAD(strUSERADID);
                        if (objclsEALUser == null)
                        {
                            objclsBALUsers.DeleteUserFromDb(strUSERADID);
                        }
                    }
                }
            }
        }