コード例 #1
0
 //搜索事件 zal 2015-07-15
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     RG_GoodsPriceList.Rebind();
     if (GoodsClassId == Guid.Empty && !string.IsNullOrEmpty(rcb_Brand.SelectedValue) && !new Guid(rcb_Brand.SelectedValue).Equals(Guid.Empty))
     {
         RAM.Alert("请选择“商品分类”!");
     }
 }
コード例 #2
0
 /// <summary>
 /// 商品分类树点击事件
 /// </summary>
 protected void TvGoodsClassNodeClick(object sender, RadTreeNodeEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Node.Value))
     {
         GoodsClassId = new Guid(e.Node.Value);
         RG_GoodsPriceList.CurrentPageIndex = 0;
         RG_GoodsPriceList.Rebind();
     }
     else
     {
         GoodsClassId = Guid.Empty;
     }
 }
コード例 #3
0
        //修改加盟价
        protected void txt_ChangeJoinPrice_OnTextChanged(object sender, EventArgs e)
        {
            var textBox  = (TextBox)sender;
            var dataItem = ((GridDataItem)textBox.Parent.Parent);

            if (dataItem != null)
            {
                var goodsId      = new Guid(dataItem.GetDataKeyValue("GoodsID").ToString());
                var joinPriceNew = Convert.ToDecimal(textBox.Text);
                try
                {
                    string errorMsg;
                    bool   result = _goodsCenterSao.UpdateJoinPrice(goodsId, joinPriceNew, out errorMsg);
                    if (result)
                    {
                        var goodsCode    = dataItem.GetDataKeyValue("GoodsCode").ToString();
                        var goodsName    = dataItem.GetDataKeyValue("GoodsName").ToString();
                        var joinPriceOld = Convert.ToDecimal(dataItem.GetDataKeyValue("JoinPrice").ToString());
                        if (!joinPriceOld.Equals(joinPriceNew))
                        {
                            var goodsPriceChange = new Model.GoodsPriceChange
                            {
                                Id               = Guid.NewGuid(),
                                Name             = CurrentSession.Personnel.Get().RealName,
                                Datetime         = DateTime.Now,
                                GoodsId          = goodsId,
                                GoodsName        = goodsName,
                                GoodsCode        = goodsCode,
                                SaleFilialeId    = Guid.Empty,
                                SaleFilialeName  = string.Empty,
                                SalePlatformId   = Guid.Empty,
                                SalePlatformName = string.Empty,
                                OldPrice         = joinPriceOld,
                                NewPrice         = joinPriceNew,
                                Quota            = joinPriceOld - joinPriceNew,
                                Type             = 1
                            };
                            _goodsPriceChange.AddGoodsPriceChange(goodsPriceChange);
                        }
                        RG_GoodsPriceList.Rebind();
                    }
                }
                catch (Exception ex)
                {
                    RAM.Alert("无效的操作。" + ex.Message);
                }
            }
        }
コード例 #4
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     RG_GoodsPriceList.Rebind();
 }