public async Task <bool> insertNegotiationplanroute(GetNegotiationplanrouteDto getNegotiationplanrouteDto) { try { Negotiationplanroute oNegotiationplanroute = Mapper.Map <GetNegotiationplanrouteDto, Negotiationplanroute>(getNegotiationplanrouteDto); _Negotiationplanroutes.Add(oNegotiationplanroute); await _uow.SaveChangesAsync(); return(true); } catch (Exception ex) { return(false); } }
public async Task <bool> updateNegotiationplanroute(GetNegotiationplanrouteDto getNegotiationplanrouteDto) { try { Negotiationplanroute oNegotiationplanroute = await _Negotiationplanroutes.SingleAsync(i => i.id == getNegotiationplanrouteDto.id); oNegotiationplanroute.fromLocationId = getNegotiationplanrouteDto.fromLocationId; oNegotiationplanroute.toLocationId = getNegotiationplanrouteDto.toLocationId; oNegotiationplanroute.transporttypeId = getNegotiationplanrouteDto.transporttypeId; oNegotiationplanroute.modiferUserId = getNegotiationplanrouteDto.userId; await _uow.SaveChangesAsync(); return(true); } catch { return(false); } }