Exemple #1
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            int tempfocus = gridView1.FocusedRowHandle;
            AddEditDeletePhieuThu editForm = new AddEditDeletePhieuThu(gridView1, false, phieu);

            editForm.ShowDialog();
            e10PHVBTTableAdapter.Update(ewondataset1.E10PHVBT);
            e10PHVBTTableAdapter.FillByPT(ewondataset1.E10PHVBT, phieu);
            gridView1.FocusedRowHandle = tempfocus;
        }
Exemple #2
0
        private void addBtn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.AddNewRow();
            gridView1.GetDataRow(gridView1.FocusedRowHandle)["Ma_Ct"] = phieu;
            gridView1.UpdateCurrentRow();
            e10PHVBTTableAdapter.Update(ewondataset1.E10PHVBT);
            e10PHVBTTableAdapter.FillByPT(ewondataset1.E10PHVBT, phieu);
            gridView1.FocusedRowHandle = gridView1.DataRowCount - 1;
            AddEditDeletePhieuThu editForm = new AddEditDeletePhieuThu(gridView1, true, phieu);

            editForm.ShowDialog();
            e10PHVBTTableAdapter.Update(ewondataset1.E10PHVBT);
            e10PHVBTTableAdapter.FillByPT(ewondataset1.E10PHVBT, phieu);
            gridView1.FocusedRowHandle = gridView1.DataRowCount - 1;
        }