public int Dump(EmergencyCommunicationDto dto) { return (_repository .DumpItem <IEmergencyCommunicationRepository, EmergencyCommunication, EmergencyCommunicationDto>( dto, _townRepository)); }
public async Task <EmergencyProcessDto> ConstructProcess(EmergencyCommunicationDto dto, string userName) { return(await _repository .ConstructProcess <IEmergencyCommunicationRepository, IEmergencyProcessRepository, EmergencyCommunication, EmergencyCommunicationDto, EmergencyProcess, EmergencyProcessDto>(_processRepository, dto, userName)); }
public void Test_EmergencyCommunication() { var dto = new EmergencyCommunicationDto { DemandLevelDescription = "C级", VehicularTypeDescription = "L网华为", Person = "abc", Phone = "123", VehicleLocation = "def", OtherDescription = "ghi", CurrentStateDescription = "光纤起单" }; var item = dto.MapTo <EmergencyCommunication>(); item.DemandLevel.ShouldBe(DemandLevel.LevelC); item.VehicleType.ShouldBe(VehicleType.LteHuawei); item.ContactPerson.ShouldBe("abc(123)"); item.Description.ShouldBe("[def]ghi"); item.EmergencyState.ShouldBe(EmergencyState.FiberBegin); }
public async Task<EmergencyProcessDto> Post(EmergencyCommunicationDto dto) { return await _service.ConstructProcess(dto, User.Identity.Name); }
public int Post(EmergencyCommunicationDto dto) { return _service.Dump(dto); }
public int Post(EmergencyCommunicationDto dto) { return(_service.Dump(dto)); }
public EmergencyCommunication Match(EmergencyCommunicationDto stat) { return(stat.Id <= 0 ? FirstOrDefault(x => x.ProjectName == stat.ProjectName) : Get(stat.Id)); }
public void Test_EmergencyCommunication() { var dto = new EmergencyCommunicationDto { DemandLevelDescription = "C级", VehicularTypeDescription = "L网华为", Person = "abc", Phone = "123", VehicleLocation = "def", OtherDescription = "ghi", CurrentStateDescription = "光纤起单" }; var item = dto.MapTo<EmergencyCommunication>(); item.DemandLevel.ShouldBe(DemandLevel.LevelC); item.VehicleType.ShouldBe(VehicleType.LteHuawei); item.ContactPerson.ShouldBe("abc(123)"); item.Description.ShouldBe("[def]ghi"); item.EmergencyState.ShouldBe(EmergencyState.FiberBegin); }
public async Task <EmergencyProcessDto> Post(EmergencyCommunicationDto dto) { return(await _service.ConstructProcess(dto, User.Identity.Name)); }