public override string ToString()
 {
     if (EndDate == default)
     {
         return(Name + ": " + BeginDate.ToShortDateString());
     }
     else
     {
         return(Name + ": " + BeginDate.ToShortDateString() + "until " + EndDate.ToShortDateString());
     }
 }
Example #2
0
        public override string toFullString()
        {
            StringBuilder _sb = new StringBuilder();

            _sb.Append(BeginDate.ToShortDateString());
            _sb.Append(" begin - ");
            _sb.Append(EndDate.ToShortDateString());
            _sb.Append(" end; ");
            _sb.Append(Code);
            _sb.Append(Environment.NewLine);
            _sb.Append(_customer.ID);
            _sb.Append(Environment.NewLine);
            foreach (Product _product in ProductsToMove)
            {
                _sb.Append(_product.toFullString());
                _sb.Append(Environment.NewLine);
            }

            return(_sb.ToString());
        }
Example #3
0
 public override string ToString()
 {
     return($"{Name}:\t{BeginDate.ToShortDateString()}\t:\t{(EndDate.HasValue ? EndDate.Value.ToShortDateString() : "Present")}");
 }