示例#1
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        string StorageID = Request.QueryString["KeyID"];

        this.StorageID.Value = StorageID;
        if (!string.IsNullOrWhiteSpace(StorageID))
        {
            Hi.Model.YZT_Storage storageModel = new Hi.BLL.YZT_Storage().GetModel(Convert.ToInt32(StorageID));
            if (storageModel != null)
            {
                this.ddrComp.Value    = storageModel.CompID.ToString();
                txtStorageDate.Value  = storageModel.StorageDate.ToString("yyyy-MM-dd");
                lblStorageType1.Value = storageModel.StorageType.ToString();
                this.StorageNO.Value  = storageModel.StorageNO;
                OrderNote.Value       = storageModel.Remark;
            }

            List <Hi.Model.YZT_StorageDetail> storageDetailList = new Hi.BLL.YZT_StorageDetail().GetList("", " dr=0 and StorageID=" + StorageID + "", "");
            Rep_StorageDetail.DataSource = storageDetailList;
            Rep_StorageDetail.DataBind();
            if (storageDetailList.Count > 0)
            {
                oneTR.Visible = false;
            }
        }
    }
示例#2
0
    /// <summary>
    /// 绑定销售订单信息列表
    /// </summary>
    public void Bind()
    {
        int    pageCount = 0;
        int    Counts    = 0;
        string strwhere  = " and DisID=" + this.DisID;

        if (ViewState["strwhere"] != null)
        {
            strwhere += ViewState["strwhere"].ToString();
        }

        List <Hi.Model.YZT_Storage> list = new Hi.BLL.YZT_Storage().GetList(Pager.PageSize, Pager.CurrentPageIndex, "CreateDate", true, strwhere, out pageCount, out Counts);

        this.rptOrder.DataSource = list;
        this.rptOrder.DataBind();

        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }