Exemple #1
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         FrmRegistrarOrden P = new FrmRegistrarOrden();
         P.txtOrden.Text         = dataGridView1.CurrentRow.Cells[0].Value + "";
         P.txtTitulo.Text        = dataGridView1.CurrentRow.Cells[1].Value + "";
         P.txtIdResp.Text        = dataGridView1.CurrentRow.Cells[2].Value + "";
         P.txtNomResp.Text       = dataGridView1.CurrentRow.Cells[9].Value + " " + dataGridView1.CurrentRow.Cells[10].Value;
         P.txtNomCli.Text        = dataGridView1.CurrentRow.Cells[11].Value + " " + dataGridView1.CurrentRow.Cells[12].Value;
         P.txtDetalle.Text       = dataGridView1.CurrentRow.Cells[4].Value + "";
         P.cbEstado.SelectedItem = dataGridView1.CurrentRow.Cells[8].Value;
         P.txtDocC.Text          = dataGridView1.CurrentRow.Cells[3].Value + "";
         if (dataGridView1.SelectedRows.Count > 0)
         {
             Program.Evento = 1;
         }
         else
         {
             Program.Evento = 0;
         }
         P.ShowDialog();
         dataGridView1.ClearSelection();
     }
     else
     {
         DevComponents.DotNetBar.MessageBoxEx.Show("Debe Seleccionar la Fila a Editar.", "Sistema de Ventas.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Exemple #2
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            FrmRegistrarOrden f = new FrmRegistrarOrden();

            Program.Evento = 0;
            f.ShowDialog();
            dataGridView1.ClearSelection();
        }