示例#1
0
        private XmlDocument getXmlDocument()
        {
            BLL.tb_SYS_Account bllAccount = new BLL.tb_SYS_Account();
            DataTable          dtAccount  = bllAccount.GetList("ID='" + Session["AccountID"] + "'").Tables[0];

            BLL.tb_SYS_RoleXML bllRoleXML  = new BLL.tb_SYS_RoleXML();
            DataTable          dtRoleXML   = bllRoleXML.GetList("RoleID='" + dtAccount.Rows[0]["RoleID"].ToString() + "'").Tables[0];
            XmlDocument        xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(dtRoleXML.Rows[0]["XML"].ToString());
            return(xmlDocument);
        }
示例#2
0
文件: List.aspx.cs 项目: Marveliu/erp
        //Grid绑定数据源
        private void BindGrid()
        {
            string sortField     = gridAccount.SortField;
            string sortDirection = gridAccount.SortDirection;

            BLL.tb_SYS_Account bllAccount = new BLL.tb_SYS_Account();
            DataSet            dsAccount  = bllAccount.GetList(condition.ToString());
            DataView           dvAccount  = dsAccount.Tables[0].DefaultView;

            dvAccount.Sort = String.Format("{0} {1}", sortField, sortDirection);

            DataTable dtSource = dvAccount.ToTable();

            gridAccount.RecordCount = dtSource.Rows.Count;
            DataTable dtCurrent = PublicMethod.getPageTable(dtSource, gridAccount.PageIndex, gridAccount.PageSize);

            gridAccount.DataSource = dtCurrent;
            gridAccount.DataBind();
        }