private void PerformAction(ToolAction action) { BaseMdiChildForm child = this.ActiveMdiChildForm; if (child == null) { return; } switch (action) { case ToolAction.Inquiry: PerformInquiry(child, child.AuthCollection["R"]); break; case ToolAction.Add: PerformAdd(child, child.AuthCollection["C"]); break; case ToolAction.Delete: PerformDelete(child, child.AuthCollection["D"]); break; case ToolAction.Save: PerformSave(child, child.AuthCollection["S"]); break; } }
private void PerformDelete(BaseMdiChildForm child, FormAuthInfo auth) { if (auth == null) { return; } if (auth.Value == true) { child?.DoDelete(); } }
public void PerformSave(BaseMdiChildForm child, FormAuthInfo auth) { if (auth == null) { return; } if (auth.Value == true) { DialogResult result = DialogHelper.ShowDialog("저장하시겠습니까?", DialogType.YesNo); if (result == DialogResult.Yes) { child?.DoSave(); } } }