private void butOK_Click(object sender, EventArgs e) { pbqCur.Description = textDescript.Text; pbqCur.CodeValue = textProcedureCode.Text; pbqCur.Surf = textSurfaces.Text; pbqCur.IsLabel = checkIsLabel.Checked; //TODO: Validation, if we need any. if (IsNew) { ProcButtonQuicks.Insert(pbqCur); } else { ProcButtonQuicks.Update(pbqCur); } DialogResult = DialogResult.OK; }