Пример #1
0
 private void gridMain_CellClick(object sender, ODGridClickEventArgs e)
 {
     if (e.Col == 1)           //Released Column
     {
         UserQuery query = gridMain.SelectedTag <UserQuery>();
         query.IsReleased = (!query.IsReleased);
         UserQueries.Update(query);
         DataValid.SetInvalid(InvalidType.UserQueries);
         FillGrid(true, false);               //Results in RefreshQueryCur()
         return;
     }
     RefreshQueryCur();
 }
Пример #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;
     if (IsNew)
     {
         UserQueries.Insert(UserQueryCur);
     }
     else
     {
         UserQueries.Update(UserQueryCur);
     }
     DialogResult = DialogResult.OK;
 }
Пример #3
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;
 }