Example #1
0
        //Load add
        private void ShowAddForm()
        {
            fHangHoaUpdate f = new fHangHoaUpdate();

            f._id = -1;
            f.ShowDialog();
            LoadData();
            gvData.FocusedRowHandle = gvData.RowCount - 1;
        }
Example #2
0
        //Load Edit
        private void ShowUpdateForm()
        {
            int index = gvData.FocusedRowHandle;
            var id    = gvData.GetRowCellValue(index, "id").ToString();

            if (id != null)
            {
                fHangHoaUpdate f = new fHangHoaUpdate();
                f._id = int.Parse(id.ToString());
                f.ShowDialog();
                LoadData();
            }
            gvData.FocusedRowHandle = index;
        }