Esempio n. 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;
        }
    }
Esempio n. 2
0
    //private DataTable DbSelectEvents(DateTime start, DateTime end)
    //{
    //    SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM [event] WHERE NOT (([eventend] <= @start) OR ([eventstart] >= @end))", ConfigurationManager.ConnectionStrings["DayPilot"].ConnectionString);
    //    da.SelectCommand.Parameters.AddWithValue("start", start);
    //    da.SelectCommand.Parameters.AddWithValue("end", end);

    //    DataTable dt = new DataTable();
    //    da.Fill(dt);
    //    return dt;
    //}

    #region Tooltip
    //protected void DayPilotBubble1_RenderContent(object sender, RenderEventArgs e)
    //{
    //    if (e is RenderResourceBubbleEventArgs)
    //    {
    //        RenderResourceBubbleEventArgs re = e as RenderResourceBubbleEventArgs;
    //        e.InnerHTML = "<b>Resource header details</b><br />Value: " + re.ResourceId;
    //    }
    //    else if (e is RenderCellBubbleEventArgs)
    //    {
    //        RenderCellBubbleEventArgs re = e as RenderCellBubbleEventArgs;
    //        e.InnerHTML = "<b>Cell details</b><br />Resource:" + re.ResourceId + "<br />From:" + re.Start + "<br />To: " + re.End;
    //    }
    //}
    protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
    {
        DataTable dt      = (DataTable)Session["Event"];
        DataView  dvEvent = dt.DefaultView;

        dvEvent.RowFilter = "id = " + e.Value;
        string poNo   = dvEvent[0][1].ToString();
        string ordNo  = dvEvent[0][2].ToString();
        string artNo  = dvEvent[0][3].ToString();
        string gType  = dvEvent[0][4].ToString();
        string lineno = dvEvent[0][7].ToString();
        //DateTime sewDt = DateTime.Parse(dvEvent[0][5].ToString());
        DateTime xDt = DateTime.Parse(dvEvent[0][9].ToString());
        //int lineQty = int.Parse(dvEvent[0][10].ToString());

        DataTable dtTool = (DataTable)Session["ToolInfo"];
        DataView  dvTool = dtTool.DefaultView;

        dvTool.RowFilter = "PoNo = '" + poNo + "' and Line = '" + lineno + "'";
        if (dvTool.Count > 0)
        {
            string ordQty    = dvTool[0][2].ToString();
            string lineQty   = dvTool[0][3].ToString();
            string ProdQty   = dvTool[0][4].ToString();
            string targetQty = dvTool[0][5].ToString();
            int    remDay    = int.Parse(dvTool[0][6].ToString());
            int    remQty    = int.Parse(lineQty) - int.Parse(ProdQty);
            int    reqTarget = remQty / remDay;
            e.InnerHTML = "<b>Line: " + e.ResourceId + "</b><br />Style No: " + ordNo + "</b><br />Article No: " + artNo + "</b><br />Garments Type: " + gType + "</b><br />X-Factory Date: " + xDt + "<br />Order Qty: " + ordQty + "<br />Line Total Qty: " + lineQty + "<br />Production Qty: " + ProdQty + "<br />Remain Qty: " + remQty.ToString() + "<br />Target Qty: " + targetQty + "<br />Req. Target Qty: " + reqTarget.ToString();
        }
    }
Esempio n. 3
0
 protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
 {
     e.InnerHTML = string.Format("<b>{0}</b><br />Start: {1} <br/>End: {2}<br/>Event description.",
                                 e.Text,
                                 TimeFormatter.GetHourMinutes(e.Start, DayPilotCalendar1.TimeFormat),
                                 TimeFormatter.GetHourMinutes(e.End, DayPilotCalendar1.TimeFormat));
 }
Esempio n. 4
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.";
     }
 }
Esempio n. 5
0
    protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
    {
        StringBuilder sb = new StringBuilder();

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

        e.InnerHTML = sb.ToString();
    }
Esempio n. 6
0
    protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.AppendFormat("<b>{0}</b><br />", e.Text);
        sb.AppendFormat("Start: {0}<br />", e.Start.ToString(DayPilotScheduler1.DateTimeFormatInfo.FullDateTimePattern, DayPilotScheduler1.DateTimeFormatInfo));
        sb.AppendFormat("End: {0}<br />", e.End.ToString(DayPilotScheduler1.DateTimeFormatInfo.FullDateTimePattern, DayPilotScheduler1.DateTimeFormatInfo));
        sb.AppendFormat("<br />");

        e.InnerHTML = sb.ToString();
    }
Esempio n. 7
0
        protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendFormat("<b>{0}</b><br />", e.Text);
            sb.AppendFormat("Start: {0}<br />", e.Start);
            sb.AppendFormat("End: {0}<br />", e.End);
            sb.AppendFormat("<br />");
            sb.AppendFormat("<b>Double-click the event to enter inline edit mode.</b>");

            e.InnerHTML = sb.ToString();
        }
Esempio n. 8
0
    protected void DayPilotBubble1_RenderEventBubble(object sender, RenderEventBubbleEventArgs e)
    {
        DataTable     dt = getAllotVehicleData(e.Value);
        StringBuilder sb = new StringBuilder();

        sb.AppendFormat("VIN/VRN: {0}<br />", dt.Rows[0]["RegNo"].ToString());
        sb.AppendFormat("Emp Name: {0}<br />", dt.Rows[0]["EmpName"].ToString());
        sb.AppendFormat("In Time: {0}<br />", e.Start);
        sb.AppendFormat("Out Time: {0}<br />", e.End);
        sb.AppendFormat("Allot Time: {0}<br />", dt.Rows[0]["AllotTime"].ToString());
        sb.AppendFormat("PDT: {0}<br />", dt.Rows[0]["PromisedTime"].ToString());
        sb.AppendFormat("<br />");
        e.InnerHTML = sb.ToString();
    }
        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
        }
Esempio n. 10
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.";
     }
     else if (e is RenderResourceBubbleEventArgs)
     {
         RenderResourceBubbleEventArgs re = e as RenderResourceBubbleEventArgs;
         e.InnerHTML = "<b>Resource header details</b><br />Value: " + re.ResourceId;
     }
     else if (e is RenderCellBubbleEventArgs)
     {
         RenderCellBubbleEventArgs re = e as RenderCellBubbleEventArgs;
         e.InnerHTML = "<b>Cell details</b><br />Resource:" + re.ResourceId + "<br />From:" + re.Start + "<br />To: " + re.End;
     }
 }