protected void UpdateClick(object sender, EventArgs e) { alamaat_User user = (alamaat_User)Session["alamaat_user"]; if (user != null) { user.firstname = tbfirstname.Text; user.middlename = tbmiddlename.Text; user.lastname = tblastname.Text; //user.UserName = UserName.Text; user.password = Password.Text; user.email = Email.Text; user.address = tbaddress.Text; user.city = tbcity.Text; user.province = tbprovince.Text; user.country = tbcountry.Text; user.postalcode = tbpCode.Text; user.phone = tbphone.Text; user.mobilephone = tbMobilephone.Text; user.fax = tbfax.Text; // user. = tbbirth.Text; UserContent ucontent = new UserContent(); if (ucontent.UpdateUser(user)) { lbloutput.Text = "Profile updated successfully."; } } }
protected void Page_Load(object sender, EventArgs e) { string id = Request.QueryString["id"]; string sid = Request.QueryString["sid"]; if (id != null) { UserContent usercontent = new UserContent(); alamaat_User currentuser = usercontent.GetuserById(id); if (currentuser != null) { if (currentuser.block == false) { currentuser.active = true; if (usercontent.UpdateUser(currentuser)) { lblactivation.Text = "You have successfully activated your account."; } } else { lblactivation.Text = "User account is already activated."; } } } else if (sid != null) { SubscriberContent usercontent = new SubscriberContent(); alamaat_subscriber user = usercontent.Getuserbyid(sid); if (user != null) { if (user.active == false) { user.active = true; if (usercontent.UpdateSubscriber(user)) { lblactivation.Text = "You have successfully verified your email."; } } else { lblactivation.Text = "Email is already verified."; } } } else { Response.Redirect("~/Default.aspx"); } }