protected void DownloadAllBtn_Click(object sender, EventArgs e)
 {
     using (WebhostEntities db = new WebhostEntities())
     {
         int        Termid         = DateRange.GetCurrentOrLastTerm();
         List <int> activeStudents = db.Students.Where(s => s.StudentComments.Where(com => com.CommentHeader.TermIndex == Termid).Count() > 0).Select(s => s.ID).ToList();
         PublishRequest.RequestByStudent(((BasePage)Page).user, activeStudents, Server.MapPath("~/Temp/all_comments"));
     }
 }
        protected void DownloadCurrentBtn_Click(object sender, EventArgs e)
        {
            List <int> ids = new List <int>();

            foreach (ListItem item in AdviseeSelectDDL.Items)
            {
                ids.Add(Convert.ToInt32(item.Value));
            }

            PublishRequest.RequestByStudent(user, ids, Server.MapPath(String.Format("~/Temp/{0}_advisees", user.UserName)));
        }