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)
                      };
            }
        }