private void Login_Btn_Click(object sender, EventArgs e) { MuhasebeEntities m_Context = new MuhasebeEntities(); User m_User = m_Context.Users.Where(q => q.Email == this.Email_Text.Text && q.Password == this.Password_Text.Text).FirstOrDefault(); if (m_User != null) { this.Email_Text.Enabled = false; this.Password_Text.Enabled = false; if (Remind_Check.Checked) { Settings.Default.Email = this.Email_Text.Text; Settings.Default.Password = this.Password_Text.Text; Settings.Default.CheckState = this.Remind_Check.Checked; Settings.Default.Save(); } Program.User = m_User; UserLogonEventArgs m_Args = new UserLogonEventArgs(); m_Args.User = m_User; m_Args.LogonAt = DateTime.Now; EventSink.InvokeUserLogon(sender, m_Args); this.Close(); } else { MessageBox.Show("Girdiğiniz email adresi veya şifreniz yanlış.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error); Email_Text.Clear(); Password_Text.Clear(); } }
/* driver.FindElement(By.CssSelector(".datepicker-days .next > .glyphicon")).Click(); * { * var element = driver.FindElement(By.CssSelector(".datepicker-days .next > .glyphicon")); * Actions builder = new Actions(driver); * builder.DoubleClick(element).Perform(); * } */ public void RegistrationPage() { CommonUtils cookieIgnore = new CommonUtils(driver); cookieIgnore.RejectAll_Cookies(); SignIn_Page.Click(); Excel_Suite userEmail = new Excel_Suite(Env.EXCEL_TEST_URL); userEmail.getCellData("SPP_TestData", true); Email_Text.SendKeys(Env.Email_Id); Password_Text.SendKeys("Test@123"); WebDriverWait wait = new WebDriverWait(driver, System.TimeSpan.FromSeconds(800)); Thread.Sleep(800); Submit.Click(); dropdown_NCS.Click(); NCS_Tab.Click(); RetrieveCHICK.Click(); Excel_Suite childDataExcel = new Excel_Suite(Env.EXCEL_TEST_CHILD_DATA); ChildAward_Data ChildData = childDataExcel.GetChildDetails(Env.EXCEL_TEST_CHILD_DATA); Eyp_firstname.SendKeys(ChildData.ChildFirstName); Eyp_lastname.SendKeys(ChildData.ChildLastName); DateOfBirth.SendKeys(ChildData.DateOfBirth); Eyp_chic.SendKeys(ChildData.ChildIdentifierCode); NextButton.Click(); StartDate.SendKeys(""); EndDate.SendKeys(""); NextButton.Click(); Claimedhours.SendKeys("4"); }