1 回答

TA貢獻(xiàn)1909條經(jīng)驗(yàn) 獲得超7個(gè)贊
這就是我設(shè)法解決問題的方法我記得電子郵件的登錄部分
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(constr);
SqlDataAdapter da = new SqlDataAdapter("Select count(*) from Clienti where email='" + textBox1.Text + "' and Parola='" + textBox2.Text + "'", con);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows[0][0].ToString() == "1")
{
client.email = textBox1.Text;
this.Hide();
Form4 ssss = new Form4();
ssss.Show();
}
else MessageBox.Show("verifica datele");
}
在下一個(gè)表格中
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(constr);
SqlDataAdapter da = new SqlDataAdapter();
con.Open();if (s < 250) label_mesaj.Text = "1800";
da.UpdateCommand = new SqlCommand("Update Clienti set kcal_zilnice= '" + label_mesaj.Text + "' where email= '" + Form3.client.email.ToString() + "'", con);
da.UpdateCommand.ExecuteNonQuery();
da.UpdateCommand.Dispose();
con.Close();
}
- 1 回答
- 0 關(guān)注
- 101 瀏覽
添加回答
舉報(bào)