1 回答
TA贡献1909条经验 获得超7个赞
这就是我设法解决问题的方法我记得电子邮件的登录部分
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");
}
在下一个表格中
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 关注
- 141 浏览
添加回答
举报
