示例#1
0
    protected void DayPilotBubble1_RenderContent(object sender, RenderEventArgs e)
    {
        if (e is RenderEventBubbleEventArgs)
        {
            RenderEventBubbleEventArgs re = e as RenderEventBubbleEventArgs;

            StringBuilder sb = new StringBuilder();
            sb.AppendFormat("<b>{0}</b><br />", re.Text);
            sb.AppendFormat("Start: {0}<br />", re.Start);
            sb.AppendFormat("End: {0}<br />", re.End);

            //re.InnerHTML = "<b>Event details</b><br />Here is the right place to show details about the event with ID: " + re.Value + ". This text is loaded dynamically from the server.<br/>";
            re.InnerHTML = sb.ToString();
        }
        else if (e is RenderTimeBubbleEventArgs)
        {
            RenderTimeBubbleEventArgs re = e as RenderTimeBubbleEventArgs;
            e.InnerHTML = "<b>Time header details</b><br />From:" + re.Start + "<br />To: " + re.End;
        }
        else if (e is RenderCellBubbleEventArgs)
        {
            RenderCellBubbleEventArgs re = e as RenderCellBubbleEventArgs;
            e.InnerHTML = "<b>Cell details</b><br />Column:" + re.ResourceId + "<br />From:" + re.Start + "<br />To: " + re.End;
        }
    }
        protected void BubbleFicheBord_RenderContent(object sender, RenderEventArgs e)
        {
            #region initialisation
            crlAutorisationDepart autorisationDepart = null;
            //crlFicheBord ficheBord = null;
            string nombrePlaceLibre = "0";
            #endregion

            #region implementation
            if (e is RenderEventBubbleEventArgs)
            {
                RenderEventBubbleEventArgs re = e as RenderEventBubbleEventArgs;

                StringBuilder sb = new StringBuilder();

                autorisationDepart = serviceAutorisationDepart.selectAutorisationDepart(re.Value);
                //ficheBord = serviceFicheBord.selectFicheBord(re.Value);


                if (autorisationDepart != null)
                {
                    nombrePlaceLibre = servicePlaceFB.getNombrePlaceLibre(autorisationDepart.ficheBord.NumerosFB);

                    sb.AppendFormat("<div class='divBubble'>");

                    sb.AppendFormat("<b>Heure de départ:</b> {0}<br />", re.Start.ToString("HH:mm"));
                    sb.AppendFormat("<b>Autorisation de voyage:</b> {0}<br />", autorisationDepart.ficheBord.autorisationVoyage.NumerosAV + " du " + autorisationDepart.ficheBord.autorisationVoyage.DatePrevueDepart.ToString("dd MMMM yyyy"));
                    sb.AppendFormat("<b>Vehicule:</b> {0}<br />", autorisationDepart.ficheBord.autorisationVoyage.Verification.Licence.vehicule.MarqueVehicule + " " + autorisationDepart.ficheBord.autorisationVoyage.Verification.Licence.vehicule.CouleurVehicule + " " + autorisationDepart.ficheBord.autorisationVoyage.Verification.Licence.vehicule.MatriculeVehicule);
                    sb.AppendFormat("<b>Chauffeur:</b> {0}<br />", autorisationDepart.ficheBord.autorisationVoyage.Verification.Chauffeur.prenomChauffeur + " " + autorisationDepart.ficheBord.autorisationVoyage.Verification.Chauffeur.nomChauffeur);
                    sb.AppendFormat("<b>Itineraire:</b> {0}<br />", autorisationDepart.ficheBord.autorisationVoyage.Verification.Itineraire.villeD.NomVille + "-" + autorisationDepart.ficheBord.autorisationVoyage.Verification.Itineraire.villeF.NomVille);
                    sb.AppendFormat("<b>Poids autorisé:</b> {0}<br />", autorisationDepart.ficheBord.autorisationVoyage.Verification.Licence.vehicule.PoidsTotalVehicule + "Kg");
                    sb.AppendFormat("<b>Nombre de place libre:</b> {0}<br />", nombrePlaceLibre);

                    sb.AppendFormat("</div>");
                }

                re.InnerHTML = sb.ToString();
            }
            else if (e is RenderTimeBubbleEventArgs)
            {
                RenderTimeBubbleEventArgs re = e as RenderTimeBubbleEventArgs;
                e.InnerHTML = "<div class='divBubble'><b>Date:</b>" + re.Start.ToString("dd MMMM yyyy") + "</div>";
            }
            #endregion
        }
示例#3
0
 protected void DayPilotBubble1_RenderContent(object sender, RenderEventArgs e)
 {
     if (e is RenderEventBubbleEventArgs)
     {
         RenderEventBubbleEventArgs re = e as RenderEventBubbleEventArgs;
         re.InnerHTML = "<b>Event details</b><br />Here is the right place to show details about the event with ID: " + re.Value + ". This text is loaded dynamically from the server.<br/>";
     }
     else if (e is RenderTimeBubbleEventArgs)
     {
         RenderTimeBubbleEventArgs re = e as RenderTimeBubbleEventArgs;
         e.InnerHTML = "<b>Time header details</b><br />From:" + re.Start + "<br />To: " + re.End;
     }
     else if (e is RenderCellBubbleEventArgs)
     {
         RenderCellBubbleEventArgs re = e as RenderCellBubbleEventArgs;
         e.InnerHTML = "<b>Cell details</b><br />Column:" + re.ResourceId + "<br />From:" + re.Start + "<br />To: " + re.End;
     }
 }