예제 #1
0
        //ToString returns string with info about the contract
        public override string ToString()
        {
            string result = "";

            result += string.Format("Number Of Contract:{0}\n", NumberOfContract);
            result += string.Format("Nunny ID:{0}\n", NunnyID);
            result += string.Format("Mother ID:{0}\n", MotherID);
            result += string.Format("Child ID:{0}\n", ChildID);
            result += string.Format("Was there Interview?{0}\n", IsInterview);
            result += string.Format("Rate for Hour: {0}\n", RateforHour);
            result += string.Format("Rate for Month: {0}\n", RateforMonth);
            result += string.Format("Is there any more children in the nunny? {0}\n", IsMorechilds);
            result += "Work Time:\n";
            foreach (var item in WorkTime)  //loop over days in week
            {
                result += "day: " + item.Key + "   \t";
                result += "hours " + ((((item.Value.Key) / 100) < 10) ? ("0") : (null)) + ((item.Value.Key) / 100);
                result += ":" + ((((item.Value.Key) % 100) < 10) ? "0" : (null)) + (item.Value.Key) % 100 + " - ";
                result += ((((item.Value.Value) / 100) < 10) ? ("0") : (null)) + (item.Value.Value) / 100;
                result += ":" + ((((item.Value.Value) % 100) < 10) ? "0" : (null)) + (item.Value.Value) % 100 + '\n';
            }
            result += string.Format("Date of Start:{0}\n", DateStart.ToShortDateString());
            result += string.Format("Date of End: {0}\n", DateEnd.ToShortDateString());
            result += string.Format("Hours Of Contract: {0}\n", HoursOfContractMonth);
            return(result);
        }
 public virtual string PrintTicket()
 {
     return(String.Format(
                "ID: {0}\n" +
                "Event: {1}\n" +
                "Location: {2}\n" +
                "Price: {3:C}\n" +
                "Date: {4} - {5}\n",
                TicketID, EventName, Location, Price, DateStart.ToShortDateString(), DateEnd.ToShortDateString()
                ));
 }
예제 #3
0
 public override string ToString()
 {
     return($"Id: {Id}; ClientId: {ClientId}; OptionId: {OptionId}; DateStart: {DateStart.ToShortDateString()}; " +
            $"DateFinish: {DateFinish.ToShortDateString()};");
 }
예제 #4
0
 public override string ToString() => $"{Priority} {DateStart.ToShortDateString()} | {Name} | {DateStart.ToShortTimeString()} - {DateEnd.ToShortTimeString()}";
예제 #5
0
파일: StGame.cs 프로젝트: geddar2010/new
 public override string ToString()
 {
     return($"{DateStart.ToShortDateString()} {DateStart.ToShortTimeString()} ({P1.Home}:{P1.Away}, {P2.Home}:{P2.Away}, {P3.Home}:{P3.Away}, {P4.Home}:{P4.Away}{(OT.Both > 0 ? ", " + OT.Home + ":" + OT.Away : "")}) ({Total.Home}:{Total.Away}) ({(Total.BothIsOdd ? "нечет" : "чет")})");
 }