private void btnEditTBLAssetOhda_Click(object sender, EventArgs e)
 {
     try
     {
         DataRowView drv = (DataRowView)gridViewTBLAssetOhda.GetRow(gridViewTBLAssetOhda.FocusedRowHandle);
         if (drv == null)
         {
             return;
         }
         Datasource.dsData.TBLAssetOhdaRow row = (Datasource.dsData.TBLAssetOhdaRow)(drv).Row;
         if (row == null)
         {
             return;
         }
         TBLAssetOhdaDlg frm = new TBLAssetOhdaDlg(row.AssetOhdaId, false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLAssetOhda.ShowLoadingPanel();
             tBLAssetOhdaTableAdapter.FillByAssetsID(dsData.TBLAssetOhda, row.AssetsID);
             gridViewTBLAssetOhda.RefreshData();
             gridViewTBLAssetOhda.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
 private void btnAddTBLAssetOhda_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewAsset.GetRow(gridViewAsset.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         if (row == null)
         {
             return;
         }
         TBLAssetOhdaDlg frm = new TBLAssetOhdaDlg(Convert.ToInt32(row.GetMemberValue("AssetsID")), true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLAssetOhda.ShowLoadingPanel();
             tBLAssetOhdaTableAdapter.FillByAssetsID(dsData.TBLAssetOhda, Convert.ToInt32(row.GetMemberValue("AssetsID")));
             gridViewTBLAssetOhda.RefreshData();
             gridViewTBLAssetOhda.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }