Esempio n. 1
0
    private void RptBind(string _strWhere, string _orderby)
    {
        this.page = AXRequest.GetQueryInt("page", 1);

        if (this.depot_category_id > 0)
        {
            this.ddldepot_category_id.SelectedValue = this.depot_category_id.ToString();
        }
        if (this.depot_id > 0)
        {
            this.ddldepot_id.SelectedValue = this.depot_id.ToString();
        }

        txtNote_no.Text     = this.note_no;
        txtstart_time.Value = this.start_time;
        txtstop_time.Value  = this.stop_time;

        ps_salse_depot bll = new ps_salse_depot();

        this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
        this.rptList.DataBind();

        //this.Literal_go_price.Text = MyConvert(bll.GetTitleSum(_strWhere, "sum(goods_price)"));
        //this.Literal_zongprice.Text = MyConvert(bll.GetTitleSum(_strWhere, "sum(real_price)"));
        //this.Literal_zongprice_sj.Text = MyConvert(bll.GetTitleSum(_strWhere, "sum(quantity)"));
        this.Literal_lrprice.Text = MyConvert(Convert.ToDecimal(bll.GetTitleSum(_strWhere, " sum(real_price*quantity)")) - Convert.ToDecimal(bll.GetTitleSum(_strWhere, "sum(goods_price*quantity)")));
        this.Literal_hj.Text      = MyConvert(Convert.ToDecimal(bll.GetTitleSum(_strWhere, "sum(real_price*quantity)")));

        //绑定页码
        txtPageNum.Text = this.pageSize.ToString();
        string pageUrl = Utils.CombUrlTxt("sales_list.aspx", "depot_category_id={0}&depot_id={1}&start_time={2}&stop_time={3}&note_no={4}&page={5}", this.depot_category_id.ToString(), this.depot_id.ToString(), this.txtstart_time.Value, this.txtstop_time.Value, txtNote_no.Text, "__id__");

        PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Esempio n. 2
0
    //绑定记录
    public void binddr()
    {
        string         sqlstr    = "";
        string         _strWhere = "";
        ps_salse_depot bll       = new ps_salse_depot();

        if (Convert.ToInt32(Session["DepotID"]) == 0 && Convert.ToInt32(Session["DepotCatID"]) == 0)
        {
            _strWhere = "id>0 ";
        }
        _strWhere = _strWhere + CombSqlTxt(this.depot_category_id, this.depot_id, this.note_no, this.start_time, this.stop_time);

        sqlstr = _strWhere + " order by add_time desc,id desc";
        DataView dv = bll.GetList(sqlstr).Tables[0].DefaultView;

        repCategory.DataSource = dv;
        repCategory.DataBind();

        //合计
        this.Literal_lrprice.Text = MyConvert(Convert.ToDecimal(bll.GetTitleSum(_strWhere, " sum(real_price*quantity)")) - Convert.ToDecimal(bll.GetTitleSum(_strWhere, "sum(goods_price*quantity)")));
        this.Literal_hj.Text      = MyConvert(Convert.ToDecimal(bll.GetTitleSum(_strWhere, "sum(real_price*quantity)")));
    }