Пример #1
0
        protected void Calendar1_SelectionChanged(object sender, EventArgs e)
        {
            switch (PrehledTreninkuController.HandleDaySelected(sender, e, Calendar1))
            {
            case 0:
                PrehledTreninkuController.Hide(new List <WebControl> {
                    coachName, time, notes, acceptBtton, rejectButton, proposedDate, TextArea1, errorText
                });
                break;

            case 1:
                PrehledTreninkuController.SetText(coachName, time, notes);
                PrehledTreninkuController.Show(new List <WebControl> {
                    coachName, time, notes
                });
                PrehledTreninkuController.Hide(new List <WebControl> {
                    acceptBtton, rejectButton, proposedDate, TextArea1, errorText
                });
                break;

            case 2:
                PrehledTreninkuController.SetText(coachName, time, notes);     //todo
                PrehledTreninkuController.Show(new List <WebControl> {
                    coachName, time, notes, acceptBtton, rejectButton, proposedDate, TextArea1
                });
                break;
            }
        }
Пример #2
0
 protected async void RejectButton_Click(object sender, EventArgs e)
 {
     //PrehledTreninkuController.hide(new List<WebControl> { coachName, time, notes, acceptBtton, rejectButton, proposedDate, TextArea1 });
     if (!await PrehledTreninkuController.HandleReject(proposedDate, TextArea1))
     {
         PrehledTreninkuController.Show(new List <WebControl> {
             errorText
         });
     }
     else
     {
         PrehledTreninkuController.Hide(new List <WebControl> {
             errorText, coachName, time, notes, acceptBtton, rejectButton, proposedDate, TextArea1
         });
     }
 }