Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                EventAdminMaster master = (EventAdminMaster)this.Master;
                EventAdminNav    nav    = (EventAdminNav)master.FindControl("EventAdminNav");
                nav.PageName = "Login";
            }

            Session["AppUser"] = null;
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["AppUser"] == null)
     {
         Response.Redirect("Login.aspx");
     }
     else
     {
         user = (AppUser)Session["AppUser"];
     }
     if (!IsPostBack)
     {
         EventAdminMaster master = (EventAdminMaster)this.Master;
         EventAdminNav    nav    = (EventAdminNav)master.FindControl("EventAdminNav");
         nav.PageName = "AddEvent";
     }
 }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["AppUser"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                user = (AppUser)Session["AppUser"];
            }
            if (!IsPostBack)
            {
                EventAdminMaster master = (EventAdminMaster)this.Master;
                EventAdminNav    nav    = (EventAdminNav)master.FindControl("EventAdminNav");
                nav.PageName = "EventList";
                allEvents    = Event.GetList();
                yourEvents   = allEvents.Where(ev =>
                                               ev.UserID == user.UserId).OrderBy(ev => ev.Date).ToList();

                this.yourEventsGrid.DataSource = yourEvents;
                this.yourEventsGrid.DataBind();
            }
        }