예제 #1
0
        public JsonResult GetOne(string id)
        {
            Config           obj    = new Config();
            ConfigRepository SucRep = new ConfigRepository();

            try
            {
                if (id != "")
                {
                    obj = SucRep.GetItem(id);
                }
                else
                {
                    obj.Accion  = 0;
                    obj.Mensaje = "El parametro tiene un valor incorrecto!";
                }
            }
            catch (Exception ex)
            {
                obj.Accion  = 0;
                obj.Mensaje = ex.Message.ToString();
            }
            return(Json(obj, JsonRequestBehavior.AllowGet));
        }