private void btnEditTBLAddAssetComponent_Click(object sender, EventArgs e) { try { DataRowView drv = (DataRowView)gridViewTBLAddAssetComponent.GetRow(gridViewTBLAddAssetComponent.FocusedRowHandle); if (drv == null) { return; } Datasource.dsData.TBLAddAssetComponentRow row = (Datasource.dsData.TBLAddAssetComponentRow)(drv).Row; if (row == null) { return; } TBLAddAssetComponentDlg frm = new TBLAddAssetComponentDlg(row.AddComponentezn, false); if (frm.ShowDialog() == DialogResult.OK) { gridViewTBLAddAssetComponent.ShowLoadingPanel(); tBLAddAssetComponentTableAdapter.FillByAssetsID(dsData.TBLAddAssetComponent, row.AssetsID); gridViewTBLAddAssetComponent.RefreshData(); gridViewTBLAddAssetComponent.HideLoadingPanel(); } } catch (Exception ex) { MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex); } }
private void btnAddTBLAddAssetComponent_Click(object sender, EventArgs e) { try { XPDataTableObject row = (XPDataTableObject)gridViewAsset.GetRow(gridViewAsset.FocusedRowHandle); if (row == null) { return; } if (row == null) { return; } TBLAddAssetComponentDlg frm = new TBLAddAssetComponentDlg(Convert.ToInt32(row.GetMemberValue("AssetsID")), true); if (frm.ShowDialog() == DialogResult.OK) { gridViewTBLAddAssetComponent.ShowLoadingPanel(); tBLAddAssetComponentTableAdapter.FillByAssetsID(dsData.TBLAddAssetComponent, Convert.ToInt32(row.GetMemberValue("AssetsID"))); gridViewTBLAddAssetComponent.RefreshData(); gridViewTBLAddAssetComponent.HideLoadingPanel(); } } catch (Exception ex) { MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex); } }