Ejemplo n.º 1
0
        private void grvXuatCanh_InitNewRow(object sender, DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs e)
        {
            XUAT_CANH_TRAI_PHEP xctp = grvXuatCanh.GetRow(e.RowHandle) as XUAT_CANH_TRAI_PHEP;

            xctp.ID       = SequenceId.XUAT_CANH_TRAI_PHEP();
            xctp.ID_NGUOI = NguoiXuatCanh.ID;
        }
        private async void grvXuatCanhTraiPhep_DoubleClick(object sender, EventArgs e)
        {
            XUAT_CANH_TRAI_PHEP xc = xUAT_CANH_TRAI_PHEPBindingSource.Current as XUAT_CANH_TRAI_PHEP;

            if (xc != null)
            {
                FormXuatCanhTraiPhep frm = new FormXuatCanhTraiPhep();
                await frm.InitAsync(xc.ID_NGUOI);

                frm.ShowDialog();
                int pos = xUAT_CANH_TRAI_PHEPBindingSource.Position;
                await this.LoadDuLieu();

                grvXuatCanhTraiPhep.RefreshData();
                xUAT_CANH_TRAI_PHEPBindingSource.Position = pos;
            }
        }