protected void Button1_Click(object sender, EventArgs e) { m.DateOfPreview = DateTime.Parse(TextBox1.Text); //Medical m.PatientId = x.Id; m.DoctorId = d.Id; Q.MedicalRecords.InsertOnSubmit(m); Q.SubmitChanges(); //sickniess s.Disease = TextBox3.Text; // s.Type = DropDownList2.Text; s.LevelOfRisk = Byte.Parse(DropDownList1.Text); s.Description = TextBox5.Text; s.TreatmentPlan = TextBox6.Text; Q.Sicknesses.InsertOnSubmit(s); Q.SubmitChanges(); //SickniessMedecal sm.Note = TextBox2.Text; if (RadioButton1.Checked == true) { sm.Rate = Byte.Parse("1"); } else if (RadioButton2.Checked == true) { sm.Rate = Byte.Parse("2"); } else if (RadioButton3.Checked == true) { sm.Rate = Byte.Parse("3"); } sm.MedicalRecordId = m.Id; sm.SicknessId = s.Id; Q.SicknessMedicalRecords.InsertOnSubmit(sm); Q.SubmitChanges(); Label12.Text = "Data is Saved.. ! "; }
protected void Button1_Click(object sender, EventArgs e) { MedicalRecord m = (MedicalRecord)Session["medical"]; m = Q.MedicalRecords.Where(u => u.Id == m.Id).SingleOrDefault(); //sickness + Medecal add Note + Rate if (RadioButton1.Checked == true) { sm.Rate = 1; } else if (RadioButton2.Checked == true) { sm.Rate = 2; } else if (RadioButton3.Checked == true) { sm.Rate = 3; } sm.Note = TextBox1.Text; sm.SicknessId = int.Parse(DropDownList1.SelectedValue); sm.MedicalRecordId = m.Id; Q.SicknessMedicalRecords.InsertOnSubmit(sm); Q.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { MedicalRecord m = (MedicalRecord)Session["medical"]; m = Q.MedicalRecords.Where(u => u.Id == m.Id).SingleOrDefault(); Sickness s = (Sickness)Session["sick"]; s = Q.Sicknesses.Where(u => u.Id == s.Id).SingleOrDefault(); sm.DateOfReview = DateTime.Now; sm.Note = TextBox1.Text; if (RadioButton1.Checked == true) { sm.Rate = 1; } else if (RadioButton2.Checked == true) { sm.Rate = 2; } else if (RadioButton3.Checked == true) { sm.Rate = 3; } sm.MedicalRecordId = m.Id; sm.SicknessId = s.Id; Q.SicknessMedicalRecords.InsertOnSubmit(sm); Q.SubmitChanges(); }
protected void LinkButton1_Click(object sender, EventArgs e) { if (TextBox5.Text == "") { s.Disease = DropDownList4.Text; } else { s.Disease = TextBox5.Text; } if (TextBox6.Text == "") { s.Type = DropDownList3.Text; } else { s.Type = TextBox6.Text; } s.LevelOfRisk = byte.Parse(DropDownList2.Text); s.Description = TextBox4.Text; s.TreatmentPlan = TextBox2.Text; // Label23.Text = "Data Saved"; Q.Sicknesses.InsertOnSubmit(s); Q.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { PersonalInfo p = new PersonalInfo(); p.FirstName = TextBox1.Text; p.LastName = TextBox2.Text; p.Gender = RadioButtonList1.SelectedItem.Value; p.Phone = TextBox3.Text; p.Mobile = TextBox4.Text; p.Address = TextBox5.Text; //p.DateOfBrith = Calendar1.SelectedDate; //p.DateOfBrith = DateTime.Parse(TextBox6.Text); p.DateOfBrith = DateTime.Parse(TextBox6.Text); // p.DateOfBrith = System.Convert.ToDateTime(TextBox6.Text); p.Note = TextBox7.Text; p.Fax = TextBox8.Text; p.Email = TextBox9.Text; p.FacebookURL = TextBox10.Text; p.TwitterURL = TextBox11.Text; //p.Image = TextBox12.Text; p.BloodType = DropDownList1.Text; p.BusinessPhone = TextBox15.Text; if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { p.Image = "~/pics/" + FileUpload1.FileName; FileUpload1.SaveAs(Server.MapPath("~/pics/" + p.Id + ".png")); Label22.Text = "Photo is UpLoaded !! " + FileUpload1.FileName; } EMRDataClassesDataContext Q = new EMRDataClassesDataContext(); Q.PersonalInfos.InsertOnSubmit(p); Q.SubmitChanges(); Patient x = new Patient(); x.PersonalInfoId = p.Id; Q.Patients.InsertOnSubmit(x); Q.SubmitChanges(); Label21.Text = "Data is Saved"; }
protected void Button1_Click(object sender, EventArgs e) { m.Id = 2; pr.DateOfPrescription = DateTime.Now; pr.PrescriptionText = TextBox1.Text; pr.description = TextBox2.Text; pr.MedicalRecordId = m.Id; Q.Prescriptions.InsertOnSubmit(pr); Q.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { PersonalInfo p = new PersonalInfo(); p.Address = TextBox1.Text; //p.Age = 25; p.FirstName = TextBox2.Text;; p.LastName = TextBox3.Text; EMRDataClassesDataContext q = new EMRDataClassesDataContext(); q.PersonalInfos.InsertOnSubmit(p); q.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { PersonalInfo p = new PersonalInfo(); p.FirstName = "image"; p.LastName = "image"; p.Image = "~/pics/" + FileUpload1.FileName; EMRDataClassesDataContext Q = new EMRDataClassesDataContext(); Q.PersonalInfos.InsertOnSubmit(p); Q.SubmitChanges(); Patient x = new Patient(); x.PersonalInfoId = p.Id; Q.Patients.InsertOnSubmit(x); Q.SubmitChanges(); FileUpload1.SaveAs(Server.MapPath("~/pics/" + p.Id + ".png")); Label22.Text = "shit is UpLoaded !! " + FileUpload1.FileName; } }
protected void Button1_Click(object sender, EventArgs e) { NursePreview np = (NursePreview)Session["preview"]; np = Q.NursePreviews.Where(w => w.Id == np.Id).SingleOrDefault(); np.DateOfOperation = DateTime.Now; np.Note = TextBox1.Text; if (np.TypeOfOperation == 1) { if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") { Label22.Text = "Please select a Test Image to upload !! " + FileUpload1.FileName; } else { np.Test = "~/tests_Image/" + np.Id + fileExtension; FileUpload1.SaveAs(Server.MapPath("~/test_Image/" + np.Id + fileExtension)); Label22.Text = "Test Image is UpLoaded !! " + FileUpload1.FileName; } } } else if (np.TypeOfOperation == 2) { if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") { Label22.Text = "Please select a X Ray Image to upload !! " + FileUpload1.FileName; } else { np.XRayPhotoPath = "~/xray_Image/" + np.Id + fileExtension; FileUpload1.SaveAs(Server.MapPath("~/xray_Image/" + np.Id + fileExtension)); Label22.Text = "X Ray Image is UpLoaded !! " + FileUpload1.FileName; } } } n.Id = 1; n = Q.Nurses.Where(u => u.Id == n.Id).SingleOrDefault(); np.NurseId = n.Id; Q.SubmitChanges(); }
protected void Button2_Click(object sender, EventArgs e) { m.DateOfPreview = DateTime.Parse(TextBox1.Text); m.Description = TextBox2.Text; //Medical m.PatientId = x.Id; m.DoctorId = d.Id; Q.MedicalRecords.InsertOnSubmit(m); Q.SubmitChanges(); Session["medical"] = m; Session["doctor"] = d; Session["patient"] = x; Response.Redirect("View_MedicalRecord.aspx"); }
//protected void Button1_Click(object sender, EventArgs e) //{ // PersonalInfo p1 = Q.PersonalInfos.Where(h => h.Id == p.Id).SingleOrDefault(); // //x = Q.Patients.Single(z => z.Id == x.Id).SingleOrDefault(); // p1.FirstName = TextBox1.Text; // p1.LastName = TextBox2.Text; // if (RadioButton1.Checked == true) // { // p1.Gender = "male"; // } // else if (RadioButton2.Checked == true) // { // p1.Gender = "female"; // } // p1.DateOfBrith = DateTime.Parse(TextBox3.Text); // p1.BloodType = DropDownList2.Text; // p1.Address = TextBox4.Text; // p1.Note = TextBox5.Text; // p1.Phone = TextBox6.Text; // p1.BusinessPhone = TextBox7.Text; // p1.Mobile = TextBox8.Text; // p1.Fax = TextBox9.Text; // p1.Email = TextBox10.Text; // p1.FacebookURL = TextBox11.Text; // p1.TwitterURL = TextBox12.Text; // if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) // { // string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); // if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") // { // // Label22.Text = "Please select a photo to upload !! " + FileUpload1.FileName; // } // else // { // p.Image = "~/pics/" + p.Id + fileExtension; // FileUpload1.SaveAs(Server.MapPath("~/pics/" + p1.Id + fileExtension)); // // Label22.Text = "Photo is UpLoaded !! " + FileUpload1.FileName; // } // } // //Q.Patients.=Attach(x); // //Q.PersonalInfos.InsertOnSubmit(p); // Q.SubmitChanges(); //} protected void LinkButton1_Click(object sender, EventArgs e) { PersonalInfo p1 = Q.PersonalInfos.Where(h => h.Id == p.Id).SingleOrDefault(); //x = Q.Patients.Single(z => z.Id == x.Id).SingleOrDefault(); p1.FirstName = TextBox1.Text; p1.LastName = TextBox2.Text; if (RadioButton1.Checked == true) { p1.Gender = "male"; } else if (RadioButton2.Checked == true) { p1.Gender = "female"; } p1.DateOfBrith = DateTime.Parse(TextBox3.Text); p1.BloodType = DropDownList2.Text; p1.Address = TextBox4.Text; p1.Note = TextBox5.Text; p1.Phone = TextBox6.Text; p1.BusinessPhone = TextBox7.Text; p1.Mobile = TextBox8.Text; p1.Fax = TextBox9.Text; p1.Email = TextBox10.Text; p1.FacebookURL = TextBox11.Text; p1.TwitterURL = TextBox12.Text; if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") { // Label22.Text = "Please select a photo to upload !! " + FileUpload1.FileName; } else { p.Image = "~/pics/" + p.Id + fileExtension; FileUpload1.SaveAs(Server.MapPath("~/pics/" + p1.Id + fileExtension)); // Label22.Text = "Photo is UpLoaded !! " + FileUpload1.FileName; } } //Q.Patients.=Attach(x); //Q.PersonalInfos.InsertOnSubmit(p); Q.SubmitChanges(); Response.Redirect("~/Admin_doctor/Patient/View_patient_info.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { Prescription pr = (Prescription)Session["prescription"]; pr = Q.Prescriptions.Where(w => w.Id == pr.Id).SingleOrDefault(); pr.DateOfPrescription = DateTime.Now; pr.Note = TextBox1.Text; ph.Id = 1; ph = Q.Pharmacists.Where(u => u.Id == ph.Id).SingleOrDefault(); pr.PharmacistId = ph.Id; Q.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { m.Id = 2; np.Description = TextBox1.Text; if (RadioButton1.Checked == true) { np.TypeOfOperation = 1; } else if (RadioButton2.Checked == true) { np.TypeOfOperation = 2; } np.DateOfOperation = DateTime.Now; np.MedicalRecoedId = m.Id; Q.NursePreviews.InsertOnSubmit(np); Q.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { PersonalInfo p = new PersonalInfo(); p.FirstName = TextBox1.Text; p.LastName = TextBox2.Text; p.Gender = RadioButtonList1.SelectedItem.Value; p.Phone = TextBox4.Text; p.Mobile = TextBox5.Text; p.Address = TextBox6.Text; p.DateOfBrith = DateTime.Parse(TextBox7.Text); p.Note = TextBox8.Text; p.Fax = TextBox9.Text; p.Email = TextBox10.Text; p.FacebookURL = TextBox11.Text; p.TwitterURL = TextBox12.Text; //p.Image = TextBox13.Text; p.BloodType = DropDownList1.Text; p.BusinessPhone = TextBox15.Text; EMRDataClassesDataContext Q = new EMRDataClassesDataContext(); Q.PersonalInfos.InsertOnSubmit(p); Q.SubmitChanges(); if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") { Label22.Text = "Please select a photo to upload !! " + FileUpload1.FileName; } else { p.Image = "~/pics/" + p.Id + fileExtension; FileUpload1.SaveAs(Server.MapPath("~/pics/" + p.Id + fileExtension)); Label22.Text = "Photo is UpLoaded !! " + FileUpload1.FileName; } } Doctor doc = new Doctor(); doc.PersonalInfoId = p.Id; if (RadioButton1.Checked) { doc.Type = 0; } else if (RadioButton2.Checked) { doc.Type = 1; } doc.Compertence = TextBox17.Text; if (RadioButton1.Checked == true) { MembershipCreateStatus status; MembershipUser newuser = Membership.CreateUser(TextBox16.Text, TextBox18.Text, "*****@*****.**", "none", "none", false, out status); Roles.AddUserToRole(TextBox16.Text, "AdminDoctor"); var uid = (from a in Q.aspnet_Users where a.UserName == TextBox16.Text select a.UserId).Single(); p.UserId = uid; } else if (RadioButton2.Checked == true) { MembershipCreateStatus status; MembershipUser newuser = Membership.CreateUser(TextBox16.Text, TextBox18.Text, "*****@*****.**", "none", "none", false, out status); Roles.AddUserToRole(TextBox16.Text, "Doctor"); var uid = (from a in Q.aspnet_Users where a.UserName == TextBox16.Text select a.UserId).Single(); p.UserId = uid; } Q.Doctors.InsertOnSubmit(doc); Q.SubmitChanges(); Label23.Text = "Data is Saved"; }
protected void LinkButton1_Click(object sender, EventArgs e) { //PersonalInfo p1 = Q.PersonalInfos.Where(h => h.Id == p.Id).SingleOrDefault(); //Doctor x1 = Q.PersonalInfos.Where(q =>q.Id == Doctor x = (Doctor)Session["doctor"]; Doctor x1 = Q.Doctors.Where(z => z.Id == x.Id).SingleOrDefault(); PersonalInfo p1 = Q.PersonalInfos.Where(w => w.Id == x.PersonalInfoId).SingleOrDefault(); p1.FirstName = TextBox1.Text; p1.LastName = TextBox2.Text; if (RadioButton1.Checked == true) { p1.Gender = "male"; } else if (RadioButton2.Checked == true) { p1.Gender = "female"; } p1.DateOfBrith = DateTime.Parse(TextBox3.Text); p1.BloodType = DropDownList2.Text; p1.Address = TextBox4.Text; p1.Note = TextBox5.Text; p1.Phone = TextBox6.Text; p1.BusinessPhone = TextBox7.Text; p1.Mobile = TextBox8.Text; p1.Fax = TextBox9.Text; p1.Email = TextBox10.Text; p1.FacebookURL = TextBox11.Text; p1.TwitterURL = TextBox12.Text; if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) { string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") { // Label22.Text = "Please select a photo to upload !! " + FileUpload1.FileName; } else { p.Image = "~/pics/" + p.Id + fileExtension; FileUpload1.SaveAs(Server.MapPath("~/pics/" + p1.Id + fileExtension)); // Label22.Text = "Photo is UpLoaded !! " + FileUpload1.FileName; } } //if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLength > 0) //{ // string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName); // if (fileExtension.ToLower() != ".png" && fileExtension.ToLower() != ".jpg") // { // // Label25.Text = "Please select a photo to upload !! " + FileUpload1.FileName; // } // else // { // p.Image = "~/pics/" + p1.Id + ".png"; // FileUpload1.SaveAs(Server.MapPath("~/pics/" + p1.Id + ".png")); // //Label25.Text = "Photo is UpLoaded !! " + FileUpload1.FileName; // } //} x1.Compertence = TextBox13.Text; if (RadioButton3.Checked == true) { x1.Type = 0; } else if (RadioButton4.Checked == true) { x1.Type = 1; } Q.SubmitChanges(); Response.Redirect("View_doctor_info.aspx"); }