Exemple #1
0
        public JsonResult guardar12(int CodigoRegimen, string NombreRegimen, string PideCURP, string Activo)
        {
            MARPAC_PruebaEntities corp = new MARPAC_PruebaEntities();
            Dictionary<string, object> elemento = new Dictionary<string, object>();
            elemento = new Dictionary<string, object>();
            Dictionary<string, object> data = new Dictionary<string, object>();
            RegimenesFiscale regimen = corp.RegimenesFiscales.SingleOrDefault(a => a.CodigoRegimen == CodigoRegimen);
            regimen.CodigoRegimen = CodigoRegimen;
            regimen.NombreRegimen = NombreRegimen;
            regimen.PideCURP = PideCURP;
            regimen.Activo = Activo;
            corp.SaveChanges();

            elemento["success"] = true;
            return this.Json(elemento);
        }
Exemple #2
0
        public JsonResult guardar(string datos)
        {
            MARPAC_PruebaEntities corp = new MARPAC_PruebaEntities();

            var jsSerializer = new JavaScriptSerializer();
            RegimenesFiscale myPerson = jsSerializer.Deserialize<RegimenesFiscale>(datos);

            Dictionary<string, object> elemento = new Dictionary<string, object>();
            elemento = new Dictionary<string, object>();
            RegimenesFiscale regimen = corp.RegimenesFiscales.SingleOrDefault(a => a.CodigoRegimen == myPerson.CodigoRegimen);
            regimen.CodigoRegimen = myPerson.CodigoRegimen;
            regimen.NombreRegimen = myPerson.NombreRegimen;
            regimen.PideCURP = myPerson.PideCURP;
            regimen.Activo = myPerson.Activo;
            corp.SaveChanges();

            elemento["success"] = true;
            return this.Json(elemento);
        }