コード例 #1
0
        private void btnGeriDon_Click(object sender, EventArgs e)
        {
            frmSekreterDetay frm = new frmSekreterDetay();

            this.Hide();
            frm.Show();
        }
コード例 #2
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            string     query = "SELECT * FROM TBLSekreter WHERE SekreterTC=@sekretertc AND SekreterSifre=@sekretersifre";
            SqlCommand cmd   = new SqlCommand(query, ctx.Baglanti());

            cmd.Parameters.AddWithValue("@sekretertc", mskTC.Text);
            cmd.Parameters.AddWithValue("@sekretersifre", txtSifre.Text);
            SqlDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                frmSekreterDetay frm = new frmSekreterDetay();
                frm.TC = mskTC.Text;
                frm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Lütfen bilgilerini kontrol ediniz!", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            ctx.Baglanti().Close();
        }