protected void imgSubmit_clicked(object sender, EventArgs e) { if (isReadonly) { string url = "~/Portal/Patients.aspx"; Response.Redirect(url); } else { if (Page.IsValid) { //SaveData(); visRepos.UpdateVisitScreen(1, 1, patientID); visRepos.ChangeActiveVisit(patientID, 1, 2); DateTime?visit1Date = visRepos.GetVisit1Date(patientID); visRepos.UpdateVisitDates( 2, patientID, VisitDateCalculator.GetVisit2StartDate(visit1Date), VisitDateCalculator.GetVisit2EndDate(visit1Date) ); string url = "~/Portal/Patients.aspx"; Response.Redirect(url); } } }
private void LoadData() { DateTime?visit1Date = visRepos.GetVisit1Date(patientID); string dateStr = string.Format("{0} AND {1}", VisitDateCalculator.GetVisit2StartDate(visit1Date).ToString("dd-MMM-yyyy"), VisitDateCalculator.GetVisit2EndDate(visit1Date).ToString("dd-MMM-yyyy")); this.lblDates.Text = dateStr; this.lblName.Text = patientRepos.GetPatientName(patientID); }