public ActionResult edit_others(MyMatch.Models.others.others ot) { if (string.IsNullOrEmpty(ot.Mother_name)) { ot.Mother_name = "Not provided yet"; } if (string.IsNullOrEmpty(ot.Father_name)) { ot.Father_name = "Not provided yet"; } var v = db2.other_infos.Where(r => r.username == ot.username); if (v.Count() > 0) { db2.Entry(ot).State = EntityState.Modified; db2.SaveChanges(); Thread.Sleep(1000); return RedirectToAction("others_Index", new { username = User.Identity.Name }); } else { db2.other_infos.Add(ot); db2.SaveChanges(); return RedirectToAction("others_Index", new { username = User.Identity.Name }); } }
public static void NextMatch(object match, out SqlInt32 n, out SqlString token) { MyMatch m = (MyMatch)match; n = m.index; token = m.text; }
public void TestMatch2() { StringMatch stringmatch = new StringMatch("abcdefghijk", "ab?d*fg*i?*"); MyMatch mymatch = stringmatch.Match(); Assert.IsTrue(mymatch.matched); }
private static void T_FinishedMatch(object sender, giMyMatchData.Args.WinnerEventArgs e) { Console.Clear(); MyMatch m = (MyMatch)sender; DisplayMatch.Display(m, null, null, e.winnerId); Console.WriteLine($"\n\nThe match has finished! The winner is {m[e.winnerId]} ! Congrats! \n\n"); }
private static void T_FinishedSet(object sender, giMyMatchData.Args.WinnerEventArgs e) { Console.Clear(); MyMatch m = (MyMatch)sender; DisplayMatch.Display(m, null, null, e.winnerId); Console.WriteLine($"\nA set has finished, the set winner is {m[e.winnerId]}\n"); }
private static void T_FinishedPoint(object sender, giMyMatchData.Args.WinnerEventArgs e) { Console.Clear(); MyMatch m = (MyMatch)sender; DisplayMatch.Display(m, e.winnerId, null, e.winnerId); Console.WriteLine($"\nA point has been made, the point maker is {m[e.winnerId]}\n"); }
public void RegisterNewCustomer() { Registration reg = new Registration(Driver); reg.Navigate(); reg.SelectPreference("Man seeking a Woman", "28201"); reg.EnterPersonelDetails(EmailAddress, "asdf1234", "Jan", "1", "1985", CustomerId); reg.NavigateToHome(); MyMatch myMatch = new MyMatch(Driver); myMatch.AssertWelcomeMessage(CustomerId); }
public void TestMatch() { StringMatch stringMatch = new StringMatch("32r4ABCojfDE0owejfoweurFoewrr8u", "ABC*DE*F"); MyMatch myMatch = stringMatch.SimpleMatch("A.C", 0); Assert.IsTrue(myMatch.matched); Assert.AreEqual(4, myMatch.start); Assert.AreEqual(6, myMatch.end); myMatch = stringMatch.Match(); Assert.IsTrue(myMatch.matched); Assert.AreEqual(4, myMatch.start); Assert.AreEqual(23, myMatch.end); stringMatch.Pattern = "ABC*DE*FG"; myMatch = stringMatch.Match(); Assert.IsFalse(myMatch.matched); }
public void AddUserToFav() { Login login = new Login(Driver); Assert.True(login.MatchLogin(ConfigurationManager.AppSettings["login_email"], "asdf1234")); MyMatch myMatch = new MyMatch(Driver); Random r = new Random(); string DynamicZip = "2820" + r.Next(1, 9).ToString(); myMatch.SearchMatches("I am a MAN looking for WOMEN", "25", "35", "100", DynamicZip); Search mySearch = new Search(Driver); mySearch.AddRandomUserToFav(); Fav myFav = new Fav(Driver); myFav.VerifyAddedFavCard(mySearch.SelectedUserName); login.SignOut(); }
private static void T_NewMatchCreated(object sender, MyMatch e) { Console.WriteLine("\nA match has been created \n" + e + "\n"); DisplayMatch.Display(e); //COMMENT S'ABBONNER AU MATCH? LE CODE EN BAS NE LE FAIT PAS CORRECTEMENT! ON S'ABONNE A UNE RÉFERENCE EXTERNE, PAS AU MATCH DEDANS LE TOURNOI! //Tournament t = sender as Tournament; //MyMatch m = (MyMatch) t.GetMatch(e.Joueurs[0], e.Joueurs[1]); //m.FinishedGame += T_FinishedGame; //m.FinishedMatch += T_FinishedGame; //m.FinishedPoint += T_FinishedPoint; //m.FinishedSet += T_FinishedSet; e.FinishedGame += T_FinishedGame; e.FinishedMatch += T_FinishedMatch; e.FinishedPoint += T_FinishedPoint; e.FinishedSet += T_FinishedSet; Thread.Sleep(1000); }