private void PolyclinicForm_Load(object sender, EventArgs e) { DoctorDataGridView.ColumnHeadersDefaultCellStyle.Font = new Font("Microsoft YaHei", 12F, FontStyle.Bold); CardTableAdapter.Fill(polyDataSet.Амбулаторная_карта); DiagnosesTableAdapter.Fill(polyDataSet.Диагнозы); SpecialtyTableAdapter.Fill(polyDataSet.Категория_врачебной_специальности); CardViewTableAdapter.Fill(polyDataSet.СхемаЛечения); PatientTableAdapter.Fill(polyDataSet.Пациент); DoctorTableAdapter.Fill(polyDataSet.Врачи); RegistryTableAdapter.Fill(polyDataSet.егистратура); RegistryViewTableAdapter.Fill(polyDataSet.СписокРегистратуры); }
protected void LoginButton_Click(object sender, EventArgs e) { if (CaptchaControl1.UserValidated) { if (RadioButtonList1.SelectedIndex == 1) { PatientTableAdapter adap_patient = new PatientTableAdapter(); DataSet1.PatientDataTable dt = adap_patient.GetData(UserName.Text, Password.Text); if (dt.Rows.Count > 0) { Session["PatientID"] = dt.Rows[0][0].ToString(); Master.DataFromPageLabelControl("Patient"); Session["name"] = dt.Rows[0][1].ToString(); Response.Redirect("~/Patient/PatHome.aspx"); // Session["type"] = "Doctor"; } else FailureText.Text = "Login attempt failed, Please try again."; } else { DoctorTableAdapter adap_doctor = new DoctorTableAdapter(); DataSet1.DoctorDataTable dt = adap_doctor.GetData(UserName.Text, Password.Text); if (dt.Rows.Count > 0) { Session["DocID"] = dt.Rows[0][0].ToString(); Session["name"] = dt.Rows[0][1].ToString(); Master.DataFromPageLabelControl("Doctor"); Response.Redirect("~/Doctor/DoctorHome.aspx"); } else FailureText.Text = "Login attempt failed, Please try again."; } } }
private void DoctorSaveChanges() { Validate(); DoctorBindingSource.EndEdit(); DoctorTableAdapter.Update(polyDataSet); }