/// <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); }
/// <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(); }
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(); }
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); }
/// <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; }
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); }