コード例 #1
0
 private void DataListado_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (TxtFlag == 0.ToString())
     {
         FCuentasIE mForm = FCuentasIE.GetForm();
         string     cod_cuentasie, desc_cuentasie, campo1, campo2, campo3, campo4, campo5, campo6;
         cod_cuentasie  = Convert.ToString(DataListado.CurrentRow.Cells["cod_cuentasie"].Value);
         desc_cuentasie = Convert.ToString(DataListado.CurrentRow.Cells["desc_cuentasie"].Value);
         campo1         = Convert.ToString(DataListado.CurrentRow.Cells["campo1"].Value);
         campo2         = Convert.ToString(DataListado.CurrentRow.Cells["campo2"].Value);
         campo3         = Convert.ToString(DataListado.CurrentRow.Cells["campo3"].Value);
         campo4         = Convert.ToString(DataListado.CurrentRow.Cells["campo4"].Value);
         campo5         = Convert.ToString(DataListado.CurrentRow.Cells["campo5"].Value);
         campo6         = Convert.ToString(DataListado.CurrentRow.Cells["campo6"].Value);
         mForm.SetCuentasIE(cod_cuentasie, desc_cuentasie, campo1, campo2, campo3, campo4, campo5, campo6);
         mForm.TxtEditar.Text = "Listar";
     }
     if (TxtFlag == "MovBanco")
     {
         FMovBanco mForm = FMovBanco.GetForm();
         string    cod_cuentasie, desc_cuentasie;
         cod_cuentasie  = Convert.ToString(DataListado.CurrentRow.Cells["cod_cuentasie"].Value);
         desc_cuentasie = Convert.ToString(DataListado.CurrentRow.Cells["desc_cuentasie"].Value);
         mForm.SetCuentasIE(cod_cuentasie, desc_cuentasie);
     }
     if (TxtFlag == "MovCaja")
     {
         FMovCaja mForm = FMovCaja.GetForm();
         string   cod_cuentasie, desc_cuentasie;
         cod_cuentasie  = Convert.ToString(DataListado.CurrentRow.Cells["cod_cuentasie"].Value);
         desc_cuentasie = Convert.ToString(DataListado.CurrentRow.Cells["desc_cuentasie"].Value);
         mForm.SetCuentasIE(cod_cuentasie, desc_cuentasie);
     }
     if (TxtFlag == "Prov")
     {
         FProveedor mForm = FProveedor.GetForm();
         string     cod_cuentasie, desc_cuentasie;
         cod_cuentasie  = Convert.ToString(DataListado.CurrentRow.Cells["cod_cuentasie"].Value);
         desc_cuentasie = Convert.ToString(DataListado.CurrentRow.Cells["desc_cuentasie"].Value);
         mForm.SetCuentasIE(cod_cuentasie, desc_cuentasie);
     }
     Close();
 }