Example #1
0
        /// <summary>
        /// Usuwa zlecenie  z bazy oraz katalog wraz zplikami zawartymi w nim
        /// </summary>
        public void DeleteNewOrders()
        {
            FotoAppRAll all = FotoAppRAll.Ins;

            all.Orders.Delete(_orders);
            all.Orders.Save();
            Directory.Delete(_finalPath, true);
        }
Example #2
0
        /// <summary>
        /// Tworzy nowe zlecenie w bazie danych
        /// </summary>
        public void CreateNewOrders()
        {
            FotoAppRAll all = FotoAppRAll.Ins;

            _orders      = new Orders();
            _orders.Date = DateTime.Today;
            all.Orders.Add(_orders);
            all.Save();
        }
Example #3
0
        static void Main(string[] args)
        {
            FotoAppRAll cont = FotoAppRAll.Ins;

            var cos1 = cont.Types.GetAll(true);
            var cos2 = cont.Sizes.GetSizesByType(cos1[0], true);

            cont.Settings.CheckLangSettings();


            //Addsetings(all); //dodaje setings
            foreach (var e in cos1)
            {
                try
                {
                    Console.WriteLine(@"{0} {1}", e.TypeID, cont.TypeTexts.GetTypeTextByTypeALang(e, new Languages()
                    {
                        Language = "en"
                    }).Text);
                }
                catch (Exception exception)
                {
                    Console.WriteLine(@"{0} dfgkjgfdkfgdg", e.TypeID);
                }
            }



            foreach (Types aa in cos1)
            {
                Console.WriteLine(aa.TypeID.ToString());
                Console.WriteLine(aa.TypeTexts.ToString());
            }
            Console.WriteLine(cont.SizeTexts.GetSizeTextBySizeALang(new Sizes()
            {
                Height = 900, Length = 1300
            }, new Languages()
            {
                Language = "pl_PL"
            }).Text);

            cont.Settings.CheckLangSettings();
            var cos = cont.Settings.GetAll();

            foreach (var e in cos)
            {
                Console.WriteLine(e.Value);
            }
            Console.WriteLine(cont.Languages);



            Console.ReadKey();
        }
Example #4
0
        public void AddFoto()
        {
            _foto         = new Fotos();
            _foto.Name    = _nameFoto;
            _foto.OrderID = NewOrder.New_Order.GetNewOrders().OrderID;
            FotoAppRAll all = FotoAppRAll.Ins;

            all.Fotos.Add(_foto);
            all.Fotos.Save();
            _foto = all.Fotos.Get(_foto);
        }
Example #5
0
        /// <summary>
        /// tworzy nowe orderfotos
        /// </summary>
        /// <param name="all"></param>
        private void CreateOrder(FotoAppRAll all)
        {
            var o     = NewOrder.New_Order;
            var order = o.GetNewOrders();

            _orderFoto          = new OrderFotos();
            _orderFoto.FotoID   = all.Fotos.Get(_foto).FotoID;
            _orderFoto.Quantity = _quantity;
            _orderFoto.TypeID   = _paper.TypeID;
            _orderFoto.Height   = _paper.Height;
            _orderFoto.Width    = _paper.Width;
        }
Example #6
0
 private static void Addsetings(FotoAppRAll all)
 {
     //Settings s = new Settings() { Area = "lang", Target = "pl_en", Value = "pl_PL" };
     //var s = all.Settings.Get()
     //all.Settings.Update(s);
 }