protected void radNewSurvey_CheckedChanged(object sender, EventArgs e) { try { if (radNewSurvey.Checked) { pnlNewSurvey.Visible = true; pnlDistressDetails.Visible = false; radlOldSurveys.Visible = false; lbtnAddDistress.Visible = false; radlOldSurveys.SelectedIndex = -1; lblSurveysCount.Text = radlOldSurveys.Items.Count.ToString(); rntxtSurveyNo.Text = DistressSurvey.GetNextSectionSurveyNumber(int.Parse(gvLaneSamples.SelectedValue.ToString())).ToString(); string date = DistressSurvey.GetSectionCurrentSurveyDate(int.Parse(ddlMainStreetSection.SelectedValue), int.Parse(rntxtSurveyNo.Text)); rdtpSurveyDate.SelectedDate = (date == "0") ? DateTime.Today : DateTime.Parse(date); // string.IsNullOrEmpty(date) //rdtpSurveyDate.SelectedDate = DateTime.Today; } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void SpecificDate() { if (raddtpFrom.SelectedDate == null) { throw new Exception(Feedback.NoSearchBeginDate()); } else if (raddtpTo.SelectedDate == null) { throw new Exception(Feedback.NoSearchEndDate()); } else if (raddtpFrom.SelectedDate > raddtpTo.SelectedDate) { throw new Exception(Feedback.SearchBeginDateAfterEndDate()); } DataTable dt = new DistressSurvey().GetSurveyedAreasWithDate(raddtpFrom.SelectedDate, raddtpTo.SelectedDate.Value.AddDays(1)); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "region"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } }
protected void radOldSurvey_CheckedChanged(object sender, EventArgs e) { try { lblDistressFeedback.Text = ""; if (radOldSurvey.Checked) { pnlNewSurvey.Visible = false; radlOldSurveys.Visible = true; radlOldSurveys.DataBind(); lblSurveysCount.Text = radlOldSurveys.Items.Count.ToString(); lbtnAddDistress.Visible = (radlOldSurveys.Items.Count > 0); if (radlOldSurveys.Items.Count >= 1) //== 1) { radlOldSurveys.SelectedValue = DistressSurvey.GetLastSectionSurveyNumber(int.Parse(gvLaneSamples.SelectedValue.ToString())).ToString(); radlOldSurveys_SelectedIndexChanged(sender, e); radlOldSurveys.SelectedIndex = 0; //gvDistresses.DataBind(); } else { radlOldSurveys.SelectedIndex = -1; } } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void btnShowReport_Click(object sender, EventArgs e) { try { lblFeedback.Text = ""; if (DrpDwnListMonth.SelectedValue == "-1") { lblFeedback.Text = Feedback.NoSearchBeginDate(); } else { DataTable dt0, dt; lblFeedback.Text = ""; if (DrpDwnListMonth.SelectedValue == "0") { if (RadioButtonList1.SelectedValue.StartsWith("0") && RadioButtonList1.SelectedValue.Length == 2) { dt = new DistressSurvey().GetSurveyedAreasWithDateInterSetions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "00" ? null : int.Parse(RadioButtonList1.SelectedValue).ToString(), true, false, false); } else { dt = new DistressSurvey().GetSurveyedAreasWithDateRegions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "0" ? null : RadioButtonList1.SelectedValue, true, false); } //dt.Merge(dt0, true); } else { if (RadioButtonList1.SelectedValue.StartsWith("0") && RadioButtonList1.SelectedValue.Length == 2) { dt = new DistressSurvey().GetSurveyedAreasWithDateInterSetions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "00" ? null : int.Parse(RadioButtonList1.SelectedValue).ToString(), false, false, false); } else { dt = new DistressSurvey().GetSurveyedAreasWithDateRegions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "0" ? null : RadioButtonList1.SelectedValue, false, false); } //dt.Merge(dt0, true); } if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", RadioButtonList1.SelectedValue.StartsWith("0") && RadioButtonList1.SelectedValue.Length == 2 ? "intersectregion" : "region"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void btnShowReport_Click(object sender, EventArgs e) { try { lblFeedback.Text = ""; if (DrpDwnListMonth.SelectedValue == "-1" && RadioButtonList1.SelectedValue != "-1") { lblFeedback.Text = Feedback.NoSearchBeginDate(); } else { DataTable dt; lblFeedback.Text = ""; if (RadioButtonList1.SelectedValue == "-1") { dt = new DistressSurvey().GetSurveyedAreasWithDateALL(null, null, true); } else { if (DrpDwnListMonth.SelectedValue == "0") { dt = new DistressSurvey().GetSurveyedAreasWithDateALL(null, (RadioButtonList1.SelectedValue == "0" ? string.Empty : RadioButtonList1.SelectedValue), false); } else { dt = new DistressSurvey().GetSurveyedAreasWithDateALL(DrpDwnListMonth.SelectedValue, (RadioButtonList1.SelectedValue == "0" ? string.Empty : RadioButtonList1.SelectedValue), false); } } if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); if (CheckBoxOne.Checked) { Session.Add("option", "regionOne"); } else { Session.Add("option", "region"); } string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
public bool PrepareMunicipalitySecondaryStreetsMaintenanceDecisions(string municName, string user) { bool result = true; DataTable dt = new DistressSurvey().GetRegionsAndMainStreetSectionIntersections(0, "", "", municName, false, false, false, true, 0, false, false); foreach (DataRow dr in dt.Rows) { result &= PrepareMunicipalitySecondaryStreetsMaintenanceDecisions(municName, user); } return(result); }
public bool UpdateIntersectionSampleArea(int INTER_SAMP_ID, double INTERSEC_SAMP_AREA, string user, string NOTES) { string sql = ""; int lastSurveyNum = DistressSurvey.GetLastIntersectionSurveyNumber(INTER_SAMP_ID); if (lastSurveyNum == 0) { // no surveys have been done over this secondar street, so we can update its length and width directly sql = string.Format("UPDATE INTERSECTION_SAMPLES SET INTERSEC_SAMP_AREA={0}, NOTES='{2}' WHERE INTER_SAMP_ID={1} ", INTERSEC_SAMP_AREA, INTER_SAMP_ID, NOTES); int rows = db.ExecuteNonQuery(sql); Shared.SaveLogfile("INTERSECTION_SAMPLES", INTER_SAMP_ID.ToString(), "Update", user); return(rows > 0); } else { // surveys have been done over this secondar street, so we have to remove them before we can update its length and width directly sql = string.Format("UPDATE INTERSECTION_SAMPLES SET INTERSEC_SAMP_AREA={0}, NOTES='{2}' WHERE INTER_SAMP_ID={1} ", INTERSEC_SAMP_AREA, INTER_SAMP_ID, NOTES); int rows = db.ExecuteNonQuery(sql); //if (INTERSEC_SAMP_AREA == 0) //{ // sql = string.Format("delete from DISTRESS WHERE INTER_SAMP_ID={0} ", INTER_SAMP_ID); // db.ExecuteNonQuery(sql); //} //else //{ // sql = string.Format("UPDATE DISTRESS SET STATUS='N' WHERE INTER_SAMP_ID={0} ", INTER_SAMP_ID); // db.ExecuteNonQuery(sql); //} //sql = string.Format("UPDATE UDI SET UDI_DATE=NULL, UDI_VALUE=NULL, UDI_RATE=NULL, UDI_UP_DATE=NULL, UDI_UPD_VALUE=NULL, UDI_UPD_RATE=NULL, STATUS='N', STATUS_UPD='N' WHERE INTER_SAMP_ID={0} ", INTER_SAMP_ID); //db.ExecuteNonQuery(sql); //sql = string.Format("DELETE FROM PREVENT_MAINT_DECISIONS WHERE INTER_SAMP_ID={0} ", INTER_SAMP_ID); //db.ExecuteNonQuery(sql); //sql = string.Format("DELETE FROM MAINTENANCE_DECISIONS WHERE INTER_SAMP_ID={0} ", INTER_SAMP_ID); //db.ExecuteNonQuery(sql); rows += FixDistressesAfterAreaChange(INTER_SAMP_ID, INTERSEC_SAMP_AREA, user); sql = string.Format("UPDATE UDI_INTERSECTION_SAMPLE SET UDI_DATE=NULL, UDI_VALUE=NULL, UDI_RATE=NULL WHERE INTER_SAMP_ID={0} ", INTER_SAMP_ID); rows += db.ExecuteNonQuery(sql); Shared.SaveLogfile("INTERSECTION_SAMPLES", INTER_SAMP_ID.ToString(), "Update", user); return(rows > 0); } }
protected void gvLaneSamples_SelectedIndexChanged(object sender, EventArgs e) { try { lblDistressFeedback.Text = ""; lblFeedback.Text = ""; if (gvLaneSamples.SelectedValue != null) { lblFeedback.Text = ""; lblDistressFeedback.Text = ""; pnlSurvey.Visible = true; pnlDistressDetails.Visible = false; int sampleID = int.Parse(gvLaneSamples.SelectedValue.ToString()); bool sampleHasSurveys = new DistressSurvey().SampleHasSurveys(sampleID); bool sampleAreaReady = LaneSample.SampleReadyForDistressEntry(sampleID); if (sampleAreaReady) { if (sampleHasSurveys) { radNewSurvey.Checked = false; radOldSurvey.Checked = true; radOldSurvey_CheckedChanged(sender, e); } else { radOldSurvey.Checked = false; radNewSurvey.Checked = true; radNewSurvey_CheckedChanged(sender, e); } } else { pnlSurvey.Visible = false; lblFeedback.Text = Feedback.NonReadySample(); } } else { pnlSurvey.Visible = false; } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
public bool UpdateSecondaryStreetSampleArea(int STREET_ID, string SECOND_AR_NAME, double SECOND_ST_LENGTH, double SECOND_ST_WIDTH, string user, string NOTES) { string sql = ""; SECOND_AR_NAME = (string.IsNullOrEmpty(SECOND_AR_NAME)) ? "NULL" : string.Format("'{0}'", SECOND_AR_NAME.Replace("'", "''")); NOTES = (string.IsNullOrEmpty(NOTES)) ? "NULL" : string.Format("'{0}'", NOTES.Replace("'", "''")); int lastSecondaryStSurveyNum = DistressSurvey.GetLastSecondaryStreetSurveyNumber(STREET_ID); if (lastSecondaryStSurveyNum == 0) { // no surveys have been done over this secondar street, so we can update its length and width directly //sql = string.Format("UPDATE SECONDARY_STREETS SET SECOND_ST_WIDTH={0}, SECOND_ST_LENGTH={1}, ARNAME={2}, SECOND_ARNAME={2} WHERE SECOND_ID={3} ", sql = string.Format("UPDATE STREETS SET SECOND_ST_WIDTH={0}, SECOND_ST_LENGTH={1}, ARNAME={2}, SECOND_ARNAME={2} WHERE STREET_ID={3} ", SECOND_ST_WIDTH, SECOND_ST_LENGTH, SECOND_AR_NAME, STREET_ID); int rows = db.ExecuteNonQuery(sql); sql = string.Format("UPDATE SECONDARY_STREET_DETAILS SET SECOND_ST_WIDTH={0}, SECOND_ST_LENGTH={1}, ARNAME={2}, SECOND_AR_NAME={2} WHERE STREET_ID={3} ", SECOND_ST_WIDTH, SECOND_ST_LENGTH, SECOND_AR_NAME, STREET_ID); rows += db.ExecuteNonQuery(sql); Shared.SaveLogfile("SECONDARY_STREETS", STREET_ID.ToString(), "Update", user); return(rows > 0); } else { // surveys have been done over this secondar street, so we have to remove them before we can update its length and width directly sql = string.Format("UPDATE STREETS SET SECOND_ST_WIDTH={0}, SECOND_ST_LENGTH={1}, ARNAME={2}, SECOND_ARNAME={2}, NOTES={4} WHERE STREET_ID={3} ", SECOND_ST_WIDTH, SECOND_ST_LENGTH, SECOND_AR_NAME, STREET_ID, NOTES); int rows = db.ExecuteNonQuery(sql); sql = string.Format("UPDATE SECONDARY_STREET_DETAILS SET SECOND_ST_WIDTH={0}, SECOND_ST_LENGTH={1}, ARNAME={2}, SECOND_AR_NAME={2} WHERE STREET_ID={3} ", SECOND_ST_WIDTH, SECOND_ST_LENGTH, SECOND_AR_NAME, STREET_ID); rows += db.ExecuteNonQuery(sql); rows += new SecondaryStreets().FixDistressesAfterAreaChange(SECOND_ST_LENGTH, SECOND_ST_WIDTH, STREET_ID, user); sql = string.Format("DELETE FROM MAINTENANCE_DECISIONS WHERE STREET_ID={0} ", STREET_ID); // second_id db.ExecuteNonQuery(sql); Shared.SaveLogfile("SECONDARY_STREETS", STREET_ID.ToString(), "Update with nulling UDI", user); return(rows > 0); } }
protected void gvRegionSamples_SelectedIndexChanged(object sender, EventArgs e) { try { if (gvRegionSamples.SelectedValue != null) { lblFeedback.Text = ""; lblDistressFeedback.Text = ""; pnlSurvey.Visible = true; pnlDistressDetails.Visible = false; bool sampleHasSurveys = new DistressSurvey().SecondaryStreetSampleHasSurveys(int.Parse(gvRegionSamples.SelectedValue.ToString())); bool sampleAreaReady = SecondaryStreets.SecondaryStreetSampleReadyForDistressEntry(int.Parse(gvRegionSamples.SelectedValue.ToString())); if (sampleAreaReady) { if (sampleHasSurveys) { radNewSurvey.Checked = false; radOldSurvey.Checked = true; radOldSurvey_CheckedChanged(sender, e); } else { radOldSurvey.Checked = false; radNewSurvey.Checked = true; radNewSurvey_CheckedChanged(sender, e); } } else { pnlSurvey.Visible = false; lblFeedback.Text = Feedback.NonReadySample(); // "العينة غير جاهزة لعدم حساب المساحة، لايمكن إدخال العيوب عليها"; } } else { pnlSurvey.Visible = false; } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void radlOldSurveys_SelectedIndexChanged(object sender, EventArgs e) { try { gvDistresses.DataBind(); DataRow dr = DistressSurvey.GetSectionSampleSurveyNumDate(int.Parse(gvLaneSamples.SelectedValue.ToString()), int.Parse(radlOldSurveys.SelectedValue)).Rows[0]; lblSurveyNo.Text = dr["SURVEY_NO"].ToString(); lblSurveyDate.Text = DateTime.Parse(dr["SURVEY_DATE"].ToString()).ToString("dd/MM/yyyy"); lbtnAddDistress.Visible = true; } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void btnShowReport_Click(object sender, EventArgs e) { try { lblFeedback.Text = ""; DataTable dt = new DistressSurvey().GetDailySurveyAreas(raddtpFrom.SelectedDate); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); string url = "ViewDailySurveyAreasReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void radlOldSurveys_SelectedIndexChanged(object sender, EventArgs e) { try { gvDistresses.DataBind(); DataTable dt = DistressSurvey.GetRegionSeondaryStreetSampleSurveyNumDate(int.Parse(gvRegionSamples.SelectedValue.ToString()), int.Parse(radlOldSurveys.SelectedValue)); if (dt.Rows.Count > 0) { DataRow dr = dt.Rows[0]; lblSurveyNo.Text = dr["SURVEY_NO"].ToString(); lblSurveyDate.Text = DateTime.Parse(dr["SURVEY_DATE"].ToString()).ToString("dd/MM/yyyy"); lbtnAddDistress.Visible = true; } else { pnlDistressDetails.Visible = false; } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void btnShowReport_Click(object sender, EventArgs e) { try { lblFeedback.Text = ""; if (radByMonth.Checked) { if (DrpDwnListMonth.SelectedValue == "-1" || RadioButtonList1.SelectedValue == string.Empty) { lblFeedback.Text = Feedback.NoSearchBeginDate(); } else { DataTable dt; lblFeedback.Text = ""; if (DrpDwnListMonth.SelectedValue == "0") { if (RadioButtonList1.SelectedValue.StartsWith("0") && RadioButtonList1.SelectedValue.Length == 2) { dt = new DistressSurvey().GetSurveyedAreasWithDateInterSetions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "00" ? null : int.Parse(RadioButtonList1.SelectedValue).ToString(), true, true, true); } else { dt = new DistressSurvey().GetSurveyedAreasWithDateRegions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "0" ? null : RadioButtonList1.SelectedValue, true, true); } //dt.Merge(dt0, true); } else { if (RadioButtonList1.SelectedValue.StartsWith("0") && RadioButtonList1.SelectedValue.Length == 2) { dt = new DistressSurvey().GetSurveyedAreasWithDateInterSetions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "00" ? null : int.Parse(RadioButtonList1.SelectedValue).ToString(), false, true, true); } else { dt = new DistressSurvey().GetSurveyedAreasWithDateRegions(DrpDwnListMonth.SelectedValue, RadioButtonList1.SelectedValue == "0" ? null : RadioButtonList1.SelectedValue, false, true); } //dt.Merge(dt0, true); } if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", RadioButtonList1.SelectedValue.StartsWith("0") && RadioButtonList1.SelectedValue.Length == 2 ? "intersectregion" : "region"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } } else if (radSection.Checked) { DataTable dt = new DistressSurvey().GetSurveyedAreas(RoadType.Section); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "section"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIntersection.Checked) { DataTable dt = new DistressSurvey().GetSurveyedAreas(RoadType.Intersect); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "intersect"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radByDate.Checked) { SpecificDate(); } else if (radRegionSecondary.Checked) { DataTable dt = new DistressSurvey().GetSurveyedAreas(RoadType.RegionSecondarySt); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "region"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radTrafficCounting.Checked) { //DataTable dt = new DistressSurvey().GetSurveyedAreas(MachineSurveyType.SectionTrafficCounting); DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.SectionTrafficCounting); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "traffic"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkHavingPhotos(RoadType.MainStreet); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "sectionPhotos"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRegionPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkHavingPhotos(RoadType.RegionSecondarySt); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "regionPhotos"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionQc.Checked) { DataTable dt = new QcCheck().GetRoadNetworkHavingQCheck(RoadType.Section); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "sectionQc"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIntersectQc.Checked) { DataTable dt = new QcCheck().GetRoadNetworkHavingQCheck(RoadType.Intersect); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "intersectQc"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRegionQc.Checked) { DataTable dt = new QcCheck().GetRoadNetworkHavingQCheck(RoadType.RegionSecondarySt); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "regionQc"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radReSurveyIntersect.Checked || radReSurveyRegions.Checked || radReSurveySections.Checked) { DataTable dt = new DistressSurvey().GetNetworkItemMustReSurvey(radReSurveySections.Checked, radReSurveyIntersect.Checked, radReSurveyRegions.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radReSurveySections.Checked ? "radReSurveySections" : (radReSurveyIntersect.Checked ? "radReSurveyIntersect" : (radReSurveyRegions.Checked ? "radReSurveyRegions" : "")))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radNonSurveyedSections.Checked || radNonSurveyedIntersects.Checked || radNonSurveyedRegions.Checked || radClosedRegions.Checked) { DataTable dt = new DistressSurvey().GetNonSurveyedRoadNetwork(radNonSurveyedSections.Checked, radNonSurveyedIntersects.Checked, radNonSurveyedRegions.Checked, radNonCompleteSurveyingRegions.Checked, radClosedRegions.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radNonSurveyedSections.Checked ? "radNonSurveyedSections" : (radNonSurveyedIntersects.Checked ? "radNonSurveyedIntersects" : (radNonSurveyedRegions.Checked ? "radNonSurveyedRegions" : (radClosedRegions.Checked ? "radClosedRegions" : ""))))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radNonCompleteSurveyingRegions.Checked) { DataTable dt = new DistressSurvey().GetNonSurveyedRoadNetwork(radNonSurveyedSections.Checked, radNonSurveyedIntersects.Checked, radNonSurveyedRegions.Checked, radNonCompleteSurveyingRegions.Checked, radClosedRegions.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radClosedRegions.Checked ? "radClosedRegions" : "radNonCompleteSurveyingRegions")); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSurveyedSections.Checked || radSurveyedIntersects.Checked) { DataTable dt = new DistressSurvey().GetSurveyedRoadNetwork(radSurveyedSections.Checked, radSurveyedIntersects.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radSurveyedSections.Checked ? "radSurveyedSections" : (radSurveyedIntersects.Checked ? "radSurveyedIntersects" : ""))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radNonCompleteSections.Checked || radNonCompleteIntersects.Checked) { DataTable dt = new DistressSurvey().GetNonCompleteSurveyStreets(radNonCompleteIntersects.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", radNonCompleteSections.Checked ? "radNonCompleteSections" : (radNonCompleteIntersects.Checked ? "radNonCompleteIntersects" : "")); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } if (radNonSurveySectionsStreets.Checked || radNonSurveyIntersectStreets.Checked) { DataTable dt = new DistressSurvey().GetNonSurveyedStreets(radNonSurveyIntersectStreets.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", radNonSurveySectionsStreets.Checked ? "radNonSurveySectionsStreets" : (radNonSurveyIntersectStreets.Checked ? "radNonSurveyIntersectStreets" : "")); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionNoPhotos.Checked || radIntersectNoPhotos.Checked || radRegionNoPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkHavingNoPhotos(radSectionNoPhotos.Checked, radIntersectNoPhotos.Checked, radRegionNoPhotos.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radSectionNoPhotos.Checked ? "radSectionNoPhotos" : (radIntersectNoPhotos.Checked ? "radIntersectNoPhotos" : (radRegionNoPhotos.Checked ? "radRegionNoPhotos" : "")))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionSurveyedNoPhotos.Checked || radIntersectSurveyedNoPhotos.Checked || radRegionSurveyedNoPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkSurveyedHavingNoPhotos(radSectionSurveyedNoPhotos.Checked, radIntersectSurveyedNoPhotos.Checked, radRegionSurveyedNoPhotos.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radSectionSurveyedNoPhotos.Checked ? "radSectionNoPhotos" : (radIntersectSurveyedNoPhotos.Checked ? "radIntersectNoPhotos" : (radRegionSurveyedNoPhotos.Checked ? "radRegionNoPhotos" : "")))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radFwd.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.FWD); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radFwd"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIriSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.IRI_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radIriSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIntersectIri.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.IRI_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radIntersectIri"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radGprSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.GPR_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radGprSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radGprIntersect.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.GPR_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radGprIntersect"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSkidSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.SKID_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radSkidSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSkidIntersects.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.SKID_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radSkidIntersects"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRuttingSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.Rutting_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radRuttingSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRuttingIntersects.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.Rutting_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radRuttingIntersects"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }
protected void btnShowReport_Click(object sender, EventArgs e) { try { lblFeedback.Text = ""; if (radSection.Checked) { DataTable dt = new DistressSurvey().GetSurveyedAreas(RoadType.Section); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "section"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIntersection.Checked) { DataTable dt = new DistressSurvey().GetSurveyedAreas(RoadType.Intersect); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "intersect"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRegionSecondary.Checked) { DataTable dt = new DistressSurvey().GetSurveyedAreas(RoadType.RegionSecondarySt); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "region"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radTrafficCounting.Checked) { //DataTable dt = new DistressSurvey().GetSurveyedAreas(MachineSurveyType.SectionTrafficCounting); DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.SectionTrafficCounting); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "traffic"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkHavingPhotos(RoadType.MainStreet); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "sectionPhotos"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRegionPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkHavingPhotos(RoadType.RegionSecondarySt); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "regionPhotos"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionQc.Checked) { DataTable dt = new QcCheck().GetRoadNetworkHavingQCheck(RoadType.Section); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "sectionQc"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIntersectQc.Checked) { DataTable dt = new QcCheck().GetRoadNetworkHavingQCheck(RoadType.Intersect); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "intersectQc"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRegionQc.Checked) { DataTable dt = new QcCheck().GetRoadNetworkHavingQCheck(RoadType.RegionSecondarySt); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "regionQc"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radReSurveyIntersect.Checked || radReSurveyRegions.Checked || radReSurveySections.Checked) { DataTable dt = new DistressSurvey().GetNetworkItemMustReSurvey(radReSurveySections.Checked, radReSurveyIntersect.Checked, radReSurveyRegions.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radReSurveySections.Checked ? "radReSurveySections" : (radReSurveyIntersect.Checked ? "radReSurveyIntersect" : (radReSurveyRegions.Checked ? "radReSurveyRegions" : "")))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radNonSurveyedSections.Checked || radNonSurveyedIntersects.Checked || radNonSurveyedRegions.Checked || radClosedRegions.Checked) { DataTable dt = new DistressSurvey().GetNonSurveyedRoadNetwork(radNonSurveyedSections.Checked, radNonSurveyedIntersects.Checked, radNonSurveyedRegions.Checked, radNonCompleteSurveyingRegions.Checked, radClosedRegions.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radNonSurveyedSections.Checked ? "radNonSurveyedSections" : (radNonSurveyedIntersects.Checked ? "radNonSurveyedIntersects" : (radNonSurveyedRegions.Checked || radClosedRegions.Checked ? "radNonSurveyedRegions" : "")))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radNonCompleteSurveyingRegions.Checked) { DataTable dt = new DistressSurvey().GetNonSurveyedRoadNetwork(radNonSurveyedSections.Checked, radNonSurveyedIntersects.Checked, radNonSurveyedRegions.Checked, radNonCompleteSurveyingRegions.Checked, radClosedRegions.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radNonSurveyedRegions"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSurveyedSections.Checked || radSurveyedIntersects.Checked) { DataTable dt = new DistressSurvey().GetSurveyedRoadNetwork(radSurveyedSections.Checked, radSurveyedIntersects.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radSurveyedSections.Checked ? "radSurveyedSections" : (radSurveyedIntersects.Checked ? "radSurveyedIntersects" : ""))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radNonCompleteSections.Checked || radNonCompleteIntersects.Checked) { DataTable dt = new DistressSurvey().GetNonCompleteSurveyStreets(radNonCompleteIntersects.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "section"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } if (radNonSurveySectionsStreets.Checked || radNonSurveyIntersectStreets.Checked) { DataTable dt = new DistressSurvey().GetNonSurveyedStreets(radNonSurveyIntersectStreets.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "section"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSectionNoPhotos.Checked || radIntersectNoPhotos.Checked || radRegionNoPhotos.Checked) { DataTable dt = new ImagesGallery().RoadNetworkHavingNoPhotos(radSectionNoPhotos.Checked, radIntersectNoPhotos.Checked, radRegionNoPhotos.Checked); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", (radSectionNoPhotos.Checked ? "radSectionNoPhotos" : (radIntersectNoPhotos.Checked ? "radIntersectNoPhotos" : (radRegionNoPhotos.Checked ? "radRegionNoPhotos" : "")))); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radFwd.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.FWD); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radFwd"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIriSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.IRI_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radIriSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radIntersectIri.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.IRI_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radIntersectIri"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radGprSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.GPR_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radGprSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radGprIntersect.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.GPR_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radGprIntersect"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSkidSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.SKID_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radSkidSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radSkidIntersects.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.SKID_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radSkidIntersects"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRuttingSections.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.Rutting_Sections); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radRuttingSections"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } else if (radRuttingIntersects.Checked) { DataTable dt = new MachineSurveyRoadNetworkReports().GetSurveyedAreas(MachineSurveyType.Rutting_Intersects); if (dt.Rows.Count > 0) { Session.Add("ReportData", dt); Session.Add("option", "radRuttingIntersects"); string url = "ViewFinishedSurveyingReport.aspx"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true); } else { lblFeedback.Text = Feedback.NoData(); } } } catch (Exception ex) { lblFeedback.Text = ex.Message; } }