Ejemplo n.º 1
0
 public Boolean GrabarDB(ro_marcaciones_tipo_Info info)
 {
     try
     {
         return(data.GrabarDB(info));
     }
     catch (Exception ex)
     {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GrabarDB", ex.Message), ex)
               {
                   EntityType = typeof(ro_marcaciones_Equipo_x_TipoMarcacion_Bus)
               };
     }
 }
Ejemplo n.º 2
0
 public Boolean GrabarDB(ro_marcaciones_tipo_Info info)
 {
     try
     {
         using (EntitiesRoles Context = new EntitiesRoles())
         {
             ro_marcaciones_tipo address = new ro_marcaciones_tipo();
             address.ma_descripcion    = info.ma_descripcion;
             address.IdTipoMarcaciones = info.IdTipoMarcaciones;
             Context.ro_marcaciones_tipo.Add(address);
             Context.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         string array = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", array, "", "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.InnerException + " " + ex.Message;
         throw new Exception(ex.InnerException.ToString());
     }
 }