/// <summary> /// 授权经销商授权产品线区域 /// </summary> /// <returns></returns> public static ResultData <object> DistributorProductLineRegionAuthority(DistributorAuthorityModel dto) { ResultData <object> result = null; DistributorAuthorityOperateDTO disdto = new DistributorAuthorityOperateDTO(); disdto = dto; disdto.ProductLineRegion = new List <DistributorProductLineOperateDTO>(); DistributorProductLineOperateDTO dp = new DistributorProductLineOperateDTO(); dp.DistributorProductLineID = dto.DistributorProductLineID.Value; dp.Regionlist = new List <DistributorRegionOperateDTO>(); disdto.ProductLineRegion.Add(dp); var ass = dto.AuthorityRegion.Split('|').ToList(); ass.ForEach(f => { if (f != "") { DistributorRegionOperateDTO dr = new DistributorRegionOperateDTO(); var s = f.Split(',').ToList(); dr.RegionID = int.Parse(s[0]); dr.DistrictID = int.Parse(s[1]); dp.Regionlist.Add(dr); } }); result = PostAPI <ResultData <object> >(WebConfiger.MasterDataServicesUrl + "DistributorAuthority", disdto); return(result); }
/// <summary> /// 授权经销商付款条款 /// </summary> /// <returns></returns> public static ResultData <object> DistributorPayAuthority(DistributorAuthorityModel dto) { ResultData <object> result = null; DistributorAuthorityOperateDTO disdto = new DistributorAuthorityOperateDTO(); disdto = dto; disdto.PayIDlist = dto.PayID; result = PostAPI <ResultData <object> >(WebConfiger.MasterDataServicesUrl + "DistributorAuthority", disdto); return(result); }
/// <summary> /// 授权经销商运输方式 /// </summary> /// <returns></returns> public static ResultData <object> DistributorTransportAuthority(DistributorAuthorityModel dto) { ResultData <object> result = null; DistributorAuthorityOperateDTO disdto = new DistributorAuthorityOperateDTO(); disdto = dto; disdto.TransportIDlist = new List <int>() { dto.TransportID.Value }; result = PostAPI <ResultData <object> >(WebConfiger.MasterDataServicesUrl + "DistributorAuthority", disdto); return(result); }
/// <summary> /// 授权经销商产品线 /// </summary> /// <returns></returns> public static ResultData <object> DistributorProductLineAuthority(DistributorAuthorityModel dto) { ResultData <object> result = null; DistributorAuthorityOperateDTO disdto = new DistributorAuthorityOperateDTO(); disdto = dto; disdto.ProductLineRegion = new List <DistributorProductLineOperateDTO>() { new DistributorProductLineOperateDTO() { ProductLineID = dto.ProductLineID.Value } }; result = PostAPI <ResultData <object> >(WebConfiger.MasterDataServicesUrl + "DistributorAuthority", disdto); return(result); }