예제 #1
0
 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;
 }
예제 #2
0
 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;
 }