Ejemplo n.º 1
0
 public Boolean GrabarDB(ct_rpt_Empresas_A_mostrar_Info info)
 {
     try
     {
         using (EntitiesDBConta context = new EntitiesDBConta())
         {
             var address = new ct_rpt_Empresas_A_mostrar();
             address.IdEmpresa = info.IdEmpresa;
             address.sEmpresas = info.sEmpresas;
             context.ct_rpt_Empresas_A_mostrar.Add(address);
             context.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = 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(), "", arreglo, "",
                                                                                   "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.ToString();
         throw new Exception(ex.ToString());
     }
 }
 public Boolean GrabarDB(ct_rpt_Empresas_A_mostrar_Info info)
 {
     try
     {
         ct_rpt_Empresas_A_mostrar_Data ED = new ct_rpt_Empresas_A_mostrar_Data();
         return(ED.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(ct_rpt_Empresas_A_mostrar_Bus)
               };
     }
 }