Ejemplo n.º 1
0
 private void init(int ID)
 {
     t = new cSetTime(ID, connStr: connectionStringText.Text);
     myDate.SelectedDate = t.ADATETIME;
     hoursText.Text      = t.ADATETIME.Hour.ToString();
     minText.Text        = t.ADATETIME.Minute.ToString();
     exitLable.Content   = (t.IS_ENTRANCE == false)?"Ушел":"Пришел";
 }
Ejemplo 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();
        }