Esempio n. 1
0
        public void Print()
        {
            Workbook  xlWB  = CreateAndGetWorkSheet(out Microsoft.Office.Interop.Excel.Application xlApp);
            Worksheet xlSht = xlWB.ActiveSheet;

            if (IsStudy)
            {
                Price -= 1;
            }
            if (IsVIP)
            {
                xlSht.Cells[2, "H"] = "VIP";
                Price += 10;
            }

            xlSht.Cells[2, "F"] = NumberTicket.ToString();
            xlSht.Cells[3, "D"] = FilmName.ToString();
            xlSht.Cells[6, "H"] = Price.ToString();
            xlSht.Cells[7, "H"] = Discount.ToString();
            xlSht.Cells[7, "C"] = Notes;
            xlSht.Cells[6, "C"] = ClientFIO;
            xlSht.Cells[4, "C"] = Director;
            xlSht.Cells[5, "C"] = Country;

            xlWB.Close(true);
            xlApp.Quit();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            NumberTicket nt = new NumberTicket();

            for (int i = 0; i < 10; i++)
            {
                new Thread(new ThreadStart(nt.GiveNumber)).Start();
            }
        }