예제 #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult result = MessageBox.Show("¿Desea imprimir ahorita la hoja de corte?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             GUI.REPORTES.HojaCorte1 hojacorte1gui = new GrupoSM_Recepcion.GUI.REPORTES.HojaCorte1();
             hojacorte1gui.idproduccion = this.idproduccion;
             GUI.REPORTES.HojaCorte2 hojacorte2gui = new GrupoSM_Recepcion.GUI.REPORTES.HojaCorte2();
             hojacorte2gui.idficha      = this.idficha;
             hojacorte2gui.idproduccion = this.idproduccion;
             GUI.REPORTES.SeparadoTrabajoImpresion trabajoseparado = new REPORTES.SeparadoTrabajoImpresion();
             trabajoseparado.orden = int.Parse(textBox1.Text);
             hojacorte1gui.Show();
             hojacorte2gui.Show();
             trabajoseparado.Show();
             this.Hide();
             this.Close();
         }
     }
     catch
     {
     }
 }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            DAO.Oden_ProduccionDAO ordendao = new GrupoSM_Recepcion.DAO.Oden_ProduccionDAO();
            ordendao.fecha_trazado_inicio = dateTimePicker1.Value;
            ordendao.idorden       = int.Parse(textBox1.Text);
            ordendao.Pellon        = textBox4.Text;
            ordendao.Marca         = textBox6.Text;
            ordendao.Composicion   = textBox7.Text;
            ordendao.Modelo        = textBox8.Text;
            ordendao.observaciones = richTextBox1.Text;
            ordendao.actualizaobservacion();
            ordendao.insertapellones();
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                foreach (DataGridViewRow row1 in dataGridView3.Rows)
                {
                    DAO.PiezasDAO piezasdao = new DAO.PiezasDAO();
                    piezasdao.nombre           = row1.Cells["nombre"].Value.ToString();
                    piezasdao.talla            = row1.Cells["talla"].Value.ToString();
                    piezasdao.color            = row1.Cells["color"].Value.ToString();
                    piezasdao.cantidadseparado = Convert.ToInt16(row.Cells["cantidad_prendas"].Value) * Convert.ToInt16(row1.Cells["cantidad"].Value);
                    piezasdao.orden            = int.Parse(textBox1.Text);
                    piezasdao.insertatrabajoseparadohojacorte();
                }
            }
            string resultado = (ordendao.actualizatrazoproduccion());

            if (resultado != "Correcto")
            {
                MessageBox.Show(resultado);
            }
            else
            {
                DialogResult result = MessageBox.Show("¿Desea imprimir la hoja de corte?", "Mensaje", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result == DialogResult.Yes)
                {
                    GUI.REPORTES.HojaCorte1 hojacorte1gui = new GrupoSM_Recepcion.GUI.REPORTES.HojaCorte1();
                    hojacorte1gui.idproduccion = this.idproduccion;
                    GUI.REPORTES.HojaCorte2 hojacorte2gui = new GrupoSM_Recepcion.GUI.REPORTES.HojaCorte2();
                    hojacorte2gui.idficha      = this.idficha;
                    hojacorte2gui.idproduccion = this.idproduccion;
                    GUI.REPORTES.SeparadoTrabajoImpresion trabajoseparado = new REPORTES.SeparadoTrabajoImpresion();
                    trabajoseparado.orden = int.Parse(textBox1.Text);
                    hojacorte1gui.Show();
                    hojacorte2gui.Show();
                    trabajoseparado.Show();
                    this.Hide();
                    this.Close();
                }
            }
        }
예제 #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     GUI.REPORTES.SeparadoTrabajoImpresion separadotrabajo = new REPORTES.SeparadoTrabajoImpresion();
     separadotrabajo.orden = Convert.ToInt32(dataGridView1.CurrentRow.Cells["Produccion"].Value);;
     separadotrabajo.Show();
 }