/// <summary> /// 按钮—选择商品 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSelectGoods_Click(object sender, RoutedEventArgs e) { if (!PubHelper.CheckIsManager1Purview("12")) { return; } PubHelper.p_BusinOper.GoodsOper.CurrentGoods = null; FrmGoodsChoice frmGoodsChoice = new FrmGoodsChoice(); frmGoodsChoice.ShowDialog(); if ((PubHelper.p_BusinOper.GoodsOper.CurrentGoods != null) && (currentGoodsWay.CurrentGoodsWayProduct != null)) { GoodsModel mcdInfo = new GoodsModel(); mcdInfo.McdCode = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.McdCode; mcdInfo.McdName = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.McdName; mcdInfo.McdContent = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.McdContent; mcdInfo.PicName = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.PicName; bool result = PubHelper.p_BusinOper.UpdateAsileGoods(currentGoodsWay.CurrentGoodsWayProduct.PaCode, mcdInfo); if (result) { PubHelper.p_IsRefreshAsile = true; if (PubHelper.p_BusinOper.ConfigInfo.GoodsShowModel == BusinessEnum.GoodsShowModelType.GoodsType) { PubHelper.p_IsRefreshGoodsType = true; } // 更改货道商品显示 tbMcdCode_Value.Text = mcdInfo.McdCode; tbMcdName_Value.Text = mcdInfo.McdName; tbMcdContent_Value.Text = mcdInfo.McdContent; currentGoodsWay.CurrentGoodsWayProduct.McdCode = tbMcdCode_Value.Text; currentGoodsWay.CurrentGoodsWayProduct.McdName = tbMcdName_Value.Text; currentGoodsWay.CurrentGoodsWayProduct.McdPicName = mcdInfo.PicName; currentGoodsWay.CurrentGoodsWayProduct.McdContent = mcdInfo.McdContent; SetAsileInfo(currentGoodsWay); currentGoodsWay.SetAsilePic(); if (!string.IsNullOrEmpty(mcdInfo.McdCode)) { if (PubHelper.p_BusinOper.ConfigInfo.GoodsShowModel != BusinessEnum.GoodsShowModelType.GoodsToOnlyAsile) { // 如果商品展示模式不是商品对应货道模式,则不能做移除商品处理 btnRemoveGoods.IsEnabled = false; } else { btnRemoveGoods.IsEnabled = true; } } } else { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); } } }