Beispiel #1
0
        /// <summary>
        /// 设置承运商
        /// </summary>
        /// <param name="SnNum"></param>
        /// <param name="CarrierNum"></param>
        /// <param name="LogisticsNo"></param>
        /// <returns></returns>
        public int SetCarrier(string SnNum, string CarrierNum, string LogisticsNo)
        {
            CarrierProvider provider = new CarrierProvider(this.CompanyID);

            OutStorageEntity entity = new OutStorageEntity();

            entity.CarrierNum = CarrierNum;
            CarrierEntity carrier = provider.GetSingle(CarrierNum);

            if (carrier != null)
            {
                entity.CarrierName = carrier.CarrierName;
            }
            entity.LogisticsNo = LogisticsNo;

            entity.Include(item => new { item.CarrierNum, item.CarrierName, item.LogisticsNo });
            entity.Where(item => item.SnNum == SnNum).And(item => item.CompanyID == this.CompanyID);
            int line = this.OutStorage.Update(entity);

            return(line);
        }