Example #1
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            int        focusRow = gridView1.FocusedRowHandle;
            frmDefEdit defedt   = new frmDefEdit();

            defedt.WSMgr     = mgr;
            defedt.ProcessID = this.ProcessID;
            defedt.ShowDialog();
            getData();
            bindGrid();
            if (focusRow >= 0)
            {
                gridView1.FocusedRowHandle = focusRow;
            }
        }
Example #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (gridView1.FocusedRowHandle >= 0)
     {
         int        focusRow = gridView1.FocusedRowHandle;
         frmDefEdit defedt   = new frmDefEdit();
         DataRow    row      = gridView1.GetDataRow(gridView1.FocusedRowHandle);
         string     id       = row["JTPUBQRDEF_ID"].ToString();
         defedt.ID        = id;
         defedt.WSMgr     = mgr;
         defedt.ProcessID = this.ProcessID;
         defedt.ShowDialog();
         getData();
         bindGrid();
         gridView1.FocusedRowHandle = focusRow;
     }
 }