Exemplo n.º 1
0
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            int r = new Random().Next(1, 59);

            t.ADATETIME = new DateTime(myDate.SelectedDate.Value.Year, myDate.SelectedDate.Value.Month, myDate.SelectedDate.Value.Day, Convert.ToInt32(hoursText.Text), Convert.ToInt32(minText.Text), r);
            t.save(connStr: connectionStringText.Text);
        }
Exemplo n.º 2
0
        private void addButton_Click(object sender, RoutedEventArgs e)
        {
            cSetTime t = new cSetTime();

            t.CTRLAREAID  = 2;
            t.CARDID      = cardid;
            t.PERSONID    = cardid;
            t.IS_ENTRANCE = (exitComboBox.SelectedIndex == 0)? false : true;
            t.ADATETIME   = new DateTime(myDate.SelectedDate.Value.Year, myDate.SelectedDate.Value.Month, myDate.SelectedDate.Value.Day, Convert.ToInt32(hoursText.Text), Convert.ToInt32(minText.Text), new Random().Next(1, 59));
            t.COMMENT     = "";
            t.save(connStr: connStr);
            this.Close();
        }