public PartialViewResult Edit(int id)
 {
     var userDetailManager = new DataAccess.UserManager();
     var officeMananer = new DataAccess.OfficeMananer();
     var user = userDetailManager.GetUserDetail(UserDetail.UserId);
     var offices = officeMananer.GetOffices(IsAdmin ? 0 : UserDetail.UserId);
     ViewData["Offices"] = offices;
     var conventionManager = new DataAccess.ConventionManager();
     var conventions = conventionManager.GetConventions();
     ViewData["Conventions"] = conventions;
     var eventManager = new DataAccess.EventManager();
     var eventDetail = eventManager.GetEventDetail(id);
     return PartialView(eventDetail);
 }
 public ActionResult Add()
 {
     var userDetailManager = new DataAccess.UserManager();
     var officeMananer = new DataAccess.OfficeMananer();
     var user = userDetailManager.GetUserDetail(UserDetail.UserId);
     var offices = officeMananer.GetOffices(IsAdmin ? 0 : UserDetail.UserId);
     ViewData["Offices"] = offices;
     var conventionManager = new DataAccess.ConventionManager();
     var conventions = conventionManager.GetConventions();
     ViewData["Conventions"] = conventions;
     if (IsAdmin)
     {
         var customRoleProvider = new CustomAuthentication.CustomRoleProvider();
         var customMembershipProvider = new CustomAuthentication.CustomMembershipProvider();
         ViewData["Employee"] = customMembershipProvider.GetUsers(4);
     }
     return PartialView();
 }
 public PartialViewResult Edit(int id)
 {
     var visitTypeManager = new DataAccess.VisitTypeManager();
     ViewData["VisitTypes"] = visitTypeManager.GetVisitTypes();
     var officeManager = new DataAccess.OfficeMananer();
     var offices = officeManager.GetOffices(IsAdmin ? 0 : UserDetail.UserId);
     ViewData["Offices"] = offices;
     var eventManager = new DataAccess.EventManager();
     ViewData["Events"] = eventManager.GetActiveEvents(offices.Select(model => model.OfficeId).ToList());
     var userManager = new DataAccess.FSMDetailManager();
     ViewData["FSMUsers"] = userManager.FSMDetails();
     var conventionManager = new DataAccess.ConventionManager();
     ViewData["Convention"] = conventionManager.GetConventions();
     var serviceManager = new DataAccess.ServiceManager();
     ViewData["Services"] = serviceManager.GetServices();
     var audienceManager = new DataAccess.AudienceManager();
     var audience = audienceManager.GetAudience(id);
     return PartialView(audience);
 }
 public JsonResult GetConventions(int pageNo = 1, int pageSize = 3)
 {
     var conventionManager = new DataAccess.ConventionManager();
     var conventions = conventionManager.GetConventions();
     var totalRecord = conventions.Count();
     var filteredConventions = conventions.Select(modal => new
     {
         id = modal.ConventionId,
         Name = modal.Name,
         StartDate = modal.StartDate.ToString("dd-MM-yyyy HH:mm"),
         EndDate = modal.EndDate.ToString("dd-MM-yyyy HH:mm"),
         Booking = GetConventionBookingTarget(modal.ConventionId),
         Donation = GetFundRaisingTarget(modal.ConventionId),
         GSBAmount = GetGSBAountTarget(modal.ConventionId),
         Events = GetEventsTarget(modal.ConventionId),
         IsResourceAttached = modal.IsFileAttached,
         ProfilePic = modal.FileResource == null ? Url.Content("~/Content/Images/Common/office_convention_avatar.png") : Url.Content(modal.FileResource.path)
     }).Skip((pageNo - 1) * pageSize).Take(pageSize).ToList();
     return Json(new
     {
         totalRecord = totalRecord,
         currentPage = pageNo,
         pageSize = pageSize,
         conventions = filteredConventions
     });
 }