public Boolean GuardarDB(in_transferencia_x_in_Guia_x_traspaso_bodega_Info InfoGuia, ref string msjError) { try { using (EntitiesInventario Context = new EntitiesInventario()) { var Address = new in_transferencia_x_in_Guia_x_traspaso_bodega(); Address.IdEmpresa = InfoGuia.IdEmpresa; Address.IdSucursalOrgen = InfoGuia.IdSucursalOrgen; Address.IdBodegaOrigen = InfoGuia.IdBodegaOrigen; Address.IdTransferencia = InfoGuia.IdTransferencia; Address.IdEmpresa_Guia = InfoGuia.IdEmpresa_Guia; Address.IdGuia = InfoGuia.IdGuia; Address.Observacion = InfoGuia.Observacion; Context.in_transferencia_x_in_Guia_x_traspaso_bodega.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() + " " + ex.Message; throw new Exception(ex.ToString()); } }
public Boolean GuardarDB(in_transferencia_x_in_Guia_x_traspaso_bodega_Info InfoGuia, ref string msjError) { try { return(Data.GuardarDB(InfoGuia, ref msjError)); } 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("", "GuardarDB", ex.Message), ex) { EntityType = typeof(in_transferencia_x_in_Guia_x_traspaso_bodega_Bus) }; } }