protected void ziptxt_TextChanged(object sender, EventArgs e) { try { ClientFirsTimeFunction c = new ClientFirsTimeFunction(); statedd.SelectedValue = c.findStateByZip(Convert.ToInt32(ziptxt.Text)); } catch { Error.Text = "Unavailable Zip Code"; } }
protected void update_Click(object sender, EventArgs e) { try { ClientFirsTimeFunction c = new ClientFirsTimeFunction(); c.CreateClient(new Client(createmail.Text, Fname.Text, Lname.Text, companynametxt.Text, addresstxt.Text, suitetxt.Text, citytxt.Text, statedd.Text, ziptxt.Text, tel1txt.Text, tel2txt.Text, celltxt.Text, faxtxt.Text, "", memotxt.Text)); Session["Value"] = uid; Response.Redirect("~/ClientP.aspx"); } catch (Exception ex) { Error.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { uid = Session["Value"].ToString(); } catch { Response.Redirect("~/SignIn_Up.aspx"); } ClientFirsTimeFunction c = new ClientFirsTimeFunction(); User u = c.userInformation(uid); createmail.Text = u.Mail; Fname.Text = u.Fname; Lname.Text = u.Lname; celltxt.Text = u.MobileNum; } }