private void btn_imprimir_Click(object sender, EventArgs e)
 {
     try
     {
         var miForma = new Reportes.Frm_reportes();
         miForma.ccencos = txtccosto.Text.Trim();
         miForma.ccargo = txtdcargo.Text.Trim();
         miForma.formulario = "Frm_Contrato";
         miForma.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void btn_imprimir_Click(object sender, EventArgs e)
        {
            try
            {
                if (Tablasubgrupo.Rows.Count > 0)
                {
                    var miForma = new Reportes.Frm_reportes();

                    miForma.dominioid = dominioiddes.Trim();
                    miForma.moduloid = moduloiddes.SelectedValue.ToString().Trim();
                    miForma.local = local.Trim();

                    miForma.Text = "Reporte de subgrupos";
                    miForma.formulario = "Frm_subgrupo";
                    miForma.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btn_imprimir_Click(object sender, EventArgs e)
        {
            try
            {
                if (Tabladetalleocompra.Rows.Count > 0)
                {
                    String xproductid, xcantidad;
                    xproductid = Convert.ToString(griddetalleocompra.CurrentRow.Cells["productid"].Value);
                    xcantidad = Convert.ToString(griddetalleocompra.CurrentRow.Cells["cantidad"].Value);
                    if (xproductid != string.Empty)
                    {
                        if (xcantidad != "0" && xcantidad != string.Empty)
                        {
                            var miForma = new Reportes.Frm_reportes();
                            miForma.Text = "Reporte Orden de Compra";
                            miForma.formulario = "Frm_requerimiento";
                            miForma.Table = Tabladetalleocompra;
                            miForma.moduloid = modulo.ToString();
                            miForma.Show();
                        }
                        else
                        {
                            MessageBox.Show("Ingrese Cantidad", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            griddetalleocompra.CurrentCell = griddetalleocompra.Rows[griddetalleocompra.RowCount - 1].Cells["cantidad"];
                            griddetalleocompra.BeginEdit(true);
                        }
                    }
                    else
                    {
                        MessageBox.Show("Ingrese Producto", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                else
                {
                    MessageBox.Show("Ingrese Producto", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btn_imprimir_Click(object sender, EventArgs e)
        {
            try
            {
                if (TablaUnidMed.Rows.Count > 0)
                {
                    var miForma = new Reportes.Frm_reportes();

                    miForma.dominioid = dominio.Trim();
                    miForma.moduloid = modulo.Trim();
                    miForma.local = local.Trim();

                    miForma.Text = "Reporte de colors";
                    miForma.formulario = "Frm_color";
                    miForma.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private void btn_imprimir_Click(object sender, EventArgs e)
 {
     try
     {
         if (Tablaestructura.Rows.Count > 0)
         {
             var miForma = new Reportes.Frm_reportes();
             miForma.Text = "Reporte de estructuras";
             miForma.formulario = "Frm_estructura";
             miForma.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }