private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
{
//双击就执行
if (e.Clicks != 2)
return;
//获取选中行的数据
_dept = (Department)gridView1.GetFocusedRow();
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}