protected void Page_Load(object sender, EventArgs e) { tCustomer t = Session[CDictionary.LOGIN_USER] as tCustomer; if (t == null) { Response.Redirect("WfLogIn.aspx"); } Label1.Text = "目前使用者:" + t.fName + "[" + t.fEmail + "]"; }
protected void btSubmit_Click(object sender, EventArgs e) { int pw = Convert.ToInt32(txtId.Text); tCustomer x = (new dbDataDataContext()).tCustomer.FirstOrDefault( t => t.fEmail.Equals(txtMail.Text) && t.fId == pw); if (x != null) { Session[CDictionary.LOGIN_USER] = x; Response.Redirect("WfHome.aspx"); } lblMessage.Visible = true; lblMessage.Text = "Wrong password or Email"; }
partial void DeletetCustomer(tCustomer instance);
partial void UpdatetCustomer(tCustomer instance);
partial void InserttCustomer(tCustomer instance);