コード例 #1
0
 public ActionResult DeleteEvent()
 {
     Models.Event e = new Models.Event();
     e.User = new Models.User();
     e.User = e.User.GetUserSession();
     if (e.User.IsAuthenticated)
     {
         long lngID = Convert.ToInt64(RouteData.Values["id"]);
         e = e.GetEvent(lngID);
     }
     return(View(e));
 }
コード例 #2
0
        public ActionResult EventGallery()
        {
            Models.Event e = new Models.Event();
            Models.User  u = new Models.User();
            u      = u.GetUserSession();
            e.User = u;

            if (e.User.IsAuthenticated)
            {
                Models.Database db    = new Models.Database();
                long            lngID = Convert.ToInt64(RouteData.Values["id"]);
                e        = e.GetEvent(lngID);
                e.Images = db.GetEventImages(lngID);
            }
            return(View(e));
        }
コード例 #3
0
        public ActionResult Event()
        {
            Models.User  u = new Models.User();
            Models.Event e = new Models.Event();
            u      = u.GetUserSession();
            e.User = u;

            if (e.User.IsAuthenticated)
            {
                if (RouteData.Values["id"] == null)                   //add an empty event
                {
                    e.Start = new DateTime(DateTime.Now.Year + 1, DateTime.Now.Month, DateTime.Now.Day, 13, 0, 0);
                    e.End   = new DateTime(DateTime.Now.Year + 1, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0);
                }
                else                   //get the event
                {
                    long id = Convert.ToInt64(RouteData.Values["id"]);
                    e = e.GetEvent(id);
                }
            }
            return(View(e));
        }