Exemple #1
0
 private void LoadUsers()
 {
     using (var context = new UzoneEntities())
     {
         List<RegisteredUser> _users;
         _users = context.Set<RegisteredUser>().ToList();
         UsersGrid.DataSource = _users;
     }
 }
Exemple #2
0
 private void LoadSecurityQuestion()
 {
     using (var context = new UzoneEntities())
     {
         List<LockedQuestion> _questions;
         _questions = context.Set<LockedQuestion>().ToList();
         comboSecurityQues.DataSource = _questions;
         comboSecurityQues.DataBind();
     }
 }
Exemple #3
0
 private void LoadSchool()
 {
     using (var context = new UzoneEntities())
     {
         List<School> _schools;
         _schools = context.Set<School>().ToList();
         comboSchool.DataSource = _schools;
         comboSchool.DataBind();
     }
 }
Exemple #4
0
 private void LoadResources()
 {
     using (var context = new UzoneEntities())
     {
         if (Session["currentSchoolID"] != null)
         {
             var currentSchool = (long)Session["currentSchoolID"];
             if (RadScheduler1.ResourceTypes.FirstOrDefault() == null)
             {
                 List<EventLocation> _locations;
                 _locations = context.Set<EventLocation>().Where(l => l.SchoolID == currentSchool).ToList();
                 ResourceType _item = new ResourceType();
                 _item.DataSource = _locations;
                 _item.ForeignKeyField = "SchoolID";
                 _item.KeyField = "EventLocationID";
                 _item.TextField = "EventLocationName";
                 _item.Name = "Location";
                 RadScheduler1.ResourceTypes.Add(_item);
             }
         }
     }
 }
Exemple #5
0
 private void LoadScheduler()
 {
     using (var context = new UzoneEntities())
     {
         if (Session["currentSchoolID"] != null)
         {
             var currentSchool = (long)Session["currentSchoolID"];
             List<Scheduler> _schedulers;
             _schedulers = context.Set<Scheduler>().Where(s => s.SchoolID == currentSchool).ToList();
             RadScheduler1.DataSource = _schedulers;
         }
     }
 }
Exemple #6
0
 private void LoadLocations()
 {
     using (var context = new UzoneEntities())
     {
         if (Session["currentSchoolID"] != null)
         {
             var currentSchool = (long)Session["currentSchoolID"];
             List<EventLocation> _locations;
             _locations = context.Set<EventLocation>().Where(l => l.SchoolID == currentSchool && l.Active == true).ToList();
             LocationGrid.DataSource = _locations;
         }
         else
         {
             List<EventLocation> _locations = new List<EventLocation>();
             LocationGrid.DataSource = _locations;
         }
     }
 }