private void btnUpdate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int RowHandle = 0;
            if (selection.SelectedCount == 0)
            {
                MessageBox.Show("请先选择需要修改的记录");
            }
            else if (selection.SelectedCount > 1)
            {
                MessageBox.Show("一次只能修改一条记录,请重新选择!");
            }
            else
            {
                int RowIndex = selection.GetSelectedRowIndex(0);
                RowHandle = gridView1.GetRowHandle(RowIndex);

                structDWXX sDWXX = new structDWXX();
                sDWXX.strDWID = gridView1.GetRowCellDisplayText(RowHandle, colDWID);
                sDWXX.strDWBH = gridView1.GetRowCellDisplayText(RowHandle, colDWBH);
                sDWXX.strDWFR = gridView1.GetRowCellDisplayText(RowHandle, colDWFR);
                sDWXX.strDWJB = gridView1.GetRowCellDisplayText(RowHandle, colDWJB);
                sDWXX.strDWJC = gridView1.GetRowCellDisplayText(RowHandle, colDWJC);
                sDWXX.strDWMC = gridView1.GetRowCellDisplayText(RowHandle, colDWMC);
                sDWXX.strDWSX = gridView1.GetRowCellDisplayText(RowHandle, colDWSX);
                sDWXX.strDWTJBH = gridView1.GetRowCellDisplayText(RowHandle, colDWTJBH);
                sDWXX.strBMLXID = gridView1.GetRowCellDisplayText(RowHandle, colBMLXID);
                sDWXX.strBMZTID = gridView1.GetRowCellDisplayText(RowHandle, colBMZTID);
                sDWXX.strBZ = gridView1.GetRowCellDisplayText(RowHandle, colBZ);
                sDWXX.strCBSLXID = gridView1.GetRowCellDisplayText(RowHandle, colCBSLXID);
                sDWXX.strCGJSYXJB = gridView1.GetRowCellDisplayText(RowHandle, colCGJSYXJB);
                sDWXX.strCGJSZQ = gridView1.GetRowCellDisplayText(RowHandle, colCGJSZQ);
                sDWXX.strCGYXJB = gridView1.GetRowCellDisplayText(RowHandle, colCGYXJB);
                sDWXX.strCZ = gridView1.GetRowCellDisplayText(RowHandle, colCZ);
                sDWXX.strDH = gridView1.GetRowCellDisplayText(RowHandle, colDH);
                sDWXX.strDJSDBZ = gridView1.GetRowCellDisplayText(RowHandle, colDJSDBZ);
                sDWXX.strDQID = gridView1.GetRowCellDisplayText(RowHandle, colDQID);
                sDWXX.strEMAIL = gridView1.GetRowCellDisplayText(RowHandle, colEMAIL);
                sDWXX.strEZDBH = gridView1.GetRowCellDisplayText(RowHandle, colEZDBH);
                sDWXX.strGYSLXID = gridView1.GetRowCellDisplayText(RowHandle, colGYSLXID);
                sDWXX.strJSDWID = gridView1.GetRowCellDisplayText(RowHandle, colJSDWID);
                sDWXX.strJSFSID = gridView1.GetRowCellDisplayText(RowHandle, colJSFSID);
                sDWXX.strJTYXJB = gridView1.GetRowCellDisplayText(RowHandle, colJTYXJB);
                sDWXX.strKFDZ = gridView1.GetRowCellDisplayText(RowHandle, colKFDZ);
                sDWXX.strKFLXID = gridView1.GetRowCellDisplayText(RowHandle, colKFLXID);
                sDWXX.strKHLXID = gridView1.GetRowCellDisplayText(RowHandle, colKHLXID);
                sDWXX.strKHYH = gridView1.GetRowCellDisplayText(RowHandle, colKHYH);
                sDWXX.strKHZZBZFBZ = gridView1.GetRowCellDisplayText(RowHandle, colKHZZBZFBZ);
                sDWXX.strKHZZQTFYBZ = gridView1.GetRowCellDisplayText(RowHandle, colKHZZQTFYBZ);
                sDWXX.strKHZZYFBZ = gridView1.GetRowCellDisplayText(RowHandle, colKHZZYFBZ);
                sDWXX.strKJDZ = gridView1.GetRowCellDisplayText(RowHandle, colKJDZ);
                sDWXX.strLXR = gridView1.GetRowCellDisplayText(RowHandle, colLXR);
                sDWXX.strMJDZ = gridView1.GetRowCellDisplayText(RowHandle, colMJDZ);
                sDWXX.strPHYXJB = gridView1.GetRowCellDisplayText(RowHandle, colPHYXJB);
                sDWXX.strSDSX = gridView1.GetRowCellDisplayText(RowHandle, colSDSX);
                sDWXX.strSDXX = gridView1.GetRowCellDisplayText(RowHandle, colSDXX);
                sDWXX.strSFID = gridView1.GetRowCellDisplayText(RowHandle, colSFID);
                sDWXX.strSFZT = gridView1.GetRowCellDisplayText(RowHandle, colSFZT);
                sDWXX.strSH = gridView1.GetRowCellDisplayText(RowHandle, colSH);
                sDWXX.strSHDZ = gridView1.GetRowCellDisplayText(RowHandle, colSHDZ);
                sDWXX.strSJDWID = gridView1.GetRowCellDisplayText(RowHandle, colSJDWID);
                sDWXX.strTDYZS = gridView1.GetRowCellDisplayText(RowHandle, colTDYZS);
                sDWXX.strTSJSDBZ = gridView1.GetRowCellDisplayText(RowHandle, colTSJSDBZ);
                sDWXX.strTSJSZQ = gridView1.GetRowCellDisplayText(RowHandle, colTSJSZQ);
                sDWXX.strTSSX = gridView1.GetRowCellDisplayText(RowHandle, colTSSX);
                sDWXX.strTSXX = gridView1.GetRowCellDisplayText(RowHandle, colTSXX);
                sDWXX.strTXDZ = gridView1.GetRowCellDisplayText(RowHandle, colTXDZ);
                sDWXX.strWEBMM = gridView1.GetRowCellDisplayText(RowHandle, colWEBMM);
                sDWXX.strWEBYH = gridView1.GetRowCellDisplayText(RowHandle, colWEBYH);
                sDWXX.strWZ = gridView1.GetRowCellDisplayText(RowHandle, colWZ);
                sDWXX.strXSJSYXJB = gridView1.GetRowCellDisplayText(RowHandle, colXSJSYXJB);
                sDWXX.strXTYXJB = gridView1.GetRowCellDisplayText(RowHandle, colXTYXJB);
                sDWXX.strYINSDWLXID = gridView1.GetRowCellDisplayText(RowHandle, colYINSDWLXID);
                sDWXX.strYSDWLXID = gridView1.GetRowCellDisplayText(RowHandle, colYSDWLXID);
                sDWXX.strYSFSID = gridView1.GetRowCellDisplayText(RowHandle, colYSFSID);
                sDWXX.strYSFXID = gridView1.GetRowCellDisplayText(RowHandle, colYSFXID);
                sDWXX.strYZBM = gridView1.GetRowCellDisplayText(RowHandle, colYZBM);
                sDWXX.strYZDBH = gridView1.GetRowCellDisplayText(RowHandle, colYZDBH);
                sDWXX.strZH = gridView1.GetRowCellDisplayText(RowHandle, colZH);
                sDWXX.strZJM = gridView1.GetRowCellDisplayText(RowHandle, colZJM);
                sDWXX.strZKSX = gridView1.GetRowCellDisplayText(RowHandle, colZKSX);
                sDWXX.strZKXX = gridView1.GetRowCellDisplayText(RowHandle, colZKXX);
                sDWXX.strZT = gridView1.GetRowCellDisplayText(RowHandle, colZT);
                sDWXX.strZZDBZ = gridView1.GetRowCellDisplayText(RowHandle, colZZDBZ);

                FrmDeptChild frmUpdate = new FrmDeptChild(sDWXX);
                frmUpdate.Text = "修改单位";
                frmUpdate.ShowDialog();

                selection.ClearSelection();
                unitOfWork1.DropIdentityMap();
                xpServerCollectionSource1.Reload();

                gridView1.FocusedRowHandle = RowHandle;

            }
        }
        private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            structDWXX sDWXX = new structDWXX();

            FrmDeptChild frmAdd = new FrmDeptChild(sDWXX);
            frmAdd.Text = "增加单位";
            frmAdd.ShowDialog();

            selection.ClearSelection();
            unitOfWork1.DropIdentityMap();
            xpServerCollectionSource1.Reload();
        }