Example #1
0
        public List <ClsUserDetails> GetAllUserDetails()
        {
            UserMaster            Table     = new UserMaster();
            DataSet               ds        = Table.GetAllUserDetails();
            List <ClsUserDetails> User_List = new List <ClsUserDetails>();
            ClsUserDetails        details;

            if (HasData(ds, 0))
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    if (ds.Tables[0].Rows[i] != null)
                    {
                        details                 = new ClsUserDetails();
                        details.UserID          = ds.Tables[0].Rows[i]["nID"].ToString();
                        details.UserName        = ds.Tables[0].Rows[i]["cFullName"].ToString();
                        details.ShortID         = ds.Tables[0].Rows[i]["cShortID"].ToString();
                        details.Email           = ds.Tables[0].Rows[i]["cMailId"].ToString();
                        details.ContactNo       = ds.Tables[0].Rows[i]["cContactNumber"].ToString();
                        details.Password        = Decrypt(ds.Tables[0].Rows[i]["cPassword"].ToString());
                        details.LeveID          = Convert.ToInt32(ds.Tables[0].Rows[i]["nLevelID"].ToString());
                        details.DesignationID   = Convert.ToInt32(ds.Tables[0].Rows[i]["nDesignationID"].ToString());
                        details.DepartmentID    = Convert.ToInt32(ds.Tables[0].Rows[i]["nDepartmentID"].ToString());
                        details.RoleIds         = Convert.ToInt32(ds.Tables[0].Rows[i]["nRoleID"].ToString());
                        details.LeveName        = ds.Tables[0].Rows[i]["LevelName"].ToString();
                        details.DesignationName = ds.Tables[0].Rows[i]["Designation"].ToString();
                        details.DepartmentName  = ds.Tables[0].Rows[i]["Department"].ToString();
                        details.OrgshortID      = ds.Tables[0].Rows[i]["OrgShortId"].ToString();
                        User_List.Add(details);
                    }
                }
            }

            return(User_List);
        }