Beispiel #1
0
        /*Виртуальный метод возврата строки для таблицы*/
        protected internal override ListViewItem GetListViewItem()
        {
            var item = new ListViewItem(Num);

            item.SubItems.Add(BarCode);
            item.SubItems.Add(CreateDate.ToShortDateString());
            item.SubItems.Add(Organization);
            item.SubItems.Add(GetTypeString());
            item.SubItems.Add(Sum.ToString());
            item.SubItems.Add(GetStatusString());
            item.UseItemStyleForSubItems = false;
            item.SubItems[4].ForeColor   = GetColor();
            return(item);
        }
Beispiel #2
0
 /// <summary>
 /// Displays invoice on console
 /// </summary>
 public void DisplayInvoice()
 {
     Console.WriteLine($"\nINVOICE: {RefNumber}");
     Console.WriteLine($"ISSUED ON: {CreateDate.DayOfWeek.ToString()} {CreateDate.ToShortDateString()}");
     Console.WriteLine($"CUSTOMER: {Customer.Name}");
     Console.WriteLine($"CONTACT: {Customer.Contact}");
     Console.WriteLine($"ADDRESS: {Customer.Address}");
     Console.WriteLine("---------------------------------------------------------------------------------------------------------");
     Console.WriteLine($"{"DATE", -20}\t|\t" +
                       $"{"SERVICE",-10}\t|\t" +
                       $"HOURS\t|\t" +
                       $"RATE PER HOUR\t|\t" +
                       $"COST");
     Console.WriteLine("---------------------------------------------------------------------------------------------------------");
     foreach (var item in items)
     {
         item.DisplayItem();
     }
     Console.WriteLine("---------------------------------------------------------------------------------------------------------");
     Console.WriteLine($"TOTAL: R{Total:0.00} payable on {DueDate.DayOfWeek.ToString()} {DueDate.Date.ToShortDateString()}\n");
 }
 public override string ToString()
 {
     return("№ " + ShortNumber + " от " + CreateDate.ToShortDateString());
 }
 /// <summary>
 /// Вывод информации о департаменте
 /// </summary>
 /// <param name="num"></param>
 public void Print(int num)
 {
     Console.WriteLine($"{num, 3} {Name, 20} {CreateDate.ToShortDateString(), 10} {WorkerCount, 10} чел");
 }