private void btnEditTBLReEvaluation_Click(object sender, EventArgs e)
 {
     try
     {
         DataRowView drv = (DataRowView)gridViewTBLReEvaluation.GetRow(gridViewTBLReEvaluation.FocusedRowHandle);
         if (drv == null)
         {
             return;
         }
         Datasource.dsData.TBLReEvaluationRow row = (Datasource.dsData.TBLReEvaluationRow)(drv).Row;
         if (row == null)
         {
             return;
         }
         TBLReEvaluationDlg frm = new TBLReEvaluationDlg(row.ReEvaluationId, false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLReEvaluation.ShowLoadingPanel();
             tBLReEvaluationTableAdapter.FillByAssetsID(dsData.TBLReEvaluation, row.AssetsID);
             gridViewTBLReEvaluation.RefreshData();
             gridViewTBLReEvaluation.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
 private void btnAddTBLReEvaluation_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewAsset.GetRow(gridViewAsset.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         if (row == null)
         {
             return;
         }
         TBLReEvaluationDlg frm = new TBLReEvaluationDlg(Convert.ToInt32(row.GetMemberValue("AssetsID")), true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             gridViewTBLReEvaluation.ShowLoadingPanel();
             tBLReEvaluationTableAdapter.FillByAssetsID(dsData.TBLReEvaluation, Convert.ToInt32(row.GetMemberValue("AssetsID")));
             gridViewTBLReEvaluation.RefreshData();
             gridViewTBLReEvaluation.HideLoadingPanel();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }