Ejemplo n.º 1
0
 public override ActionResult AdvSearch(string control, int mode, PersonThemeAccessor.SearchParameters parameters)
 {
     return(ChoosePersonTypes());
 }
Ejemplo n.º 2
0
        public override ActionResult Dispatch(string command, string control, int mode, int?id, PersonThemeAccessor.SearchParameters parameters)
        {
            try
            {
                var cmd = command.ToLower();
                switch (cmd)
                {
                case "getitem":
                    return(GetItem(control, mode, id));

                case "search":
                    return(Search(control, mode, parameters));

                case "setvalue":
                    return(SetValue(control, id));

                case "advsearch":
                    return(AdvSearch(control, mode, parameters));

                case "details":
                case "view":
                    return(Details(control, mode));
                }
                throw new Exception(String.Format("Неизвестная команда: {0}/{2} - {1}", command, control, cmd));
            }
            catch (Exception ex)
            {
                Kesco.Logging.Logger.WriteEx(ex);
                return(JavaScriptAlert(
                           Kesco.Localization.Resources.Ajax_Alert_Title_ApplicationError,
                           ex.Message
                           ));
            }
        }