protected void Unnamed_Click(object sender, EventArgs e) { DataTable dt = t.GetDataBy1(TextBox1.Text); row = d.add_patient.FindByphone_number(TextBox1.Text); if (dt.Rows.Count > 0) { if (row.first_name == TextBox2.Text) { Label1.Text = ""; Label2.Text = row.password; } else { Label1.Text = "Answer is not Correct"; Label2.Text = ""; } } else { Label1.Text = "Could not find the Given Email"; Label1.ForeColor = System.Drawing.Color.Red; Label2.Text = ""; } }
protected void Button4_Click(object sender, EventArgs e) { row = d.add_patient.FindByphone_number(Session["user"].ToString()); if (TextBox6.Text.Equals(row.password)) { row.password = TextBox7.Text; t.Update(row); Response.Redirect("viewuserprofile.aspx"); } else { Label3.Text = "Old Password does not match. "; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("Login.aspx"); } else { t.Fill(d.add_patient); string pid = Session["user"].ToString(); row = d.add_patient.FindByphone_number(pid); TextBox1.Text = row.first_name; TextBox2.Text = row.last_name; TextBox3.Text = row.email_id; img3.ImageUrl = row.profile_image; Label1.Text = row.first_name; Label2.Text = row.email_id; } }
protected void Button3_Click(object sender, EventArgs e) { string filename = ""; if (fileupload1.HasFile) { filename = Path.GetFileName(fileupload1.PostedFile.FileName); fileupload1.PostedFile.SaveAs(Server.MapPath(path: "~/admin/doctor's images/") + filename); } string pid = Session["user"].ToString(); row = d.add_patient.FindByphone_number(pid); row.first_name = TextBox1.Text; row.last_name = TextBox2.Text; row.email_id = TextBox3.Text; row.profile_image = "~/admin/doctor's images/" + filename; t.Update(d.add_patient); Response.Redirect("viewuserprofile.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("Login.aspx"); } else { t.Fill(d.add_patient); string pid = Session["user"].ToString(); row = d.add_patient.FindByphone_number(pid); Label4.Text = row.first_name; Label6.Text = row.last_name; Label8.Text = row.email_id; Label10.Text = row.phone_number; Label12.Text = row.gender; Label14.Text = row.previous_medication; Label1.Text = row.first_name; Label2.Text = row.email_id; img5.ImageUrl = row.profile_image; } }