public ActionResult DeleteFunction(string functionText)
 {
     functionText = Server.UrlDecode(functionText);
     if (!string.IsNullOrEmpty(functionText))
     {
         PerformerStatFilteredViewModel.DeleteFunction(functionText);
     }
     // отправить обратно
     return(RedirectToAction("TraderRate"));
 }
 public ActionResult EditFunction(SelectListItem functionWithComment)
 {
     if (functionWithComment == null)
     {
         return(View());
     }
     PerformerStatFilteredViewModel.AddFunction(functionWithComment.Text, functionWithComment.Value);
     // перенаправить на страницу отчета
     return(RedirectToAction("TraderRate"));
 }
        public ActionResult CheckFunction(string functionText)
        {
            functionText = Server.UrlDecode(functionText);
            string error;

            PerformerStatFilteredViewModel.CheckFunction(functionText, out error);
            if (string.IsNullOrEmpty(error))
            {
                error = "OK";
            }
            return(Content(error));
        }
        public ActionResult TraderRate(PerformerStatFilteredViewModel model)
        {
            if (model == null || !model.IsInitialized)
            {
                model = new PerformerStatFilteredViewModel {
                    CountAccount = 25, IsInitialized = true
                };
            }

            var    records = PerformerStatRecordStorage.GetRecords();
            string errorStr;

            model.FilterRecords(records, out errorStr);

            if (Request.IsAjaxRequest())
            {
                return(PartialView("TraderRatePartial", model));
            }
            return(View("TraderRate", model));
        }