private void butOK_Click(object sender, System.EventArgs e) { if (textTitle.Text == "") { MessageBox.Show(Lan.g(this, "Please enter a title first.")); return; } UserQueryCur.Description = textTitle.Text; UserQueryCur.QueryText = textQuery.Text; UserQueryCur.FileName = textFileName.Text; if (IsNew) { UserQueries.Insert(UserQueryCur); } else { UserQueries.Update(UserQueryCur); } DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { if (textTitle.Text == "") { MessageBox.Show(Lan.g(this, "Please enter a title first.")); return; } UserQueryCur.Description = textTitle.Text; UserQueryCur.QueryText = textQuery.Text; UserQueryCur.FileName = textFileName.Text; UserQueryCur.IsReleased = checkReleased.Checked; UserQueryCur.IsPromptSetup = checkIsPromptSetup.Checked; if (IsNew) { UserQueries.Insert(UserQueryCur); } else { UserQueries.Update(UserQueryCur); } DataValid.SetInvalid(InvalidType.UserQueries); DialogResult = DialogResult.OK; }