private void butDelete_Click(object sender, EventArgs e) { if (RepServ.IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } ReplicationServers.DeleteObject(RepServ.ReplicationServerNum); DialogResult = DialogResult.OK; }
private void butDelete_Click(object sender, EventArgs e) { if (RepServ.IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete?")) { return; } if (RepServ.ReplicationServerNum == PrefC.GetLong(PrefName.ReplicationUserQueryServer)) //Current report server. { if (Prefs.UpdateLong(PrefName.ReplicationUserQueryServer, 0)) { DataValid.SetInvalid(InvalidType.Prefs); } } ReplicationServers.DeleteObject(RepServ.ReplicationServerNum); DialogResult = DialogResult.OK; }