public Boolean GuardarDetallePrestamosCancelados(ba_prestamo_detalle_Info info, ref string msg)
        {
            try
            {
                Boolean res = true;

                //grabar diario de la nota de debito
                ct_Cbtecble_Bus CbteCble_B = new ct_Cbtecble_Bus();

                decimal idCbteCble   = 0;
                string  cod_CbteCble = "";

                ct_Cbtecble_Info CbteCble = info.Info_CbteCble;

                if (CbteCble_B.GrabarDB(CbteCble, ref idCbteCble, ref msg))
                {
                    // grabar en tabla ba_Cbte_Ban
                    ba_Cbte_Ban_Info CbteBan = info.Info_CbteBan;
                    CbteBan.IdCbteCble = idCbteCble;

                    ba_Cbte_Ban_Bus CbteBan_B = new ba_Cbte_Ban_Bus();
                    if (CbteBan_B.GrabarDB(CbteBan, ref msg))
                    {
                        if (oData.GuardarDetallePrestamosCancelados(info, ref msg))
                        {
                            ba_prestamo_detalle_Data odata = new ba_prestamo_detalle_Data();
                            if (!odata.CancelarEstadoDetallePrestamo(info, ref msg))
                            {
                                res = false;
                            }
                        }
                        else
                        {
                            res = false;
                        }
                    }
                    else
                    {
                        res = false;
                    }
                }
                else
                {
                    res = false;
                }
                return(res);
            }
            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("", "GuardarDetallePrestamosCancelados", ex.Message), ex)
                      {
                          EntityType = typeof(ba_prestamo_detalle_cancelacion_Bus)
                      };
            }
        }
Ejemplo n.º 2
0
        public bool GrabarDB(ba_Archivo_Transferencia_Info info, ref int Idarchivo)
        {
            try
            {
                bool res = false;

                if (info.Lst_Archivo_Transferencia_Det.Count() == 0)
                {
                    return(false);
                }

                if (oData.GrabarDB(info, ref Idarchivo))
                {
                    foreach (var item in info.Lst_Archivo_Transferencia_Det)
                    {
                        item.IdArchivo            = info.IdArchivo;
                        item.IdEstadoRegistro_cat = "REG_EMITI";
                        item.IdProceso_bancario   = info.IdProceso_bancario;
                    }
                    res = oData_det.GrabarDB(info.Lst_Archivo_Transferencia_Det);

                    if (res == true)
                    {
                        ba_Cbte_Ban_Bus         BusCbteBan  = new ba_Cbte_Ban_Bus();
                        List <ba_Cbte_Ban_Info> listCbteBan = new List <ba_Cbte_Ban_Info>();

                        foreach (var item in info.Lst_Archivo_Transferencia_Det)
                        {
                            ba_Cbte_Ban_Info InfoCbteBan = new ba_Cbte_Ban_Info();
                            InfoCbteBan.IdEmpresa  = Convert.ToInt32(item.IdEmpresa_mvba);
                            InfoCbteBan.IdTipocbte = Convert.ToInt32(item.IdTipocbte_mvba);
                            InfoCbteBan.IdCbteCble = Convert.ToDecimal(item.IdCbteCble_mvba);

                            listCbteBan.Add(InfoCbteBan);
                        }

                        BusCbteBan.Modificar_Estado_Preaviso_ch(listCbteBan, eEstado_Preaviso_Cheque.ES_CH_PREAVISO_CH, ref mensaje_error);
                    }
                }
                return(res);
            }
            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("", "Get_List_Archivo_transferencia", ex.Message), ex)
                      {
                          EntityType = typeof(ba_Archivo_Transferencia_Bus)
                      };
            }
        }
        public Boolean GuardarDetallePrestamosCancelados(List <ba_prestamo_detalle_Info> Listado, ref string msg)
        {
            try
            {
                //grabar diario de la nota de debito
                ct_Cbtecble_Bus CbteCble_B = new ct_Cbtecble_Bus();

                foreach (var item in Listado)
                {
                    decimal idCbteCble = 0;

                    ct_Cbtecble_Info CbteCble = item.Lista_CbteCble.FirstOrDefault();

                    if (CbteCble_B.GrabarDB(CbteCble, ref idCbteCble, ref msg))
                    {
                        // grabar en tabla ba_Cbte_Ban
                        ba_Cbte_Ban_Info CbteBan = item.Lista_CbteBan.FirstOrDefault();
                        CbteBan.IdCbteCble = idCbteCble;

                        ba_Cbte_Ban_Bus CbteBan_B = new ba_Cbte_Ban_Bus();
                        if (CbteBan_B.GrabarDB(CbteBan, ref msg))
                        {
                            if (oData.GuardarDetallePrestamosCancelados(item, ref msg))
                            {
                            }
                        }
                    }
                }

                return(true);

                // return oData.GuardarDetallePrestamosCancelados(Listado, ref msg);
            }
            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("", "GuardarDetallePrestamosCancelados", ex.Message), ex)
                      {
                          EntityType = typeof(ba_prestamo_detalle_cancelacion_Bus)
                      };
            }
        }
Ejemplo n.º 4
0
        public Boolean ModificarDB(ba_Conciliacion_Info info)
        {
            try
            {
                string msg = "";

                Boolean RES = false;

                RES = data.ModificarDB(info);
                if (RES == true)
                {
                    if (info.Estado_Conciliacion == "CONCILIADO")
                    {
                        foreach (var item in info.LstConciliadas)
                        {
                            ba_Cbte_Ban_Bus  BusCbteBan  = new ba_Cbte_Ban_Bus();
                            ba_Cbte_Ban_Info InfoCbteBan = new ba_Cbte_Ban_Info();
                            InfoCbteBan.IdEmpresa  = item.IdEmpresa;
                            InfoCbteBan.IdTipocbte = item.IdTipocbte;
                            InfoCbteBan.IdCbteCble = item.IdCbteCble;

                            BusCbteBan.Modificar_estado_Cheq(InfoCbteBan, eEstado_Cheque.ESTCBCOB, ref msg);
                        }
                    }
                }


                return(RES);
            }
            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("", "ModificarDB", ex.Message), ex)
                      {
                          EntityType = typeof(ba_Conciliacion_Bus)
                      };
            }
        }