private void ClearAll() { RefreshCombos(); MunisUser = new MunisEmployee(); ClearFields(this); PurchaseDatePicker.Value = DateTime.Now; StatusComboBox.SetSelectedAttribute(Attributes.DeviceAttributes.StatusType["INSRV"]); TrackableCheckBox.Checked = false; NoClearCheckBox.Checked = false; controlParser.ClearErrors(); }
private bool CancelModify() { if (editMode) { this.WindowState = FormWindowState.Normal; this.Activate(); var blah = OtherFunctions.Message("Are you sure you want to discard all changes?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, "Discard Changes?", this); if (blah == DialogResult.Yes) { controlParser.ClearErrors(); SetEditMode(false); RefreshData(); return(true); } } return(false); }