private void btnEditTBLAssetPlace_Click(object sender, EventArgs e)
 {
     try
     {
         DataRowView drv = (DataRowView)gridViewTBLAssetPlace.GetRow(gridViewTBLAssetPlace.FocusedRowHandle);
         if (drv == null)
         {
             return;
         }
         Datasource.dsData.TBLAssetPlaceRow row = (Datasource.dsData.TBLAssetPlaceRow)(drv).Row;
         if (row == null)
         {
             return;
         }
         TBLAssetPlaceDlg frm = new TBLAssetPlaceDlg(row.AssetRePlaceId, false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLAssetPlace.ShowLoadingPanel();
             tBLAssetPlaceTableAdapter.FillByAssetsID(dsData.TBLAssetPlace, row.AssetsID);
             gridViewTBLAssetPlace.RefreshData();
             gridViewTBLAssetPlace.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
 private void btnAddTBLAssetPlace_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewAsset.GetRow(gridViewAsset.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         if (row == null)
         {
             return;
         }
         TBLAssetPlaceDlg frm = new TBLAssetPlaceDlg(Convert.ToInt32(row.GetMemberValue("AssetsID")), true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLAssetPlace.ShowLoadingPanel();
             tBLAssetPlaceTableAdapter.FillByAssetsID(dsData.TBLAssetPlace, Convert.ToInt32(row.GetMemberValue("AssetsID")));
             gridViewTBLAssetPlace.RefreshData();
             gridViewTBLAssetPlace.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }