コード例 #1
0
ファイル: DataPreguntaPtGeneral.cs プロジェクト: omarin39/BLm
 public int UpdatePregunta(PreguntaPtGeneral item, string ip)
 {
     try
     {
         _context.PreguntaPtGenerals.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);
     }
 }
コード例 #2
0
ファイル: DataPreguntaPtGeneral.cs プロジェクト: omarin39/BLm
 public long AddPregunta(PreguntaPtGeneral item, string ip)
 {
     try
     {
         var PreguntaRes = _context.PreguntaPtGenerals.Add(item);
         _context.SaveChanges();
         procLog.AddLog(ip, procLog.GetPropertyValues(item, System.Reflection.MethodBase.GetCurrentMethod().Name), "OK", 200);
         return(Int32.Parse(PreguntaRes.Entity.IdPreguntaPt.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);
     }
 }