protected void Page_Load(object sender, EventArgs e) { // redirect if query string not found if (Request.QueryString["ID"] == null) { RedirectToViewAllHospitals(); } else { long temp; // redirect if cannot parse if (long.TryParse(Request.QueryString["ID"], out temp)) { // redirect if patient not found if (new DataClassesDataContext().Hospitals.Where(h => h.ID == long.Parse(Request.QueryString["ID"])).Count() == 0) { RedirectToViewAllHospitals(); } else { // OK } } else { RedirectToViewAllHospitals(); } } RedirectSuccessAlert.SetAlert("Hospital inserted successfully!", RedirectSuccessConstants.RedirectSuccessAddHospital); }
protected void Page_Load(object sender, EventArgs e) { // redirect if query string not found if (Request.QueryString["ID"] == null) { RedirectToViewAllICDs(); } else { long temp; // redirect if cannot parse if (long.TryParse(Request.QueryString["ID"], out temp)) { // redirect if patient not found if (new DataClassesDataContext().ICDs.Where(p => p.ID == long.Parse(Request.QueryString["ID"])).Count() == 0) { RedirectToViewAllICDs(); } else { // OK } } else { RedirectToViewAllICDs(); } } // display success alert RedirectSuccessAlert.SetAlert("ICD inserted successfully", RedirectSuccessConstants.RedirectSuccessAddICD); }
protected void Page_Load(object sender, EventArgs e) { // redirect if no query string found if (Request.QueryString["ID"] == null) { RedirectToViewAllVisits(); } else { long temp; // redirect if cannot parse if (long.TryParse(Request.QueryString["ID"], out temp)) { var visits = new DataClassesDataContext().Visits.Where(v => v.ID == long.Parse(Request.QueryString["ID"])); // redirect if ID not found if (visits.Count() == 0) { RedirectToViewAllVisits(); } else { // OK, store the patient ID for later redirect PatientID = visits.First().PatientID; } } else { RedirectToViewAllVisits(); } } Dictionary <string, string> successDictionary = new Dictionary <string, string>(); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddNewPrescription, "Prescription inserted successfully!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddPrescriptionDetail, "Prescription Detail inserted successfully!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeletePrescription, "Prescription deleted successfully!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeletePrescriptionDetail, "Prescription Detail deleted successfully!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddLabOrder, "Lab Order inserted successfully!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddLabOrderDetail, "Lab Order Detail inserted successfuly!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeleteLabOrderDetail, "Lab Order Detail deleted successfully!"); successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeleteLabOrder, "Lab Order deleted successfully!"); RedirectSuccessAlert.SetAlert(successDictionary); Dictionary <string, string> infoDictionary = new Dictionary <string, string>(); infoDictionary.Add(RedirectConstants.RedirectVisitDetailAddLabOrderDetailSessionName, "You need to add Lab Order before adding Lab Order Detail"); infoDictionary.Add(RedirectConstants.RedirectVisitDetailAddPrescriptionDetailSessionName, "You need to add Prescription before adding Prescription Detail"); RedirectAlert.SetAlert(infoDictionary); }
protected void Page_Load(object sender, EventArgs e) { // set the redirect alert RedirectAlert.SetAlert("You need to select a Drug to view its details", RedirectConstants.RedirectDrugDetailsSessionName); // set the redirect success alert RedirectSuccessAlert.SetAlert("Drug deleted successfully", RedirectSuccessConstants.RedirectSuccessDeleteDrug); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGridView(); } // display the redirect success alert RedirectSuccessAlert.SetAlert("User created successfully", RedirectSuccessConstants.RedirectSuccessAddUser); }
protected void Page_Load(object sender, EventArgs e) { // display the redirect alert var redirectMessage = new Dictionary <string, string>(); redirectMessage.Add(RedirectConstants.RedirectHospitalDetailsSessionName, "You need to select a Hospital to view details"); RedirectAlert.SetAlert(redirectMessage); // display the redirect success alert RedirectSuccessAlert.SetAlert("Hospital deleted successfully!", RedirectSuccessConstants.RedirectSuccessDeleteHospital); }
//protected void BindData() //{ // var dataContext = new DataClassesDataContext(); // var allMedicalServicesQuery = // from m in dataContext.MedicalServices // from mg in dataContext.MedicalServiceGroups // where m.MedicalServiceGroupID == mg.ID // select new // { // ID = m.ID, // Name = m.Name, // Price = m.Price, // MedicalServiceGroupID = m.MedicalServiceGroupID, // MedicalServiceGroupName = mg.Name // }; // // bind to the grid view // AllMedicalServicesGridView.DataSource = allMedicalServicesQuery; // AllMedicalServicesGridView.DataBind(); //} protected void Page_Load(object sender, EventArgs e) { //if (!IsPostBack) //{ // BindData(); //} // set the redirect alert RedirectAlert.SetAlert("You need to select a Medical Service to view its details", RedirectConstants.RedirectMedicalServiceSessionName); // set the redirect success alert RedirectSuccessAlert.SetAlert("Medical Service deleted successfully", RedirectSuccessConstants.RedirectSuccessDeleteMedicalService); }
protected void Page_Load(object sender, EventArgs e) { // display the redirect alert var redirectMessage = new Dictionary <string, string>(); redirectMessage.Add(RedirectConstants.RedirectPatientDetailsSessionName, "You need to select a Patient to view details"); redirectMessage.Add(RedirectConstants.RedirectVisitFromPatientSessionName, "You need to select a Patient's details to view that Patient's Visits"); redirectMessage.Add(RedirectConstants.RedirectVisitDetailsSessionName, "You need to select a Patient's details to view that Patient's Visit details"); redirectMessage.Add(RedirectConstants.RedirectAddNewVisitSessionName, "You need to select a Patient's details to add a new Visit"); RedirectAlert.SetAlert(redirectMessage); // display the redirect success alert RedirectSuccessAlert.SetAlert("Patient deleted successfully!", RedirectSuccessConstants.RedirectSuccessDeletePatient); }
protected void Page_Load(object sender, EventArgs e) { // redirect if query string not found if (Request.QueryString["PatientID"] == null) { RedirectToViewAllPatients(); } else { long temp; // redirect if cannot parse if (long.TryParse(Request.QueryString["PatientID"], out temp)) { // redirect if patient id not found if (new DataClassesDataContext().Patients.Where(p => p.ID == long.Parse(Request.QueryString["PatientID"])).Count() == 0) { RedirectToViewAllPatients(); } else { // OK } } else { RedirectToViewAllPatients(); } } // display the redirect success alert var successDic = new Dictionary <string, string>(); successDic.Add(RedirectSuccessConstants.RedirectSuccessAddVisit, "Visit inserted successfully!"); successDic.Add(RedirectSuccessConstants.RedirectSuccessDeleteVisit, "Visit deleted successfully!"); RedirectSuccessAlert.SetAlert(successDic); }
protected void Page_Load(object sender, EventArgs e) { // bind the icd chapter dropdownlist if (!IsPostBack) { BindICDChapterDropdownList(); //if (PreviousPage != null) //{ // var contentHolder = PreviousPage.Master.FindControl("Content"); // GridView ICDChapterGridView = contentHolder.FindControl("AllICDChaptersGridView") as GridView; // var item = (ICDChapter)ICDChapterGridView.SelectedRow.DataItem; // FindICDChapterDropdownList.SelectedValue = AllICDChapterValue; //} } // set the redirect alert RedirectAlert.SetAlert("You need to select an ICD to view its details", RedirectConstants.RedirectICDDetailsSessionName); // set the redirect success alert RedirectSuccessAlert.SetAlert("ICD deleted successfully", RedirectSuccessConstants.RedirectSuccessDeleteICD); // filter criteria for the dropdownlist if (FindICDChapterDropdownList.SelectedValue == AllICDChapterValue) { AllICDDataSource.Where = "Code.Contains(@CodePart) && Name.Contains(@NamePart)"; } else { AllICDDataSource.Where = "Code.Contains(@CodePart) && Name.Contains(@NamePart) && ICDChapterID == @ICDChapter"; } // AllICDGridView.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { // display the redirect success alert RedirectSuccessAlert.SetAlert("Drug Group inserted successfully", RedirectSuccessConstants.RedirectSuccessAddDrugGroup); }
//public GridView MainGridView { get; set; } protected void Page_Load(object sender, EventArgs e) { RedirectSuccessAlert.SetAlert("ICD Chapter inserted successfully", RedirectSuccessConstants.RedirectSuccessAddICDChapter); }
protected void Page_Load(object sender, EventArgs e) { RedirectSuccessAlert.SetAlert("Medical Service Group inserted successfully", RedirectSuccessConstants.RedirectSuccessAddMedicalServiceGroup); }