Пример #1
2
        public void CreateOrder()
        {
            ContactPerson cp = new ContactPerson();
            cp.FirstName = "Jarosav";
            cp.LastName = "Runcik";
            cp.Email = "*****@*****.**";
            cp.PhoneNumber = "+420 602 658 348";

            cp.Save();

            PaperType paperType = new PaperType();
            paperType.Color = System.Drawing.Color.Blue;
            paperType.Type = "Stitek";

            paperType.Save();

            Proofsheet proofsheet = new Proofsheet();
            proofsheet.Time = DateTime.Now;
            proofsheet.Passed = true;

            proofsheet.Save();

            try
            {
                Order order = new Order();

                order.Contact = cp;
                order.Format = TiskarnaVosahlo.PaperFormats.GetFormat("A4");
                order.PaperType = paperType;
                order.Proofsheet = proofsheet;

                order.Save();
                order.Delete();
            }
            finally
            {
                proofsheet.Delete();
                paperType.Delete();
                cp.Delete();
            }
        }
Пример #2
0
        public void CreateContext()
        {
            Proofsheet proofsheet = new Proofsheet();
            proofsheet.Time = DateTime.Now;
            proofsheet.Passed = true;

            proofsheet.Save();
            proofsheet.Delete();
        }