private void btnEditTBLDeleteAssetComponent_Click(object sender, EventArgs e)
 {
     try
     {
         DataRowView drv = (DataRowView)gridViewTBLDeleteAssetComponent.GetRow(gridViewTBLDeleteAssetComponent.FocusedRowHandle);
         if (drv == null)
         {
             return;
         }
         Datasource.dsData.TBLDeleteAssetComponentRow row = (Datasource.dsData.TBLDeleteAssetComponentRow)(drv).Row;
         if (row == null)
         {
             return;
         }
         TBLDeleteAssetComponentDlg frm = new TBLDeleteAssetComponentDlg(row.DeleteComponentezn, false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLDeleteAssetComponent.ShowLoadingPanel();
             tBLDeleteAssetComponentTableAdapter.FillByAssetsID(dsData.TBLDeleteAssetComponent, row.AssetsID);
             gridViewTBLDeleteAssetComponent.RefreshData();
             gridViewTBLDeleteAssetComponent.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
 private void btnAddTBLDeleteAssetComponent_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewAsset.GetRow(gridViewAsset.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         if (row == null)
         {
             return;
         }
         TBLDeleteAssetComponentDlg frm = new TBLDeleteAssetComponentDlg(Convert.ToInt32(row.GetMemberValue("AssetsID")), true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLDeleteAssetComponent.ShowLoadingPanel();
             tBLDeleteAssetComponentTableAdapter.FillByAssetsID(dsData.TBLDeleteAssetComponent, Convert.ToInt32(row.GetMemberValue("AssetsID")));
             gridViewTBLDeleteAssetComponent.RefreshData();
             gridViewTBLDeleteAssetComponent.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }