/// <summary> /// 得到经销商授权付款条款 /// </summary> /// <param name="dto"></param> /// <returns></returns> public static List <DistributorPaymentResultDTO> GetDistributorAuthorityPay(DistributorAuthoritySearchDTO dto) { List <DistributorPaymentResultDTO> result = null; result = GetAPI <List <DistributorPaymentResultDTO> >(WebConfiger.MasterDataServicesUrl + "DistributorAuthorityPay?DistributorAuthoritySearchDTO=" + TransformHelper.ConvertDTOTOBase64JsonString(dto)); return(result); }
/// <summary> /// 经销商授权信息 /// </summary> /// <param name="dto"></param> /// <param name="ProductLineID"></param> /// <returns></returns> public static DistributorAuthorityResultDTO GetOneDistributorAuthority(DistributorAuthoritySearchDTO dto) { DistributorAuthorityResultDTO result = null; var pp = GetAPI <List <DistributorAuthorityResultDTO> >(WebConfiger.MasterDataServicesUrl + "DistributorAuthority?DistributorAuthoritySearchDTO=" + TransformHelper.ConvertDTOTOBase64JsonString(dto)); result = pp.FirstOrDefault(); return(result); }
/// <summary> /// 得到经销商授权产品线区域信息 /// </summary> /// <param name="dto"></param> /// <returns></returns> public List <DistributorRegionResultDTO> GetDistributorAuthorityRegion(DistributorAuthoritySearchDTO dto) { List <DistributorRegionResultDTO> result = null; var tcdmse = SingleQueryObject.GetObj(); var pp = tcdmse.master_DistributorRegionInfo.AsNoTracking().Where(p => (dto.DistributorProductID == null || p.master_DistributorProductLineInfo.DistributorProductLineID == dto.DistributorProductID)); dto.Count = pp.Count(); pp = pp.OrderByDescending(m => m.CreateTime).Skip((dto.page - 1) * dto.rows).Take(dto.rows); result = Mapper.Map <List <master_DistributorRegionInfo>, List <DistributorRegionResultDTO> >(pp.ToList()); return(result); }
public HttpResponseMessage GetDistributorAuthorityTransport(string DistributorAuthoritySearchDTO) { DistributorAuthoritySearchDTO dto = TransformHelper.ConvertBase64JsonStringToDTO <DistributorAuthoritySearchDTO>(DistributorAuthoritySearchDTO); List <DistributorTransportResultDTO> actionresult = null; actionresult = _IDistributorServices.GetDistributorAuthorityTransport(dto); HttpResponseMessage result = new HttpResponseMessage { Content = new StringContent(JsonConvert.SerializeObject(actionresult), System.Text.Encoding.GetEncoding("UTF-8"), "application/json") }; return(result); }
/// <summary> /// 得到经销商授权运输方式信息 /// </summary> /// <param name="dto"></param> /// <returns></returns> public List <DistributorTransportResultDTO> GetDistributorAuthorityTransport(DistributorAuthoritySearchDTO dto) { List <DistributorTransportResultDTO> result = null; var tcdmse = SingleQueryObject.GetObj(); var pp = tcdmse.master_DistributorTransport.AsNoTracking().Where(p => p.DistributorTransportID != null); if (dto.DistributorID != null) { pp = pp.Where(p => p.DistributorID == dto.DistributorID); } result = Mapper.Map <List <master_DistributorTransport>, List <DistributorTransportResultDTO> >(pp.ToList()); return(result); }
public HttpResponseMessage GetDistributorAuthorityProductLine(string DistributorAuthoritySearchDTO) { DistributorAuthoritySearchDTO dto = TransformHelper.ConvertBase64JsonStringToDTO<DistributorAuthoritySearchDTO>(DistributorAuthoritySearchDTO); ResultDTO<List<DistributorProductLineResultDTO>> actionresult = new ResultDTO<List<DistributorProductLineResultDTO>>(); actionresult.Object = _IDistributorServices.GetDistributorAuthorityProductLine(dto); actionresult.Count = dto.Count; actionresult.rows = dto.rows; HttpResponseMessage result = new HttpResponseMessage { Content = new StringContent(JsonConvert.SerializeObject(actionresult), System.Text.Encoding.GetEncoding("UTF-8"), "application/json") }; return result; }
/// <summary> /// 得到经销商授权信息 /// </summary> /// <param name="dto"></param> /// <returns></returns> public List <DistributorAuthorityResultDTO> GetDistributorAuthority(DistributorAuthoritySearchDTO dto) { List <DistributorAuthorityResultDTO> result = null; var tcdmse = SingleQueryObject.GetObj(); var pp = tcdmse.master_DistributorInfo.AsNoTracking().Where(p => p.DistributorID != null); if (dto.DistributorID != null) { pp = pp.Where(p => p.DistributorID == dto.DistributorID); } if (!string.IsNullOrEmpty(dto.SearchText)) { pp = pp.Where(p => p.DistributorName.Contains(dto.SearchText)); } result = Mapper.Map <List <master_DistributorInfo>, List <DistributorAuthorityResultDTO> >(pp.ToList()); return(result); }
/// <summary> /// 得到经销商授权产品线区域 /// </summary> /// <param name="dto"></param> /// <returns></returns> public static ResultData <List <DistributorRegionResultDTO> > GetDistributorAuthorityRegion(DistributorAuthoritySearchDTO dto) { ResultData <List <DistributorRegionResultDTO> > result = null; result = GetAPI <ResultData <List <DistributorRegionResultDTO> > >(WebConfiger.MasterDataServicesUrl + "DistributorAuthorityRegion?DistributorAuthoritySearchDTO=" + TransformHelper.ConvertDTOTOBase64JsonString(dto)); return(result); }