예제 #1
0
        //private void LoadSaleFiliale()
        //{
        //    rcb_SaleFiliale.DataSource = CacheCollection.Filiale.GetHeadList();
        //    rcb_SaleFiliale.DataTextField = "Name";
        //    rcb_SaleFiliale.DataValueField = "ID";
        //    rcb_SaleFiliale.DataBind();
        //    rcb_SaleFiliale.Items.Insert(0, new RadComboBoxItem("全部", Guid.Empty.ToString()));
        //    rcb_SaleFiliale.SelectedIndex = 0;
        //}
        /// <summary>
        /// 加载销售公司
        /// </summary>
        /// <summary>
        /// 销售公司OnSelectedIndexChanged事件
        /// </summary>
        //protected void rcb_SaleFiliale_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        //{
        //    var rcbSaleFilialeId = new Guid(rcb_SaleFiliale.SelectedValue);

        //    rcb_SalePlatform.Items.Clear();
        //    rcb_SalePlatform.DataSource = rcbSaleFilialeId == Guid.Empty ? CacheCollection.SalePlatform.GetList() : CacheCollection.SalePlatform.GetListByFilialeId(rcbSaleFilialeId);
        //    rcb_SalePlatform.DataTextField = "Name";
        //    rcb_SalePlatform.DataValueField = "ID";
        //    rcb_SalePlatform.DataBind();
        //    rcb_SalePlatform.Items.Insert(0, new RadComboBoxItem("全部", Guid.Empty.ToString()));
        //    rcb_SalePlatform.SelectedIndex = 0;
        //}

        #endregion

        #region 绑定数据源
        protected void RG_GoodsPriceChange_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            var dataList = new List <Model.GoodsPriceChange>();

            if (IsPostBack)
            {
                var startPage = RG_GoodsPriceChange.CurrentPageIndex + 1;
                int pageSize  = RG_GoodsPriceChange.PageSize;
                var goodsId   = Guid.Empty;
                if (!string.IsNullOrWhiteSpace(txt_GoodsCode.Text))
                {
                    var goodsInfo = _goodsCenterSao.GetGoodsBaseInfoByCode(txt_GoodsCode.Text);
                    if (goodsInfo != null)
                    {
                        goodsId = goodsInfo.GoodsId;
                    }
                }
                int total;
                dataList = _goodsPriceChange.GetAllGoodsPriceChange(null, null, txt_GoodsName.Text, goodsId, int.Parse(rcb_Type.SelectedValue), startPage, pageSize, out total);
                RG_GoodsPriceChange.VirtualItemCount = total;
            }
            RG_GoodsPriceChange.DataSource = dataList;
        }
 /// <summary>
 /// 返回GoodsPriceChange表的所有数据
 /// </summary>
 /// <returns></returns>
 public List <GoodsPriceChange> GetAllGoodsPriceChange()
 {
     return(_goodsPriceChange.GetAllGoodsPriceChange());
 }