Example #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(this.IpLocal))
     {
         this.IpLocal = DireccionIP.Local();
     }
     if (string.IsNullOrEmpty(this.IpPublica))
     {
         this.IpPublica = DireccionIP.Publica();
     }
     if (string.IsNullOrEmpty(this.SerialHDD))
     {
         this.SerialHDD = DireccionIP.SerialNumberDisk();
     }
     if (string.IsNullOrEmpty(this.Usuario))
     {
         this.Usuario = DireccionIP.SerialNumberDisk();
     }
     if (!string.IsNullOrEmpty(this.ValorPeriodo))
     {
         Frm_Reporte_Liquidacion frm_Reporte_Liquidacion = new Frm_Reporte_Liquidacion();
         LlenarLog.Registro(DateTime.Now, this.Usuario, this.IpLocal, this.IpPublica, this.SerialHDD, Environment.MachineName, "Impresión reporte Onzas Entergadas", "Impresión Reporte");
         object[] argument = new object[]
         {
             5,
             this.ValorPeriodo
         };
         frm_Reporte_Liquidacion.EjecucionReportes(argument);
         frm_Reporte_Liquidacion.Show();
     }
     else
     {
         MessageBox.Show("Seleccione un periodo a imprimir");
     }
 }
Example #2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(ValorPeriodo))
            {
                Frm_Reporte_Liquidacion frmReporte = new Frm_Reporte_Liquidacion();
                LlenarLog.Registro(DateTime.Now, this.Usuario, this.IpLocal, this.IpPublica, this.SerialHDD, Environment.MachineName, "Impresión reporte Onzas Recuperados", "Impresión Reporte");

                object[] argument = new object[] { 6, Ano, Mes, Periodo };
                frmReporte.EjecucionReportes(argument);
                frmReporte.Show();
            }
            else
            {
                MessageBox.Show("Seleccione un periodo a imprimir");
            }
        }
        private void BtnImprimir_Click(object sender, EventArgs e)
        {
            Frm_Reporte_Liquidacion frmReporte = null;

            object[] argument   = null;
            string   nameReport = string.Empty;

            frmReporte = new Frm_Reporte_Liquidacion();
            if (cboCargaUsuario.Text == "TODOS")
            {
                argument = new object[] { 7, "TODOS" }
            }
            ;
            else
            {
                argument = new object[] { 7, cboCargaUsuario.Text }
            };



            frmReporte.EjecucionReportes(argument);
            frmReporte.Show();
        }
Example #4
0
        private void BtnImprimir_Click(object sender, EventArgs e)
        {
            Frm_Reporte_Liquidacion frmReporte = null;

            object[] argument   = null;
            string   nameReport = string.Empty;

            //comboBox1
            switch (comboBox1.SelectedIndex)
            {
            case 0:
                if (dtpEventInitial.Value > dtpEventEnd.Value)
                {
                    MessageBox.Show("La fecha inicial no debe de ser superior a la final");
                    return;
                }
                else
                if (dtpEventEnd.Value < dtpEventInitial.Value)
                {
                    MessageBox.Show("La fecha final no debe de ser inferior a la inicial");
                    return;
                }
                string mina = string.Empty;

                if (!comboMina.SelectedIndex.Equals(comboMina.Items.Count - 1))
                {
                    mina = comboMina.Text.Trim();
                }

                nameReport = "Detalle Mina Día";


                frmReporte = new Frm_Reporte_Liquidacion();
                argument   = new object[] { 1, dtpEventInitial.Value, dtpEventEnd.Value, checkBox1.Checked, mina };

                frmReporte.EjecucionReportes(argument);
                frmReporte.Show();
                break;

            case 1:
                if (dtpEventInitial.Value == null)
                {
                    MessageBox.Show("La fecha inicial no puede ser  Nula");
                    return;
                }
                nameReport = "Resumen Mina Día";
                mina       = string.Empty;

                if (!comboMina.SelectedIndex.Equals(comboMina.Items.Count - 1))
                {
                    mina = comboMina.Text.Trim();
                }

                frmReporte = new Frm_Reporte_Liquidacion();
                argument   = new object[] { 2, dtpEventInitial.Value, dtpEventEnd.Value, checkBox1.Checked, mina };

                frmReporte.EjecucionReportes(argument);
                frmReporte.Show();
                break;

            case 2:
                if (dtpEventInitial.Value == null)
                {
                    MessageBox.Show("La fecha inicial no puede ser  Nula");
                    return;
                }
                nameReport = "Detalle Muestreo";

                mina = string.Empty;

                if (!comboMina.SelectedIndex.Equals(comboMina.Items.Count - 1))
                {
                    mina = comboMina.Text.Trim();
                }

                frmReporte = new Frm_Reporte_Liquidacion();
                argument   = new object[] { 3, dtpEventInitial.Value, dtpEventEnd.Value, checkBox1.Checked, mina };

                frmReporte.EjecucionReportes(argument);
                frmReporte.Show();
                break;

            case -1:
                MessageBox.Show("Selcciona el Reporte a generar");
                break;

            default:
                break;
            }

            if (string.IsNullOrEmpty(this.IpLocal))
            {
                this.IpLocal = DireccionIP.Local();
            }

            if (string.IsNullOrEmpty(this.IpPublica))
            {
                this.IpPublica = DireccionIP.Publica();
            }

            if (string.IsNullOrEmpty(this.SerialHDD))
            {
                this.SerialHDD = DireccionIP.SerialNumberDisk();
            }

            if (string.IsNullOrEmpty(this.Usuario))
            {
                this.Usuario = DireccionIP.SerialNumberDisk();
            }

            LlenarLog.Registro(DateTime.Now, this.Usuario, this.IpLocal, this.IpPublica, this.SerialHDD, Environment.MachineName, "Se genera el reporte de " + nameReport, "Generación de Reportes");
        }