private void tsbForceClose_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show("Close SO and its all Items?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2)) { So so = soList[tabControl1.SelectedIndex]; SoMgr.WholeUpdateSoState(so.soId, UserInfo.UserId, SoStatesEnum.Closed); this.DialogResult = DialogResult.Yes; this.Close(); } }
private void tsbCancel_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show("Cancel SO?", "", MessageBoxButtons.YesNo)) { So so = soList[tabControl1.SelectedIndex]; SoMgr.WholeUpdateSoState(so.soId, UserInfo.UserId, SoStatesEnum.Cancel); this.DialogResult = DialogResult.Yes; this.Close(); } }