private void searchCoures()
 {
     System.Collections.IList professionList = new ArrayList();
     string FacultyID = context.Request.Form.Get("FacultyID");
     string ProfessionID = context.Request.Form.Get("ProfessionID");
     string YearNo = context.Request.Form.Get("YearNo");
     string LevelNo = context.Request.Form.Get("LevelNo");
     if (!string.IsNullOrEmpty(ProfessionID)) {
         DepartmentService ds = new DepartmentService();
         Profession p = ds.getProfessionByID(ProfessionID);
         professionList.Add(p);
     }else if(!string.IsNullOrEmpty(FacultyID)){
        DepartmentService ds = new DepartmentService();
        Iesi.Collections.Generic.ISet<Profession> iset = ds.getProfessionSet(FacultyID);
         foreach(Profession pf in iset){
            professionList.Add(pf);
        }
     }
     CouresService cs = new CouresService();
     int rows = Convert.ToInt32(context.Request.Form["rows"]);
     int page = Convert.ToInt32(context.Request.Form["page"]);
     object[] data = cs.searchCoures(professionList, YearNo, LevelNo, rows, page);
     Hashtable ht = new Hashtable();
     ht.Add("total", data[0]);
     ht.Add("rows", data[1]);
     String json = JsonConvert.SerializeObject(ht);
     context.Response.Write(json);
 }
 public void getProfessionCombo()
 {
     string facultyID = context.Request.QueryString["facultyID"];
     DepartmentService ds = new DepartmentService();
     ISet<Profession> professionList = ds.getProfessionSet(facultyID);
     if (professionList.Count > 0)
     {
         String json = JsonConvert.SerializeObject(professionList);
         context.Response.Write(json);
     }
     else {
         context.Response.Write("[{}]");
     }
 }