public static Inspection GetInspection(InspectionDO inspectionDO) { Inspection inspection = new Inspection() { ID = inspectionDO.ID, inspectionID = inspectionDO.InspectionId, InspectionType = inspectionDO.InspectionDesc }; return(inspection); }
public static InspectionDO GetInspectionDO(Inspection inspection) { InspectionDO inspectionDO = new InspectionDO() { ID = inspection.ID, InspectionId = inspection.inspectionID, InspectionDesc = inspection.InspectionType }; return(inspectionDO); }
public int DeleteInspection(Inspection inspection) { int result = 0; try { InspectionDO inspectionDO = Converter.GetInspectionDO(inspection); result = inspectionRepository.DeleteEntity(inspectionDO.ID); } catch (Exception ex) { Debug.WriteLine("Exception Occured in DeleteInspection method due to " + ex.Message); } return(result); }
public static IEnumerable <InspectionDO> GetMasterInspectionDO(IEnumerable <Model.ServiceModel.MasterInspection> inspections) { List <InspectionDO> inspectionDO = new List <InspectionDO>(); foreach (var ins in inspections) { InspectionDO insDO = new InspectionDO() { ID = ins.ID, InspectionId = ins.InspectionTypeId, InspectionDesc = ins.InspectionDesc, Priority = ins.Priority }; inspectionDO.Add(insDO); } return(inspectionDO); }
public Inspection GetInspection(int inspectionID) { Inspection inspection = new Inspection(); try { InspectionDO inspectionDO = inspectionRepository.GetEntity(inspectionID); if (inspectionDO != null) { inspection = Converter.GetInspection(inspectionDO); } } catch (Exception ex) { Debug.WriteLine("Exception Occured in GetInspection method due to " + ex.Message); } return(inspection); }