Beispiel #1
0
        private void SubmitChanges_Click(object sender, EventArgs e)
        {
            try
            {
                TextBox alarmBox   = updatePanel.Controls.OfType <TextBox>().ToList().Where(x => x.Name.Contains("modifyAlarmDate")).First();
                TextBox contentBox = updatePanel.Controls.OfType <TextBox>().ToList().Where(x => x.Name.Contains("modifyContentBox")).First();

                SelectedRow_Task.Alarm_Date = Convert.ToDateTime(alarmBox.Text);
                SelectedRow_Task.Content    = contentBox.Text;

                TaskModel.Edit(SelectedRow_Date, SelectedRow_Task);

                RefreshForm_Old();
            }
            catch (Exception x)
            {
                MessageBox.Show("Valamilyen probléma adódott.");
                MessageBox.Show(x.Message);
            }
        }