Beispiel #1
0
        private void buttonX_add_Click(object sender, EventArgs e)
        {
            var sess = new SessionModel {
                Id               = -1,
                Name             = textBoxX_sessionsName.Text,
                IsStartYesterday = checkBox_sy.Checked,
                Days             = GetDaysStr(),
                TimeStart        = dateTimeInput1.Value,
                TimeEnd          = dateTimeInput2.Value,
            };

            AddSessionToList(sess);
            ClientDatabaseManager.AddSessionForGroup(AGroupModel.GroupId, sess);
        }
Beispiel #2
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            var ind = comboBoxEx_existigsSessions.SelectedIndex;

            if (ind == -1)
            {
                ToastNotification.Show(panelEx4, "Please, choose any session.");
                return;
            }


            var sess = new SessionModel
            {
                Id               = -1,
                Name             = addedSessions[ind].Name,
                IsStartYesterday = addedSessions[ind].IsStartYesterday,
                Days             = addedSessions[ind].Days,
                TimeStart        = addedSessions[ind].TimeStart,
                TimeEnd          = addedSessions[ind].TimeEnd,
            };

            AddSessionToList(sess);
            ClientDatabaseManager.AddSessionForGroup(AGroupModel.GroupId, sess);
        }