示例#1
0
 private void grvChucVu_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     if (grvChucVu.FocusedRowHandle >= 0)
     {
         drChucVu = grvChucVu.GetDataRow(grvChucVu.FocusedRowHandle);
         oBDM_ChucVu.ToInfo(ref pDM_ChucVuInfo, drChucVu);
         if (ofrmQuaTrinhBoNhiemChucVu != null)
         {
             ofrmQuaTrinhBoNhiemChucVu.IDDM_ChucVu = int.Parse(drChucVu[pDM_ChucVuInfo.strDM_ChucVuID].ToString());
         }
     }
     if (grvChucVu != null)
     {
         if (grvChucVu.DataRowCount > 0 && grvChucVu.FocusedRowHandle >= 0)
         {
             SetControl(true);
             drChucVu = grvChucVu.GetDataRow(grvChucVu.FocusedRowHandle);
             return;
         }
     }
     SetControl(false);
     drChucVu = null;
 }