public ActionResult Index()
        {
            var vm = new PickListViewModel();

            vm.HandleRequest();
            return(View(vm));
        }
        public ActionResult ShowInternational()
        {
            var vm = new PickListViewModel();

            vm.SearchEntity.DIFlag = "I";
            vm.HandleRequest();
            return(View("Index", vm));
        }
        public ActionResult Index(PickListViewModel vm)
        {
            vm.IsValid = ModelState.IsValid; // mvc sets this based on the data annotations
            vm.HandleRequest();

            if (vm.IsValid)
            {
                ModelState.Clear();
            }
            else
            {
                foreach (KeyValuePair <string, string> item in vm.ValidationErrors)
                {
                    ModelState.AddModelError(item.Key, item.Value);
                }
            }

            return(View(vm));
        }