Ejemplo n.º 1
0
        private void btn_procedi_Click(object sender, RoutedEventArgs e)
        {
            questionario_warning.Visibility = System.Windows.Visibility.Collapsed;
            // controlliamo che tutte le domande abbiano una risposta (si,no)
            foreach (Domanda _d in domande)
            {
                if (_d.Risposta == "")
                {
                    // non ci siamo
                    questionario_warning.Visibility = System.Windows.Visibility.Visible;
                    return; //il popup resterà visibile
                }
            }

            try
            {
                DBHandler _dbh = new DBHandler();
                foreach (Domanda _d in domande)
                {
                    string _sql = "INSERT INTO TABQSR0F(TRLOTO,TRIDQS,TRIDRE,TRDATA,TRORA,TROPER,TRIDTE) VALUES('{0}','{1}','{2}','{3}','{4}','{5}','{6}')";

                    _sql = string.Format(_sql, LottoCurrent.ID_lotto, _d.ID_Domanda, _d.Risposta, DateTime.Today.ToString("dMyyyy"), DateTime.Now.ToString("HHmmss"), App.Current.Properties["operatore_id"].ToString(), App.Current.Properties["id_terminale"].ToString());
                    _dbh.ExecuteNonQueryShot("DELETE FROM TABQSR0F WHERE TRIDQS='" + _d.ID_Domanda + "'");
                    _dbh.ExecuteNonQueryShot(_sql);
                }
            }
            catch (Exception ep)
            {
            }
            popup_domande_lotto.IsOpen    = false;
            is_questionario_completed     = true;
            btn_question_close.Visibility = System.Windows.Visibility.Visible;

            CustomMenu.Toggle();
        }
Ejemplo n.º 2
0
 private void Custom_OnClick(object sender, RoutedEventArgs e)
 {
     CustomMenu.Toggle();
 }
Ejemplo n.º 3
0
 private void CloseQuesstionarioCommandHandler(object sender, ExecutedRoutedEventArgs e)
 {
     popup_domande_lotto.IsOpen = false;
     CustomMenu.Toggle();
 }