protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int      nIdCourse = Convert.ToInt32(Request.QueryString["Id"]);
                Course   course    = BLL_Course.getCourse(nIdCourse);
                Personne pers      = (Personne)HttpContext.Current.Session["ID"];

                Participation part = BLL_Participation.getUneParticipation(pers, course);

                if (course != null)
                {
                    LBL_TITRE_VALUE.Text       = course.Titre;
                    LBL_DESCRIPTION_VALUE.Text = course.Description;
                    LBL_VILLE_VALUE.Text       = course.Ville;
                    LBL_DATE_DEBUT_VALUE.Text  = course.DateDebut.ToString();
                    LBL_DATE_FIN_VALUE.Text    = course.DateFin.ToString();
                }

                if (part == null)
                {
                    BTN_ANNULER.Visible    = false;
                    BTN_PARTICIPER.Visible = true;
                }
                else
                {
                    BTN_PARTICIPER.Visible = false;
                    BTN_ANNULER.Visible    = true;
                }
            }
        }
Exemple #2
0
        protected void enregistrerClick(object sender, EventArgs e)

        {
            try
            {
                Course course = BLL_Course.course(TB_TITRE_VALUE.Text, TB_DESCRIPTION_VALUE.Text, Convert.ToDateTime(TB_DATE_DEBUT_VALUE.Text), Convert.ToDateTime(TB_DATE_FIN.Text), TB_VILLE_VALUE.Text);
                BLL_Course.addCourse(course);
            }
            catch
            {
            }
            finally
            {
                Response.Redirect("~/Administration/Membres/ListeCourses.aspx");
            }
        }
        protected void annulerClick(object sender, EventArgs e)
        {
            int      nIdCourse = Convert.ToInt32(Request.QueryString["Id"]);
            Course   course    = BLL_Course.getCourse(nIdCourse);
            Personne pers      = (Personne)HttpContext.Current.Session["ID"];

            try
            {
                BLL_Participation.supprimerUneParticipation(pers, course);
            }
            catch
            {
            }
            finally
            {
                Response.Redirect("~/PagesWeb/Participant/Courses/ListeCoursesDisponible.aspx");
            }
        }
 private void BindGrid()
 {
     GV_LISTE_COURSE.DataSource = BLL_Course.ListeCourses();
     GV_LISTE_COURSE.DataBind();
 }
Exemple #5
0
 private void BindGrid()
 {
     GV_LISTE_COURSE_DISPONIBLE.DataSource = BLL_Course.ListeCoursesDisponibles();
     GV_LISTE_COURSE_DISPONIBLE.DataBind();
 }
Exemple #6
0
 private void BindGrid()
 {
     GV_LISTE_COURSE_TERMINEE.DataSource = BLL_Course.ListeCoursesTerminees();
     GV_LISTE_COURSE_TERMINEE.DataBind();
 }