private void btnEditTBLAssetPropertiy_Click(object sender, EventArgs e)
 {
     try
     {
         DataRowView drv = (DataRowView)gridViewTBLAssetPropertiy.GetRow(gridViewTBLAssetPropertiy.FocusedRowHandle);
         if (drv == null)
         {
             return;
         }
         Datasource.dsData.TBLAssetPropertiyRow row = (Datasource.dsData.TBLAssetPropertiyRow)(drv).Row;
         if (row == null)
         {
             return;
         }
         TBLAssetPropertiyDlg frm = new TBLAssetPropertiyDlg(row.AssetsID, row.AssetPropertiyId);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLAssetPropertiy.ShowLoadingPanel();
             tBLAssetPropertiyTableAdapter.FillByAssetsID(dsData.TBLAssetPropertiy, row.AssetsID);
             gridViewTBLAssetPropertiy.RefreshData();
             gridViewTBLAssetPropertiy.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
 private void btnAddTBLAssetPropertiy_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewAsset.GetRow(gridViewAsset.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         TBLAssetPropertiyDlg frm = new TBLAssetPropertiyDlg(Convert.ToInt32(row.GetMemberValue("AssetsID")));
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLAssetPropertiy.ShowLoadingPanel();
             tBLAssetPropertiyTableAdapter.FillByAssetsID(dsData.TBLAssetPropertiy, Convert.ToInt32(row.GetMemberValue("AssetsID")));
             gridViewTBLAssetPropertiy.RefreshData();
             gridViewTBLAssetPropertiy.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }