static void Main(string[] args) { var user = new UserApp(); var advertisement = new AdvertisementDB(); try { var i = user.Validaion(""); //var add = user.Add( //new User //{ // email = "*****@*****.**", // name = "mohannad", // tokens = new List<Token> // { // new Token { // expierdDate = DateTime.Now.ToUniversalTime(), // token = "ASDFGHJKL" // } // } // //}); var r = Check(true); //// r.Bind(Check(true)); // var re = r.Match( // Left: l =>l.Map((a)=>"",""), // Right: r => $"The result is: {r}"); //Console.WriteLine(re); advertisement.Add(new Advertisement { title = "", border = new List <Border> { new Border { IsStreet = false, direction = "" } } } ); //var DeleteByID = user.DeleteByID("5ecc56c2609b036c58066ef1"); //var addtoken = user.CreateToken(new Token {token = "jkfjkfjkfjkfj", expierdDate = DateTime.Now.ToUniversalTime() }, "5ecc57aca0c0e69ad86c4fec"); //Console.WriteLine(DeleteByID); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void добавитьќбъ¤влениеToolStripMenuItem_Click(object sender, EventArgs e) { paginator.ShowRowsChanges -= Paginator_ShowRowsChanges; AddAdvertisementForm addAdvertisementForm = new AddAdvertisementForm(dB, categoryDB, subCategoryDB, countryDB, cityDB, discoveredDB, dB.Add(), 1); addAdvertisementForm.ShowDialog(); dB.Save(); }