Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session["enrolledList"] = new List <Academic.DbEntities.User.Users>();
                var user = Page.User as CustomPrincipal;
                if (user != null)
                {
                    using (var classHelper = new DbHelper.Classes())
                        using (var helper = new DbHelper.User())
                        {
                            //ListView1.DataSource = helper.ListAllUsers(user.SchoolId, 100, 1);
                            //ListView1.DataBind();
                            var list = helper.ListAllUsers(user.SchoolId, 100, 1);
                            list.AddRange(list);
                            grdNotEnrolled.DataSource = list;
                            grdNotEnrolled.DataBind();
                            list.RemoveRange(0, 4);

                            //var enrolledList =classHelper.ListUsersOfSubjectSession()

                            grdEnrolled.DataSource = list;
                            grdEnrolled.DataBind();
                        }
                }
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     using (var helper = new DbHelper.User())
     {
         var user = User as CustomPrincipal;
         if (user != null)
         {
             var cats = helper.ListAllUsers();
             ListView1.DataSource = cats;
             ListView1.DataBind();
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         var user = Page.User as CustomPrincipal;
         if (user != null)
         {
             hidSchoolId.Value = user.SchoolId.ToString();
             using (var helper = new DbHelper.User())
             {
                 ListView1.DataSource = helper.ListAllUsers(user.SchoolId, 20, 1);
                 ListView1.DataBind();
             }
         }
     }
 }