public ActionResult Delete(EducationItemList model)
        {
            //DeleteAll();

            if (!string.IsNullOrWhiteSpace(model.SelectedItemIen))
            {
                BrokerOperationResult result = this.DashboardRepository.Education.DeleteEducationItem(model.SelectedItemIen);

                if (!result.Success)
                {
                    this.Error(result.Message);
                }
                else
                {
                    this.Information("Education Item Deleted Successfully");
                }
            }

            return(RedirectToAction("Index"));
        }
        public ActionResult Index(string page, string sort)
        {
            EducationItemList model = new EducationItemList();

            int pageVal = this.GetPage(page);

            EducationItemSort sortVal = EducationItemSort.Type;

            Enum.TryParse <EducationItemSort>(sort, out sortVal);

            model.Sort = sortVal;

            EducationItemsResult result = this.DashboardRepository.Education.GetEducationItems("", "", EducationItemType.Unknown, pageVal, EducationItemsPerPage, sortVal);

            if (!result.Success)
            {
                this.Error(result.Message);
            }
            else
            {
                if (result.EducationItems.Count == 0)
                {
                    result = this.DashboardRepository.Education.LoadDefaults();

                    if (result.Success)
                    {
                        result = this.DashboardRepository.Education.GetEducationItems("", "", EducationItemType.Unknown, pageVal, EducationItemsPerPage, sortVal);
                    }
                }

                model.EducationItems = result.EducationItems;

                model.Paging.SetPagingData(EducationItemsPerPage, pageVal, result.TotalResults);

                model.Paging.BaseUrl = Url.Action("Index", new { page = "", sort = (int)sortVal });
            }

            return(View(model));
        }