public void save(Coures coures)
 {
     Session.Save(coures);
     Session.Flush();
 }
 public void update(Coures coures)
 {
     Session.Update(coures);
     Session.Flush();
 }
 private void saveCoures()
 {
     try
     {
         string professionID = context.Request.Form.Get("profession");
         DepartmentService ds = new DepartmentService();
         Profession profession = ds.getProfessionByID(professionID);
         if (profession != null)
         {
             Coures c = new Coures();
             setValue(c, context);
             c.Profession = profession;
             ds.save(c);
             context.Response.Write("1");
         }
     }
     catch (Exception e) {
         context.Response.Write("0");
     }
 }