Ejemplo n.º 1
0
        public string ToEdit(bool titre = false)
        {
            string texte = "";

            string[] Listetournée = new string[] { "2.9", "1.2" };

            StringBuilder stringBuilder = new StringBuilder();
            string        s1            = Enum.GetName(typeof(EnumCourse), Sens);
            // string s2 = Listetournée[Tournée];
            string s2 = "";
            string s3 = $"{Départ.Hours,2}:{Départ.Minutes,2}";
            string s4 = $"{Arrivée.Hours,2}:{Arrivée.Minutes,2}";

            if (titre)
            {
                texte += "|   Date    |      |Tourné | Dep. | Arr. |\r\n";
            }
            texte += $"|{ Jour.ToShortDateString(),11}|{ s1,6}|{ s2,7}|{ s3,6}|{s4,6}|\r\n";

            /*
             * foreach (var item in Etapes)
             * {
             *   texte += $"|          |      |{item.IdEtape,7}|{item.Heure,12}|\r\n";
             * }
             */
            return(texte);
        }
Ejemplo n.º 2
0
        public override string ToString()
        {
            string texte = "";

            texte  = $"jour:{Jour.ToShortDateString()},";
            texte += $"sens:{Sens.ToString()},";
            texte += $"départ de {IdDépart} a {Départ.ToString()},";
            texte += $"arrivé a {IdArrivée} a {Arrivée.ToString()},";
            return(texte);
        }
Ejemplo n.º 3
0
        public override string ToString()
        {
            string texte = "";

            texte  = $"jour:{Jour.ToShortDateString()},";
            texte += $"sens:{Sens.ToString()},";
            texte += $"départ:{Départ.ToString()},";
            texte += $"arrivé:{Arrivée.ToString()},";
            texte += $"effectif:{Effectif.ToString()}";
            return(texte);
        }
Ejemplo n.º 4
0
        public string ToFiche()
        {
            string RN    = "\r\n";
            string texte = "---- Course -----" + RN;

            texte += $"Jour : {Jour.ToShortDateString()}{RN}";
            texte += $"Sens : {Enum.GetName(typeof(EnumSens),Sens)}{RN}";
            texte += $"Départ : {Départ.ToStringFormat()}{RN}";
            texte += $"Arrivé : {Arrivée.ToStringFormat()}{RN}";
            // texte += $"Effectif : {Effectif}{RN}";
            texte += "Détail " + RN;

            foreach (var item in Etapes)
            {
                texte += "\t" + item.ToFiche() + RN;
            }
            return(texte);
        }