MVC 后台DataTable 前台遍歷


      /// <summary>
        /// 多級審批流展示
        /// </summary>
        /// <returns></returns>
        public ActionResult AddMoreflow()
        {
            string userid = CommConst.CurrentAccountId;
            DataSet ds = CheckFlowService.LCheckFlowBLL.GetNowFlowList(userid);
            DataTable dt = ds.Tables[0];
            return View(dt);
        }

前台

@using System.Data;   

 @foreach (DataRow item in Model.Rows)
    {
        <table class="table table-bordered">
            <tr>
                <td>流程提交人</td>
                <td>@item["formid"]</td>
                <td>處理狀態</td>
                <td>@item["state"]</td>
            </tr>
            <tr>
                <td>內容</td>
                <td colspan="3">@item["checkcontent"]</td>
            </tr>
            <tr>
                <td>時間</td>
                <td colspan="3">@item["checkinserttime"]</td>
            </tr>
        </table>
    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM