protected void btnLogin_Click1(object sender, EventArgs e) { ConnectDatabase aLayer = new ConnectDatabase(); if (aLayer.CheckUserID_Password(txtUserID.Text, txtUserPasswd.Text)) { Response.Write("<script>alert('Your login success');window.location = '/KiWiMainPage.aspx';</script>"); } else { ClearTextBox(); Response.Write("<script>alert('Can not find User ID and User Password');</script>"); return; } }
protected void Button_Register_Click(object sender, EventArgs e) { ConnectDatabase aLayer = new ConnectDatabase(); if (aLayer.CheckUserID(txtUserID.Text)) { Response.Write("<script>alert('Same UserID aleady exit!!');</script>"); } else { if (aLayer.AddNewCustomer(txtUserID.Text, txtUserPasswd.Text, txtUserName.Text, txtUserEmail.Text, txtUserMobile.Text)) { Response.Write("<script>alert('New customer is registered');window.location = '/KiWiMainPage.aspx;</script>"); return; } else { Response.Write("<script>alert('Can not add a new customer');window.location = '/ViewCustomerSite.aspx';</script>"); return; } } }