public frmReportePedidosXCliente()
 {
     daoReporte = new ReporteWS.ReporteWSClient();
     InitializeComponent();
     cboTipoCliente.DataSource = tipos;
     cboEstado.DataSource      = estados;
 }
Exemplo n.º 2
0
        public frmGestionarQuejas()
        {
            daoQueja   = new QuejaWS.QuejaWSClient();
            daoReporte = new ReporteWS.ReporteWSClient();
            InitializeComponent();
            dgv = dgvQuejas;

            if (Program.empleado.cargo.idCargo == 1)
            {
                panel1.Visible = false;
            }

            dgvQuejas.AutoGenerateColumns = false;

            if (Program.empleado.cargo.nombre == "VENDEDOR")
            {
                dgvQuejas.Columns["NOMBRE"].Visible           = false;
                dgvQuejas.Columns["APELLIDO_PATERNO"].Visible = false;
                dgvQuejas.Columns["APELLIDO_MATERNO"].Visible = false;
            }

            recargarDGV();

            #region colores de seleccion
            dgvQuejas.ColumnHeadersDefaultCellStyle.SelectionBackColor = Program.colorR;
            dgvQuejas.ColumnHeadersDefaultCellStyle.SelectionForeColor = ThemeColor.ChangeColorBrightness(Program.colorR, -0.7);

            dgvQuejas.RowHeadersDefaultCellStyle.SelectionBackColor = Program.colorR;
            dgvQuejas.RowHeadersDefaultCellStyle.SelectionForeColor = ThemeColor.ChangeColorBrightness(Program.colorR, -0.7);

            dgvQuejas.RowsDefaultCellStyle.SelectionBackColor = Program.colorR;
            dgvQuejas.RowsDefaultCellStyle.SelectionForeColor = ThemeColor.ChangeColorBrightness(Program.colorR, -0.7);
            #endregion
        }
 public frmRepPlanificacion()
 {
     InitializeComponent();
     daoGerencia                = new GerenciaWS.GerenciaWSClient();
     daoReporte                 = new ReporteWS.ReporteWSClient();
     cmbGerencias.DataSource    = daoGerencia.listarGerencias();
     cmbGerencias.ValueMember   = "idGerencia";
     cmbGerencias.DisplayMember = "nombre";
 }
 public frmRecursosEmpleado()
 {
     daoPromocion = new PromocionWS.PromocionWSClient();
     daoReporte   = new ReporteWS.ReporteWSClient();
     InitializeComponent();
     misPromocions = daoPromocion.listarPromocionPorZona("", DateTime.MinValue, DateTime.MaxValue, Program.empleado.zona.idZona);
     if (misPromocions == null)
     {
         pnlPromocion.Visible = false;
     }
 }
