Пример #1
0
 public Boolean GuardarCbr_x_Cbte_Reverso(cxc_cobro_x_ct_cbtecble_Info info)
 {
     try
     {
         using (EntitiesCuentas_x_Cobrar context = new EntitiesCuentas_x_Cobrar())
         {
             var addressG = new cxc_cobro_x_ct_cbtecble_x_Anulado();
             addressG.cbr_IdEmpresa  = info.cbr_IdEmpresa;
             addressG.cbr_IdSucursal = info.cbr_IdSucursal;
             addressG.cbr_IdCobro    = info.cbr_IdCobro;
             addressG.ct_IdEmpresa   = info.ct_IdEmpresa;
             addressG.ct_IdTipoCbte  = info.ct_IdTipoCbte;
             addressG.ct_IdCbteCble  = info.ct_IdCbteCble;
             context.cxc_cobro_x_ct_cbtecble_x_Anulado.Add(addressG);
             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());
     }
 }
Пример #2
0
        public cxc_cobro_x_ct_cbtecble_Info Get_Info_cobro_x_ct_cbtecble(int IdEmpresa, int IdSucuersal, decimal IdCobro)
        {
            try
            {
                cxc_cobro_x_ct_cbtecble_Info Info = new cxc_cobro_x_ct_cbtecble_Info();
                EntitiesCuentas_x_Cobrar     fac  = new EntitiesCuentas_x_Cobrar();
                var select = from q in fac.cxc_cobro_x_ct_cbtecble
                             where q.cbr_IdEmpresa == IdEmpresa &&
                             q.cbr_IdSucursal == IdSucuersal &&
                             q.cbr_IdCobro == IdCobro
                             select q;

                foreach (var item in select)
                {
                    Info.cbr_IdCobro    = item.cbr_IdCobro;
                    Info.cbr_IdEmpresa  = item.cbr_IdEmpresa;
                    Info.cbr_IdSucursal = item.cbr_IdSucursal;
                    Info.ct_IdCbteCble  = item.ct_IdCbteCble;
                    Info.ct_IdEmpresa   = item.ct_IdEmpresa;
                    Info.ct_IdTipoCbte  = item.ct_IdTipoCbte;
                }
                return(Info);
            }
            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());
            }
        }
Пример #3
0
        void CargarReporte_diarios()
        {
            try
            {
                cxc_cobro_x_ct_cbtecble_Bus bus_cbte_x_cobro = new cxc_cobro_x_ct_cbtecble_Bus();
                foreach (var item in ListaGrabar)
                {
                    cxc_cobro_x_ct_cbtecble_Info info_cbte_x_cobro = new cxc_cobro_x_ct_cbtecble_Info();
                    info_cbte_x_cobro = bus_cbte_x_cobro.Get_Info_cobro_x_ct_cbtecble(item.IdEmpresa, item.IdSucursal, item.IdCobro);
                    if (info_cbte_x_cobro != null)
                    {
                        switch (param.IdCliente_Ven_x_Default)
                        {
                        case Cl_Enumeradores.eCliente_Vzen.NATURISA:
                            XCONTA_NATU_Rpt002_Rpt reporte_personalizado = new XCONTA_NATU_Rpt002_Rpt();

                            reporte_personalizado.PIdEmpresa.Value    = param.IdEmpresa;
                            reporte_personalizado.PIdTipoCbte.Value   = info_cbte_x_cobro.ct_IdTipoCbte;
                            reporte_personalizado.PIdCbteCble.Value   = info_cbte_x_cobro.ct_IdCbteCble;
                            reporte_personalizado.RequestParameters   = false;
                            reporte_personalizado.PIdEmpresa.Visible  = false;
                            reporte_personalizado.PIdTipoCbte.Visible = false;
                            reporte_personalizado.PIdCbteCble.Visible = false;
                            reporte_personalizado.ShowPreviewDialog();
                            break;

                        default:
                            XCONTA_Rpt003_rpt reporte = new XCONTA_Rpt003_rpt();

                            reporte.set_parametros(param.IdEmpresa, info_cbte_x_cobro.ct_IdTipoCbte, info_cbte_x_cobro.ct_IdCbteCble);
                            reporte.RequestParameters = false;
                            reporte.ShowPreviewDialog();
                            break;
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }