本文整理汇总了C#中Service1Client.GetAllAvailableTutoringTimes方法的典型用法代码示例。如果您正苦于以下问题:C# Service1Client.GetAllAvailableTutoringTimes方法的具体用法?C# Service1Client.GetAllAvailableTutoringTimes怎么用?C# Service1Client.GetAllAvailableTutoringTimes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service1Client
的用法示例。
在下文中一共展示了Service1Client.GetAllAvailableTutoringTimes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResetAllData
public void ResetAllData()
{
Service1Client service = new Service1Client();
BookingCalendar.SelectedDates.Clear();
allTutoringSubjects = new List<string>();
allTutoringTeachers = new List<Teacher>();
allTutoringTimes = service.GetAllAvailableTutoringTimes().OfType<TutoringTime>().ToList();
SetAllTutorsAndSubjects(allTutoringTimes);
SetSubjectsToComboBox(allTutoringSubjects);
SetTeachersToComboBox(allTutoringTeachers);
SetDataToTutorTable(new List<TutorTableView>());
SubjectDrL.SelectedValue = "Select subject";
TeacherDrL.SelectedValue = "Select teacher";
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (LogIn.child == null)
{
Response.Redirect("LogIn.aspx");
}
//On every postback it retrieves data from DB, so every time it provides the
//update of available tutoring times
Service1Client service = new Service1Client();
allTutoringTimes = service.GetAllAvailableTutoringTimes().OfType<TutoringTime>().ToList();
SetAllTutorsAndSubjects(allTutoringTimes);
//Checking for postback so the chosen data in combo boxes does not dissapear
if (!Page.IsPostBack)
{
SetSubjectsToComboBox(allTutoringSubjects);
SetTeachersToComboBox(allTutoringTeachers);
SetDataToTutorTable(new List<TutorTableView>());
DisplayMessageIfNoTutorsAvailable("Sorry, at this time there are no tutoring times provided by any teacher! Try again later!");
}
}