private void button1_Click(object sender, EventArgs e)
        {
            İslemsoru a = new İslemsoru();

            a.Show();
            this.Hide();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            baglan1.Open();
            int a = bakiyedon(Form1.no);
            int b = Convert.ToInt16(textBox1.Text);

            SqlCommand komut = new SqlCommand("Update Bilgiler set Bakiye='" + (a + b) + "'  where KartNo=" + Form1.no + "", baglan1);

            komut.ExecuteNonQuery();
            İslemsoru i = new İslemsoru();

            i.Show();
            this.Hide();


            baglan1.Close();
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            baglan.Open();
            if ((Form1.bakiye - Convert.ToInt32(textBox2.Text)) < 0)
            {
                label3.Text = "hata"; baglan.Close();
            }
            else
            {
                int x;
                x = hedefBakiye(Convert.ToInt32(textBox1.Text)) + Convert.ToInt32(textBox2.Text);
                SqlCommand komut = new SqlCommand("Update Bilgiler set Bakiye='" + x + "' where KartNo=" + textBox1.Text + "", baglan);
                komut.ExecuteNonQuery();
                SqlCommand komut2 = new SqlCommand("Update Bilgiler set Bakiye='" + (Form1.bakiye - Convert.ToInt32(textBox2.Text)) + "' where Kartno=" + Form1.no + "", baglan);
                komut2.ExecuteNonQuery();

                İslemsoru a = new İslemsoru();
                a.Show();
                this.Hide();
                baglan.Close();
            }
        }