public Inspection(DTO_Inspection inspection) { InspectionID = inspection.InspectionID; ClaimID = inspection.ClaimID; RidgeType = inspection.RidgeMaterialTypeID; ShingleType = inspection.ShingleTypeID; InspectionDate = inspection.InspectionDate; Skylights = inspection.SkyLights; Leaks = inspection.Leaks; GutterDamage = inspection.GutterDamage; DrivewayDamage = inspection.DrivewayDamage; MagneticRollers = inspection.MagneticRollers; IceWaterShield = inspection.IceWaterShield; EmergencyRepairsNeeded = inspection.EmergencyRepair; EmergencyRepairAmount = inspection.EmergencyRepairAmount; QualityControl = inspection.QualityControl; ProtectLandscaping = inspection.ProtectLandscaping; RemoveTrash = inspection.RemoveTrash; FurnishPermit = inspection.FurnishPermit; CoverPool = inspection.CoverPool; InteriorDamage = inspection.InteriorDamage; ExteriorDamage = inspection.ExteriorDamage; LighteningProtection = inspection.LighteningProtection; TearOff = inspection.TearOff; Satellite = inspection.Satellite; SolarPanels = inspection.SolarPanels; RoofAge = inspection.RoofAge; Comments = inspection.Comments; }
public async Task GetPlanesByInspectionID(DTO_Inspection token) { try { var response = await client.PostAsJsonAsync(string.Format(@"{0}{1}", URL, "GetPlanesByInspectionID"), token); response.EnsureSuccessStatusCode(); PlanesList = await response.Content.ReadAsAsync <List <DTO_Plane> >(); } catch (Exception ex) { } }
public async Task AddInspection(DTO_Inspection token) { try { var response = await client.PostAsJsonAsync(string.Format(@"{0}{1}", URL, "AddInspection"), token); response.EnsureSuccessStatusCode(); Inspection = await response.Content.ReadAsAsync <DTO_Inspection>(); } catch (Exception ex) { } }
async public Task <string> UpdateInspection(DTO_Inspection token) { Inspection = JsonConvert.DeserializeObject <DTO_Inspection>(await MakeRequest(token, "UpdateInspection")); return(Inspection.Message); }