Exemplo n.º 1
0
    /// <summary>
    /// 绑定Grid
    /// </summary>
    protected void BindGrid()
    {
        MBusinessBB businessBB = new MBusinessBB();
        DataSet ds = new DataSet();

        try
        {
            string strWhere = "1=1";
            if (this.empId.Value != "")
            {
                strWhere += " and empId =" + this.empId.Value;
            }
            if (this.sendTime.Text != "")
            {
                strWhere += " and dbo.GetCurrDate(sendTime) = '" + this.sendTime.Text + "'";
            }
            if (this.isRead.SelectedValue != "")
            {
                strWhere += " and isRead =" + this.isRead.SelectedValue;
            }

            ds = businessBB.GetPersonalBusiness(this.currentUser.empId, this.currentUser.nowDepartId, strWhere);

            // 组合列表属性
            StringBuilder sBuilder = new StringBuilder();
            sBuilder.Append("标题|@messageTitle|@|@left");
            sBuilder.Append("|!发送人|@empNm|@|@left");
            sBuilder.Append("|!发送时间|@sendTime|@|@left");
            sBuilder.Append("|!已读|@isReadDesc|@|@center");

            //关联属性
            this.dataGrid.TitleDescription = sBuilder.ToString();
            this.dataGrid.DataSource = ds.Tables[0];
        }
        finally
        {
            businessBB.Dispose();
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 绑定Grid
    /// </summary>
    protected void BindGrid()
    {
        MBusinessBB businessBB = new MBusinessBB();
        DataSet ds = new DataSet();

        try
        {
            ds = businessBB.GetPersonalBusiness(this.currentUser.empId, this.currentUser.nowDepartId, this.StrWhere);

            // 组合列表属性
            StringBuilder sBuilder = new StringBuilder();
            sBuilder.Append("标题|@messageTitle|@|@left");
            sBuilder.Append("|!发送人|@empNm|@|@left");
            sBuilder.Append("|!时间|@sendTime|@|@left");

            //关联属性
            this.dataGrid.TitleDescription = sBuilder.ToString();
            this.dataGrid.DataSource = ds.Tables[0];
        }
        finally
        {
            businessBB.Dispose();
        }
    }