Exemplo n.º 5
0
 private void btnReporte_Click(object sender, EventArgs e)
 {
     try
     {
         sfdReporte.ShowDialog();
         ReporteWS.ReporteWSClient daoReporte = new ReporteWS.ReporteWSClient();
         byte[] arreglo = daoReporte.generarReporteTicket(ticket.ticketId);
         File.WriteAllBytes(sfdReporte.FileName + ".pdf", arreglo);
         MessageBox.Show("Se ha guardado con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Ha ocurrido un error", "Mensaje: " + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btnGenerar_Click(object sender, EventArgs e)
 {
     daoReporte = new ReporteWS.ReporteWSClient();
     ReporteWS.colaborador colab = new ReporteWS.colaborador();
     colab.idColaborador     = this.colaborador.idColaborador;
     colab.nombres           = this.colaborador.nombres;
     colab.apellidos         = this.colaborador.apellidos;
     colab.correo            = this.colaborador.correo;
     colab.periodo           = new ReporteWS.periodo();
     colab.periodo.idPeriodo = Global.periodoActual.idPeriodo;
     colab.periodo.nombre    = Global.periodoActual.nombre;
     daoReporte = new ReporteWS.ReporteWSClient();
     daoReporte.enviarReportePDI(colab);
     MessageBox.Show("Se ha enviado el reporte al correo",
                     "Mensaje Informativo", MessageBoxButtons.OK,
                     MessageBoxIcon.Information);
 }
Exemplo n.º 7
0
 public frmEvMisTrabajadores()
 {
     InitializeComponent();
     idPeriodo      = Global.periodoActual.idPeriodo;
     colaboradores  = new BindingList <ColaboradorWS.colaborador>();
     idJefe         = Global.colaboradorLoggeado.idColaborador;
     daoColaborador = new ColaboradorWS.ColaboradorWSClient();
     daoReporte     = new ReporteWS.ReporteWSClient();
     dgvColaboradores.AutoGenerateColumns = false;
     ColaboradorWS.colaborador[] lista
         = daoColaborador.listarColaboradoresXJefe(idJefe);
     if (lista != null)
     {
         colaboradores = new BindingList <ColaboradorWS.colaborador>(lista.ToList());
         dgvColaboradores.DataSource = colaboradores;
     }
 }
Exemplo n.º 8
0
        public ReporteTutor()
        {
            InitializeComponent();
            Design.Ini(this);
            if (Design.tema == 'd')
            {
                ThemeManager.Theme = MaterialSkinManager.Themes.DARK;
            }
            else
            {
                ThemeManager.Theme = MaterialSkinManager.Themes.LIGHT;
            }
            daoReporte   = new ReporteWS.ReporteWSClient();
            this.archivo = daoReporte.reportePreferencias();
            var path = Path.GetTempFileName();

            File.WriteAllBytes(path, this.archivo);
            axAcroPDF1.LoadFile(path);
        }
 private void dgvGuiasDeRemision_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 0)
     {
         if (sfdGuia.ShowDialog() == DialogResult.OK)
         {
             try
             {
                 ReporteWS.ReporteWSClient daoReporte = new ReporteWS.ReporteWSClient();
                 string nombre  = Program.empleado.apellidoPaterno + " " + Program.empleado.apellidoMaterno + ", " + Program.empleado.nombre;
                 byte[] arreglo = daoReporte.generarReportePedidoFinal(nombre, ((GuiaRemisionWS.guiaRemision)dgvGuiasDeRemision.CurrentRow.DataBoundItem).pedido.idPedido);
                 File.WriteAllBytes(sfdGuia.FileName, arreglo);
                 MessageBox.Show("El reporte fue generado con exito", "Mensaje de confirmacion", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             catch (Exception)
             {
                 MessageBox.Show("No se pudo generar el reporte", "Mensaje de error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
Exemplo n.º 10
0
        private void btnGenerar_Click(object sender, EventArgs e)
        {
            try
            {
                ReporteWS.ReporteWSClient daoReporte = new ReporteWS.ReporteWSClient();
                byte[] arreglo;
                switch (tipoSeleccionado)
                {
                case 1:     //Para el nombre de la categoria
                    sfdReporte.ShowDialog();
                    categoria = (CategoriaWS.categoria)dgvLista.CurrentRow.DataBoundItem;
                    ReporteWS.categoria cate = new ReporteWS.categoria();
                    cate.categoriaId = categoria.categoriaId;
                    cate.nombre      = categoria.nombre;
                    cate.descripcion = categoria.descripcion;
                    cate.activo      = categoria.activo;
                    arreglo          = daoReporte.generarReporteTicketCategoria(cate, dtpFechaInicio.Value.Date, dtpFechaFin.Value.Date.AddHours(23).AddMinutes(59));
                    File.WriteAllBytes(sfdReporte.FileName + ".pdf", arreglo);
                    MessageBox.Show("Se ha guardado con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    break;

                case 2:     //Para el nombre de la urgencia
                    sfdReporte.ShowDialog();
                    urgencia = (UrgenciaWS.urgencia)dgvLista.CurrentRow.DataBoundItem;
                    ReporteWS.urgencia urge = new ReporteWS.urgencia();
                    urge.urgenciaId  = urgencia.urgenciaId;
                    urge.nombre      = urgencia.nombre;
                    urge.plazoMaximo = urgencia.plazoMaximo;
                    urge.activo      = urgencia.activo;
                    arreglo          = daoReporte.generarReporteTicketUrgencia(urge, dtpFechaInicio.Value.Date, dtpFechaFin.Value.Date.AddHours(23).AddMinutes(59));
                    File.WriteAllBytes(sfdReporte.FileName + ".pdf", arreglo);
                    MessageBox.Show("Se ha guardado con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    break;

                case 3:     //Para el nombre de la agente
                    sfdReporte.ShowDialog();
                    agente = (AgenteWS.agente)dgvLista.CurrentRow.DataBoundItem;
                    ReporteWS.agente age = new ReporteWS.agente();
                    age.agenteId        = agente.agenteId;
                    age.nombre          = agente.nombre;
                    age.apellidoPaterno = agente.apellidoPaterno;
                    age.apellidoMaterno = agente.apellidoMaterno;
                    age.codigo          = agente.codigo;
                    age.activo          = agente.activo;
                    arreglo             = daoReporte.generarReporteTicketAgente(age, dtpFechaInicio.Value.Date, dtpFechaFin.Value.Date.AddHours(23).AddMinutes(59));
                    File.WriteAllBytes(sfdReporte.FileName + ".pdf", arreglo);
                    MessageBox.Show("Se ha guardado con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    break;

                case 4:     //Para el nombre de la equipo
                    sfdReporte.ShowDialog();
                    equipo = (EquipoWS.equipo)dgvLista.CurrentRow.DataBoundItem;
                    ReporteWS.equipo equi = new ReporteWS.equipo();
                    equi.equipoId    = equipo.equipoId;
                    equi.nombre      = equipo.nombre;
                    equi.descripcion = equipo.descripcion;
                    arreglo          = daoReporte.generarReporteTicketEquipo(equi, dtpFechaInicio.Value.Date, dtpFechaFin.Value.Date.AddHours(23).AddMinutes(59));
                    File.WriteAllBytes(sfdReporte.FileName + ".pdf", arreglo);
                    MessageBox.Show("Se ha guardado con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ha ocurrido un error", "Mensaje: " + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 public frmReporteMejoresEmpleados()
 {
     InitializeComponent();
     daoReporte = new ReporteWS.ReporteWSClient();
 }
Exemplo n.º 12
0
 public frmReporteQuejas()
 {
     InitializeComponent();
     daoReporte = new ReporteWS.ReporteWSClient();
 }