public ActionResult CreateEvent(EventDetailModel eventDetail, string AllCollages)
 {
     if (ModelState.IsValid)
     {
         eventDetail.CollageID = Convert.ToInt32(AllCollages);
         EventDetailBusinessModel eventBizModel = new EventDetailBusinessModel
         {
             CollageID        = eventDetail.CollageID,
             EventDate        = eventDetail.EventDate,
             EventDescription = eventDetail.EventDescription,
             EventName        = eventDetail.EventName,
             EventType        = eventDetail.EventType
         };
         adminBusinessOperations.CreateEvent(eventBizModel);
         return(RedirectToAction("ListOfEvents"));
     }
     ViewBag.AllCollages = new SelectList(StaticMethod.GetAlCollages(), "CollageID", "CollageName");
     return(View(eventDetail));
 }
        public ActionResult CreateUser(UserProfile objUser, string AllCollages, string AllUserRoles)
        {
            if (ModelState.IsValid)
            {
                objUser.CollageID = Convert.ToInt32(AllCollages);
                objUser.RoleID    = string.IsNullOrEmpty(AllUserRoles) ? 1002 : Convert.ToInt32(AllUserRoles);
                UserBusinessModel userProfile = new UserBusinessModel {
                    FirstName = objUser.FirstName,
                    LastName  = objUser.LastName,
                    UserName  = objUser.UserName,
                    Password  = objUser.Password,
                    CollageID = objUser.CollageID,
                    RoleID    = objUser.RoleID
                };

                adminBusinessOperations.CreaeUser(userProfile);
            }
            ViewBag.AllCollages  = new SelectList(StaticMethod.GetAlCollages(), "CollageID", "CollageName");
            ViewBag.AllUserRoles = new SelectList(StaticMethod.GetAllUserRoles(), "RoleID", "RoleName");
            return(View(objUser));
        }
 public ActionResult CreateEvent()
 {
     @ViewData["headerName"] = "Create Event";
     ViewBag.AllCollages     = new SelectList(StaticMethod.GetAlCollages(), "CollageID", "CollageName");
     return(View());
 }
 public ActionResult CreateUser()
 {
     ViewBag.AllCollages  = new SelectList(StaticMethod.GetAlCollages(), "CollageID", "CollageName");
     ViewBag.AllUserRoles = new SelectList(StaticMethod.GetAllUserRoles(), "RoleID", "RoleName");
     return(View());
 }