private void btnEditar_Click(object sender, EventArgs e)
        {
            try
            {
                FormGridModeloAsientos frm = new FormGridModeloAsientos();
                ///var t = this.addModeloAsiento.getDatos(1, 1, 1,3 );
                ///var t = this.addModeloAsiento.getDatosD(1, int.Parse(this.dtlista.CurrentRow.Cells[1].Value.ToString()), int.Parse(this.dtlista.CurrentRow.Cells[0].Value.ToString()));
                var t = this.addModeloAsiento.getDatosT(int.Parse(this.dtlista.CurrentRow.Cells[0].Value.ToString()), int.Parse(this.dtlista.CurrentRow.Cells[1].Value.ToString()));
                ///this.dtlista.Columns[0];
                ///var t = this.addModeloAsientoG.getDatosD(1, Convert.ToInt32(frm.txtmodulod.Text), Convert.ToInt32(frm.txtTransacciond), 3);
                ///ToInt32(String)

                //var t = this.addModeloAsiento.getDatos(int.Parse(this.dtlista.CurrentRow.Cells[3].Value.ToString()));
                frm.txtmodulod.Text = t.modulo.ToString();
                frm.txtTransacciond.Text = t.IdTransaccion.ToString();
                frm.txtDescripciond.Text = t.descripcion;
                frm.ShowDialog();
                this.Listar();
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
 private void btnModificar_Click(object sender, EventArgs e)
 {
     try
     {
         FormGridModeloAsientos frm = new FormGridModeloAsientos();
         ///var t = this.addModeloAsiento.getDatos(1, 1, 1,3 );
         var t = this.addModeloAsiento.getDatosT(int.Parse(this.dtlista.CurrentRow.Cells[0].Value.ToString()), int.Parse(this.dtlista.CurrentRow.Cells[1].Value.ToString()));
         frm.txtmodulod.Text = t.modulo.ToString();
         //frm.txtnombremodulo = Convert.ToString(this.dtlista.CurrentRow.Cells[4].Value.ToString()) ;
         frm.txtTransacciond.Text = t.IdTransaccion.ToString();
         frm.txtDescripciond.Text = t.descripcion;
         frm.ShowDialog();
         this.Listar();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }