protected void SubmitButton_Click(object sender, EventArgs e) { MembershipEntity member = (MembershipEntity)Session["Member"]; member.UserName = NameTextBox.Text; if (member.StoreInformation != null) { member.StoreInformation.AuthorizedName = AuthorizedNameTextBox.Text; member.StoreInformation.CityId = Convert.ToInt32(CitiesDropDownList.SelectedValue); member.StoreInformation.Address = post.Text; member.StoreInformation.WebAddress = WebAddressTextBox.Text; member.StoreInformation.Email = EmailTextBox.Text; member.StoreInformation.Telephone = TelephoneTextBox.Text; member.StoreInformationId = member.StoreInformation.Id; } else { member.StoreInformation = new StoreInformationEntity(); member.StoreInformation.AuthorizedName = AuthorizedNameTextBox.Text; member.StoreInformation.CityId = Convert.ToInt32(CitiesDropDownList.SelectedValue); member.StoreInformation.Address = post.Text; member.StoreInformation.WebAddress = WebAddressTextBox.Text; member.StoreInformation.Email = EmailTextBox.Text; member.StoreInformation.Telephone = TelephoneTextBox.Text; member.StoreInformation.Save(); } Session["Member"] = new MemberShipAdapter().UpdateMember(member); }
protected void SubmitButton_Click(object sender, EventArgs e) { string uName = UserNameTextBox.Value; string password = PasswordTextBox.Value; MembershipEntity member = new MemberShipAdapter().GetMember(uName, password); if (member != null) { //Success Session["Member"] = member; Response.Redirect("/DashBoard.aspx"); } else { //Failed // runjQueryCode("$('#login_form').alertBox('Wrong Username or Password', { type: 'error' });"); //runjQueryCode("alert('a')"); alert.Style.Add("display", "block"); } }