Exemplo n.º 1
0
 public int Dump(EmergencyCommunicationDto dto)
 {
     return
         (_repository
          .DumpItem <IEmergencyCommunicationRepository, EmergencyCommunication, EmergencyCommunicationDto>(
              dto, _townRepository));
 }
Exemplo n.º 2
0
 public async Task <EmergencyProcessDto> ConstructProcess(EmergencyCommunicationDto dto, string userName)
 {
     return(await
            _repository
            .ConstructProcess
            <IEmergencyCommunicationRepository, IEmergencyProcessRepository, EmergencyCommunication,
             EmergencyCommunicationDto, EmergencyProcess, EmergencyProcessDto>(_processRepository, dto, userName));
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public async Task<EmergencyProcessDto> Post(EmergencyCommunicationDto dto)
 {
     return await _service.ConstructProcess(dto, User.Identity.Name);
 }
Exemplo n.º 5
0
 public int Post(EmergencyCommunicationDto dto)
 {
     return _service.Dump(dto);
 }
Exemplo n.º 6
0
 public int Post(EmergencyCommunicationDto dto)
 {
     return(_service.Dump(dto));
 }
Exemplo n.º 7
0
 public EmergencyCommunication Match(EmergencyCommunicationDto stat)
 {
     return(stat.Id <= 0 ? FirstOrDefault(x => x.ProjectName == stat.ProjectName) : Get(stat.Id));
 }
Exemplo n.º 8
0
 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);
 }
Exemplo n.º 9
0
 public async Task <EmergencyProcessDto> Post(EmergencyCommunicationDto dto)
 {
     return(await _service.ConstructProcess(dto, User.Identity.Name));
 }