Exemple #1
0
        public ActionResult Save(string id, int locationId)
        {
            //List<int> ls = new List<int>();
            try
            {
                List <MainCalenderNotificationViewModel> vm = new List <MainCalenderNotificationViewModel>();

                string[] intre = id.Split(',');
                foreach (var item in intre)
                {
                    MainCalenderNotificationViewModel single = new MainCalenderNotificationViewModel();
                    single.CollwkDay = Convert.ToInt32(item);
                    vm.Add(single);
                }



                var message = notificationService.saveNotification(vm, locationId);
                return(Json(message, JsonRequestBehavior.AllowGet));
            }
            catch (Exception e)
            {
                return(Json(e, JsonRequestBehavior.AllowGet));
            }
        }
Exemple #2
0
        public ActionResult _CalenderList(string location, string weekday, int pageNo = 1, int pageSize = 10)
        {
            MainCalenderNotificationViewModel customerViewModel = new MainCalenderNotificationViewModel();
            var calenderList = notificationService.getCalenderNotificationList(location, weekday, pageNo, pageSize);

            customerViewModel.calenderList = new StaticPagedList <MainCalenderNotificationViewModel>(calenderList, pageNo, pageSize, (calenderList.Count == 0) ? 0 : calenderList.FirstOrDefault().TotalCount);
            return(PartialView(customerViewModel));
        }
Exemple #3
0
        public ActionResult Index(MainCalenderNotificationViewModel vm)
        {
            //if (vm.Id != 0)
            //{
            //    var message = notificationService.EditCollectionLocation(vm, Convert.ToInt32(vm.CollectorId));
            //    return Json(message, JsonRequestBehavior.AllowGet);
            //}
            //else
            //{
            return(RedirectToAction("Save", new { @id = vm.weekDays, @locationId = vm.LocationId }));

            //}
        }
Exemple #4
0
        public ActionResult CalenderList()
        {
            try
            {
                MainCalenderNotificationViewModel customerViewModel = new MainCalenderNotificationViewModel();
                var calenderList = notificationService.getCalenderNotificationList(null, null, 1, 10);
                customerViewModel.calenderList = new StaticPagedList <MainCalenderNotificationViewModel>(calenderList, 1, 10, (calenderList.Count == 0) ? 0 : calenderList.FirstOrDefault().TotalCount);



                return(PartialView(customerViewModel));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }