Ejemplo n.º 1
0
        private void cmbBatchStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dgBatchDetailQueryResult.SelectedItem == null)
            {
                return;
            }

            ProductBatchDetailVM current = dgBatchDetailQueryResult.SelectedItem as ProductBatchDetailVM;

            InventoryBatchDetailsInfo productBatchInfo =
                new InventoryBatchDetailsInfo()
            {
                BatchNumber  = current.BatchNumber.ToString(),
                ProductSysNo = current.ProductSysNo,
                Status       = current.Status
            };

            serviceFacade.UpdateProductBatchStatus(productBatchInfo, (up, ar) =>
            {
                if (ar.FaultsHandle())
                {
                    Window.Alert(string.Format("更新失败!"));
                }
                else
                {
                    Window.Alert(string.Format("更新成功!"));
                    this.dgBatchDetailQueryResult.Bind();
                }
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改批次信息状态
        /// </summary>
        /// <param name="productBatchInfo"></param>
        public virtual void UpdateProductBatchStatus(InventoryBatchDetailsInfo productBatchInfo)
        {
            List <ItemBatchInfo> itemBatchInfoList = new List <ItemBatchInfo>();
            ItemBatchInfo        itemBatchInfo     = new ItemBatchInfo();

            itemBatchInfo.BatchNumber   = productBatchInfo.BatchNumber;
            itemBatchInfo.ProductNumber = productBatchInfo.ProductSysNo.ToString();
            itemBatchInfo.Status        = productBatchInfo.Status;
            itemBatchInfoList.Add(itemBatchInfo);

            BatchXMLMessage batchXMLMessage = new BatchXMLMessage()
            {
                Header = new InventoryHeader()
                {
                    NameSpace          = "http://soa.newegg.com/InventoryProfile",
                    Action             = "Status",
                    Version            = "V10",
                    Type               = "Update",
                    CompanyCode        = "8601",
                    Tag                = "UpdateStatus",
                    Language           = "zh-CN",
                    From               = "IPP",
                    GlobalBusinessType = "Listing",
                    StoreCompanyCode   = "8601",
                    TransactionCode    = ""
                },
                Body = new InventoryBody()
                {
                    Number        = "",
                    InUser        = ServiceContext.Current.UserDisplayName,
                    ItemBatchInfo = itemBatchInfoList
                }
            };
            string      paramXml = SerializationUtility.XmlSerialize(batchXMLMessage);
            XmlDocument xmlD     = new XmlDocument();

            xmlD.LoadXml(paramXml);
            paramXml = "<" + xmlD.DocumentElement.Name + ">" + xmlD.DocumentElement.InnerXml + "</" + xmlD.DocumentElement.Name + ">";

            //给仓库发消息,调整批次信息
            InventoryAdjustDA.AdjustBatchNumberInventory(paramXml);

            //SendSSBToWMS(query, InUser);
        }
Ejemplo n.º 3
0
 /// <summary>
 ///  修改商品批次状态
 /// </summary>
 /// <param name="productBatchInfo">商品批次信息</param>
 public virtual void UpdateProductBatchStatus(InventoryBatchDetailsInfo productBatchInfo)
 {
     productInventoryProcessor.UpdateProductBatchStatus(productBatchInfo);
 }
Ejemplo n.º 4
0
 public void UpdateProductBatchStatus(InventoryBatchDetailsInfo productBatchInfo)
 {
     ObjectFactory <ProductInventoryAppService> .Instance.UpdateProductBatchStatus(productBatchInfo);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 修改批次信息状态
        /// </summary>
        /// <param name="list"></param>
        /// <param name="callback"></param>
        public void UpdateProductBatchStatus(InventoryBatchDetailsInfo productBatchInfo, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string UpdateProductBatchStatusUrl = "/InventoryService/Inventory/UpdateProductBatchStatus";

            restClient.Update(UpdateProductBatchStatusUrl, productBatchInfo, callback);
        }