public void Showtab(int PlanID) { try { INSPECTION_PLAN_BUS businsplan = new INSPECTION_PLAN_BUS(); InspectionPlanName.Text = businsplan.getPlanName(PlanID); InspectionDate.Text = businsplan.getPlanDate(PlanID).ToString(); IDPlan = PlanID; } catch { // do nothing } }
private List <INSPECTION_COVERAGE> getDataPlanCoverage(int PlanID) { INSPECTION_COVERAGE_BUS busInspcove = new INSPECTION_COVERAGE_BUS(); List <INSPECTION_COVERAGE> listInscove = busInspcove.getDataID(PlanID); List <INSPECTION_COVERAGE> listData = new List <INSPECTION_COVERAGE>(); EQUIPMENT_MASTER_BUS buseq = new EQUIPMENT_MASTER_BUS(); COMPONENT_MASTER_BUS buscom = new COMPONENT_MASTER_BUS(); INSPECTION_PLAN_BUS businsplan = new INSPECTION_PLAN_BUS(); foreach (INSPECTION_COVERAGE inspCove in listInscove) { INSPECTION_COVERAGE rwInspCove = inspCove; rwInspCove.EquipmentName = buseq.getEquipmentName(inspCove.EquipmentID); rwInspCove.ComponentName = buscom.getComponentName(inspCove.ComponentID); rwInspCove.InspectionPlanName = businsplan.getPlanName(inspCove.PlanID); rwInspCove.InspectionPlanDate = businsplan.getPlanDate(inspCove.PlanID).ToString(); listData.Add(rwInspCove); } return(listData); }