public Boolean GrabarListadoMovCaja_x_Deposito(List <caj_Caja_Movimiento_Info> Lst, int IdtipoCbteCble_Bco, decimal IdCbteCble_Bco) { try { using (EntitiesBanco Context = new EntitiesBanco()) { foreach (var item in Lst) { ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito Address = new ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito(); Address.mcj_IdEmpresa = item.IdEmpresa; Address.mcj_IdCbteCble = item.IdCbteCble; Address.mcj_IdTipocbte = item.IdTipocbte; Address.mba_IdEmpresa = item.IdEmpresa; Address.mba_IdCbteCble = IdCbteCble_Bco; Address.mba_IdTipocbte = IdtipoCbteCble_Bco; Address.mcj_Secuencia = item.secuencial; Context.ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito.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.InnerException + " " + ex.Message; throw new Exception(ex.InnerException.ToString()); } }
public Boolean GrabarDB(ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito_Info Info) { try { List <ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito_Info> Lst = new List <ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito_Info>(); using (EntitiesBanco Context = new EntitiesBanco()) { var Address = new ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito(); Address.mcj_IdEmpresa = Info.mcj_IdEmpresa; Address.mcj_IdCbteCble = Info.mcj_IdCbteCble; Address.mcj_IdTipocbte = Info.mcj_IdTipocbte; Address.mcj_Secuencia = Info.mcj_Secuencia; Address.mba_IdEmpresa = Info.mba_IdEmpresa; Address.mba_IdCbteCble = Info.mba_IdCbteCble; Address.mba_IdTipocbte = Info.mba_IdTipocbte; Address.Observacion = (Info.Observacion == null) ? "" : Info.Observacion; //Address.ba_Cbte_Ban=Info. Context.ba_Caja_Movimiento_x_Cbte_Ban_x_Deposito.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.InnerException + " " + ex.Message; throw new Exception(ex.InnerException.ToString()); } }