private void btnEditDFEditor_Click(object sender, EventArgs e) { try { CostDynamicForecast row = (CostDynamicForecast)gridViewDFEditor.GetRow(gridViewDFEditor.FocusedRowHandle); if (row == null) return; DynamicForecastEditorDlg frm = new DynamicForecastEditorDlg(false, row.ID.Costcenter, row.ID.GLAccount, row.ID.Year, row.ID.BusinessUnit, row.ID.Period); if (frm.ShowDialog() == DialogResult.OK) { gridViewDFEditor.ShowLoadingPanel(); UOWDFEditor.DropIdentityMap(); UOWDFEditor.DropChanges(); XPSCSDFEditor.Reload(); gridViewDFEditor.RefreshData(); gridViewDFEditor.HideLoadingPanel(); } } catch (Exception ex) { MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex); } }
private void btnAddDFEditor_Click(object sender, EventArgs e) { try { DynamicForecastEditorDlg frm = new DynamicForecastEditorDlg(true, string.Empty, string.Empty, null, string.Empty, null); if (frm.ShowDialog() == DialogResult.OK) { gridViewDFEditor.ShowLoadingPanel(); UOWDFEditor.DropIdentityMap(); UOWDFEditor.DropChanges(); XPSCSDFEditor.Reload(); gridViewDFEditor.RefreshData(); gridViewDFEditor.HideLoadingPanel(); } } catch (Exception ex) { MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex); } }