private void AracDetayDuzenle_geri_Click(object sender, EventArgs e) { PersonelPanel PersonelPanel = new PersonelPanel(); //PersonelPanel.Show(); this.Hide(); }
private void AracDetayGoster_geri_Click(object sender, EventArgs e) { PersonelPanel PersonelPanel = new PersonelPanel(); this.Hide(); }
private void PersonelEkleSil_geri_Click(object sender, EventArgs e) { PersonelPanel PersonelPanel = new PersonelPanel(); this.Hide(); }
private void button_Loginn(object sender, EventArgs e) { SqlConnection con; SqlCommand cmd; SqlDataReader dr; string user = textBox_Personelid.Text; string pass = textBox_PersonelParola.Text; string islem = "select Id from tbl_Personel where Email = '" + textBox_Personelid.Text + "'"; string id = SqlConn.Id_Deger(islem); try { string sorgu = "select Durum from ParolaYenile where Personel_Id='" + id + "' and Durum= '" + 'A' + "'"; DataTable dtbl = SqlConn.goster(sorgu); string durum = dtbl.Rows[0]["Durum"].ToString();; if (durum == "A") { MessageBox.Show("Daha önce parola yenileme isteği yolladınız, Lütfen mailinizi kontrol ediniz."); SifreYenileme sfr = new SifreYenileme(); sfr.id = id; sfr.Show(); //this.Hide(); } else { con = new SqlConnection("Data Source=DESKTOP-7L6TOHU;Initial Catalog=OtokondriOtomasyon;Persist Security Info=True;User ID=sa;Password=123456789"); cmd = new SqlCommand(); con.Open(); cmd.Connection = con; cmd.CommandText = "SELECT * FROM tbl_Personel where Email='" + textBox_Personelid.Text + "' AND Parola='" + textBox_PersonelParola.Text + "'"; dr = cmd.ExecuteReader(); if (dr.Read()) { PersonelPanel PersonelPanelsec = new PersonelPanel(); PersonelPanelsec.personelid = textBox_Personelid.Text; PersonelPanelsec.Show(); this.Hide(); } else { MessageBox.Show("Email veya şifrenizi kontrol ediniz."); } con.Close(); } } catch { con = new SqlConnection("Data Source=DESKTOP-7L6TOHU;Initial Catalog=OtokondriOtomasyon;Persist Security Info=True;User ID=sa;Password=123456789"); cmd = new SqlCommand(); con.Open(); cmd.Connection = con; cmd.CommandText = "SELECT * FROM tbl_Personel where Email ='" + textBox_Personelid.Text + "' AND Parola='" + textBox_PersonelParola.Text + "'"; dr = cmd.ExecuteReader(); if (dr.Read()) { PersonelPanel PersonelPanelsec = new PersonelPanel(); PersonelPanelsec.personelid = textBox_Personelid.Text; PersonelPanelsec.Show(); this.Hide(); } else { MessageBox.Show("Email veya şifrenizi kontrol ediniz."); } con.Close(); } }