public async static Task<AvgRatingObject> GetAvgRating(ScheduleItem scheduleItem)
        {
            Dictionary<string, string> p = new Dictionary<string, string>();
            p.Add("faculty", scheduleItem.Faculty);
            p.Add("course", scheduleItem.Course);
            p.Add("slot", scheduleItem.Slot);
            p.Add("date", scheduleItem.Date1);

            string urlContent = await GetURLContentAsString("faculty_json.php", p);
            return ParseAvgRatingResult(urlContent);
        }
        private void listSchedule_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListView lv = sender as ListView;
            if (lv == null) return;
            if (lv.SelectedIndex == -1) return;

            currentSelectedSchedule = (Code.ScheduleItem)lv.SelectedItem;
            //ShowProgressBar(true);

            EnableControls(false);
            lv.SelectedIndex = -1;

            bool hasNoID;
            if (IsFacultyAccount(currentSelectedSchedule.Faculty, out hasNoID))
            {
                // initiate the feedback information fetch
                ProcessAvgRatingDialog();
            }
            else
            {
                if (hasNoID)
                {
                    (new MessageDialog("You can not give feedback for this slot", "Error")).ShowAsync().GetResults();
                    ShowProgressBar(false);
                    return;
                }

                DateTime today = DateTime.Now.Date;
                DateTime schedDate = DateTime.Parse(currentSelectedSchedule.Date1).Date;
                if (schedDate != today)
                {
                    (new MessageDialog("You can only give feedback for today's schedule", "Error")).ShowAsync().GetResults();
                    ShowProgressBar(false);
                    return;
                }
                feedControl.GetFeedback(currentSelectedSchedule.Faculty, currentSelectedSchedule.Course);
            }
        }
        public async static Task<FeedbackResult> RegisterFacultyFeedback(ScheduleItem scheduleItem, FeedbackObject feedbackItem)
        {
            Dictionary<string, string> p = new Dictionary<string, string>();
            p.Add("faculty", scheduleItem.Faculty);
            p.Add("course", scheduleItem.Course);
            p.Add("comment", feedbackItem.Comments);
            p.Add("rate", feedbackItem.Rating.ToString());
            p.Add("empid", UserInformation.EmployeeId);
            p.Add("empname", UserInformation.FullName);
            p.Add("emploc", UserInformation.LocationName);
            p.Add("empbatch", UserInformation.LGName);
            p.Add("slot", scheduleItem.Slot);
            p.Add("date", scheduleItem.Date1);

            string urlContent = await GetURLContentAsString("feedback_json.php", p);
            return ParseFeedbackResult(urlContent);
        }