Ejemplo n.º 1
0
        private void XBAN_Rpt004_rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            try
            {
                xrPictureBox1.Image = param.InfoEmpresa.em_logo_Image;
                lbl_fecha.Text      = DateTime.Now.ToString();
                lbl_usuario.Text    = param.IdUsuario;
                lblEmpresa.Text     = param.NombreEmpresa;
                XBAN_Rpt004_Bus repbus = new XBAN_Rpt004_Bus();


                List <XBAN_Rpt004_Info> ListDataRpt = new List <XBAN_Rpt004_Info>();

                int IdEmpresa = 0;

                int IdBancoIni = 0;
                int IdBancoFin = 0;

                string   idTipoCbte = "";
                DateTime Fch_Ini    = DateTime.Now;
                DateTime Fch_Fin    = DateTime.Now;



                IdEmpresa  = Convert.ToInt32(Parameters["IdEmpresa"].Value);
                IdBancoIni = Convert.ToInt32(Parameters["IdBanco"].Value);
                IdBancoFin = Convert.ToInt32(Parameters["IdBancoFin"].Value);

                idTipoCbte = Convert.ToString(Parameters["CodTipoCbteBan"].Value);

                Fch_Ini = Convert.ToDateTime(Parameters["Fch_Ini"].Value);
                Fch_Fin = Convert.ToDateTime(Parameters["Fch_Fin"].Value);

                ListDataRpt = repbus.Cargar_data(IdEmpresa, Fch_Ini, Fch_Fin, IdBancoIni, IdBancoFin, idTipoCbte);

                this.DataSource = ListDataRpt.ToArray();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                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("", "XBAN_Rpt004_rpt_BeforePrint", ex.Message), ex)
                      {
                          EntityType = typeof(XBAN_Rpt004_rpt)
                      };
            }
        }
Ejemplo n.º 2
0
        private void XBAN_Rpt004_rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            try
            {
                pictureBox1.Image = param.InfoEmpresa.em_logo_Image;

                XBAN_Rpt004_Bus repbus = new XBAN_Rpt004_Bus();


                List <XBAN_Rpt004_Info> ListDataRpt = new List <XBAN_Rpt004_Info>();

                int IdEmpresa = 0;

                int IdBancoIni = 0;
                int IdBancoFin = 0;

                string   idTipoCbte = "";
                string   girado_A   = "";
                bool     chkImpreso;
                bool     chkfacs;
                string   SchkImpreso = "";
                string   Schkfacs    = "CBTE_PAGO";
                DateTime Fch_Ini     = DateTime.Now;
                DateTime Fch_Fin     = DateTime.Now;

                decimal IdPersona_Girado = 0;


                IdEmpresa  = Convert.ToInt32(Parameters["IdEmpresa"].Value);
                IdBancoIni = Convert.ToInt32(Parameters["IdBanco"].Value);
                IdBancoFin = Convert.ToInt32(Parameters["IdBancoFin"].Value);

                IdPersona_Girado = Convert.ToDecimal(Parameters["IdPersona_Girado"].Value);

                idTipoCbte = Convert.ToString(Parameters["CodTipoCbteBan"].Value);

                Fch_Ini = Convert.ToDateTime(Parameters["Fch_Ini"].Value);
                Fch_Fin = Convert.ToDateTime(Parameters["Fch_Fin"].Value);

                girado_A   = Convert.ToString(Parameters["S_Chq_Girado_A"].Value);
                chkImpreso = Convert.ToBoolean(Parameters["Es_ChqImpreso"].Value);
                chkfacs    = Convert.ToBoolean(Parameters["Detallado"].Value);

                if (girado_A == "TODOS")
                {
                    girado_A = "";
                }

                lblchkImpreso.Text = "Todos";
                if (chkImpreso == true)
                {
                    SchkImpreso        = "Impreso";
                    lblchkImpreso.Text = "Solo Impresos";
                }

                lblchkDetalle.Text    = "";
                lblchkDetalle.Visible = false;
                if (chkfacs == true)
                {
                    Schkfacs              = "";
                    lblchkDetalle.Text    = "Detallado";
                    lblchkDetalle.Visible = true;

                    xrLabel39.Visible = false;
                    xrLabel40.Visible = false;
                    xrLabel41.Visible = false;
                }
                else
                {
                    xrLabel13.Visible = false;
                    xrLabel14.Visible = false;
                    xrLabel42.Visible = false;
                    xrLabel43.Visible = false;
                    xrLabel44.Visible = false;
                    xrLabel12.Visible = false;
                }

                ListDataRpt = repbus.Cargar_data(IdEmpresa, Fch_Ini, Fch_Fin, IdBancoIni, IdBancoFin, idTipoCbte, /*girado_A*/ IdPersona_Girado, SchkImpreso, Schkfacs);

                if (ListDataRpt.Count == 0)
                {
                    xrLmensaje.Visible = true;
                    xrLmensaje.Text    = "No hay datos encontrados para estos filtros";
                }
                else
                {
                    xrLmensaje.Visible = false;
                }

                this.DataSource = ListDataRpt.ToArray();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                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("", "XBAN_Rpt004_rpt_BeforePrint", ex.Message), ex)
                      {
                          EntityType = typeof(XBAN_Rpt004_rpt)
                      };
            }
        }