Exemplo n.º 1
0
        public void ShowActFuelCard()
        {
            WordDoc wordDoc = openDocumentWord("Акт передачи топливной карты");

            FuelCardDriverList fuelCardDriverList = FuelCardDriverList.getInstance();

            Driver driverTo            = driverList.getItem(Convert.ToInt32(_invoice.DriverToID));
            List <FuelCardDriver> list = fuelCardDriverList.ToList(driverTo);

            Regions regions    = Regions.getInstance();
            string  regionName = regions.getItem(Convert.ToInt32(_invoice.RegionToID));

            int i = 1;

            foreach (FuelCardDriver fuelCardDriver in list)
            {
                wordDoc.AddRowInTable(1, i.ToString(), driverTo.GetName(NameType.Full), regionName, fuelCardDriver.FuelCard.Number);
                wordDoc.AddRowInTable(2, i.ToString(), driverTo.GetName(NameType.Full), regionName, fuelCardDriver.FuelCard.Number, fuelCardDriver.FuelCard.Pin);

                i++;
            }

            if (list.Count == 1)
            {
                wordDoc.setValue("Количество карт", "1 (одна) карта.");
            }
            else if (list.Count == 2)
            {
                wordDoc.setValue("Количество карт", "2 (две) карты.");
            }
            else if (list.Count != 0)
            {
                wordDoc.setValue("Количество карт", list.Count.ToString() + "карт(ы).");
            }

            wordDoc.Show();
        }
Exemplo n.º 2
0
        public void ShowProxyOnSTO()
        {
            WordDoc wordDoc = CreateProxyOnSTO();

            wordDoc.Show();
        }