Esempio n. 1
0
 public int UpdateNivelesCertificacion(NivelCertificacion item, string ip)
 {
     try
     {
         _context.NivelCertificacions.Update(item);
         procLog.AddLog(ip, procLog.GetPropertyValues(item, System.Reflection.MethodBase.GetCurrentMethod().Name), "OK", 200);
         return(_context.SaveChanges());
     }
     catch (Exception ex)
     {
         procLog.AddLog(ip, procLog.GetPropertyValues(item, System.Reflection.MethodBase.GetCurrentMethod().Name), ex.InnerException.Message, 400);
         return(0);
     }
 }
Esempio n. 2
0
        public long AddNivelesCertificacion(NivelCertificacion item, string ip)
        {
            try
            {
                var NivelesCertificacionRes = _context.NivelCertificacions.Add(item);
                _context.SaveChanges();

                procLog.AddLog(ip, procLog.GetPropertyValues(item, System.Reflection.MethodBase.GetCurrentMethod().Name), "OK", 200);
                return(Int32.Parse(NivelesCertificacionRes.Entity.IdNivelCertificacion.ToString()));
            }
            catch (Exception ex)
            {
                procLog.AddLog(ip, procLog.GetPropertyValues(item, System.Reflection.MethodBase.GetCurrentMethod().Name), ex.InnerException.Message, 400);
                var r = ex.Message;
                return(0);
            }
        }