예제 #1
0
        private string createList(int page)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder("");
            try
            {
                sb.Append("<table class=\"table table-border table-bordered table-hover table-bg table-sort\" id=\"tablelist\">");
                sb.Append("<thead>");
                sb.Append("<tr class=\"text-c\">");
                sb.Append("<th width='30%'>工位编号</th>");
                sb.Append("<th width='70%'>工位人数</th>");
                sb.Append("</tr>");
                sb.Append("</thead>");

                sb.Append("<tbody>");
                Business.Base.BusinessWorkPlace pt = new project.Business.Base.BusinessWorkPlace();
                foreach (Entity.Base.EntityWorkPlace it in pt.GetListQuery(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                                                                           Request.QueryString["RMID"].ToString(), string.Empty, page, 15))
                {
                    sb.Append("<tr class=\"text-c\" id='" + it.WPNo + "' onclick='submit(\"" + it.WPNo + "\")'>");
                    sb.Append("<td style='white-space: nowrap;'>" + it.WPNo + "<input type='hidden' id='it" + it.WPNo + "' value='" + it.WPNo + "' /></td>");
                    sb.Append("<td style='white-space: nowrap;'>" + it.WPSeat.ToString() + "</td>");
                    sb.Append("</tr>");
                }
                sb.Append("</tbody>");
                sb.Append("</table>");
                sb.Append(Paginat(pt.GetListCount(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                                                  Request.QueryString["RMID"].ToString(), string.Empty), 15, page, 5));
            }
            catch { }
            return(sb.ToString());
        }
예제 #2
0
        private string createList(string WPNo, string WPType, string WPLOCNo1, string WPLOCNo2, string WPLOCNo3, string WPLOCNo4, string WPRMID, string WPStatus, int page)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder("");

            sb.Append("<table class=\"table table-border table-bordered table-hover table-bg table-sort\" id=\"tablelist\">");
            sb.Append("<thead>");
            sb.Append("<tr class=\"text-c\">");
            sb.Append("<th width=\"4%\">序号</th>");
            sb.Append("<th width='15%'>工位编号</th>");
            sb.Append("<th width='12%'>房间编号</th>");
            sb.Append("<th width='15%'>园区/建设期/楼栋/楼层</th>");
            sb.Append("<th width='11%'>所属项目</th>");
            sb.Append("<th width='5%'>人数</th>");
            sb.Append("<th width='7%'>每工位单价</th>");
            sb.Append("<th width='6%'>状态</th>");
            sb.Append("<th width='6%'>是否禁用</th>");
            sb.Append("<th width='21%'>地址</th>");
            sb.Append("</tr>");
            sb.Append("</thead>");

            int r = 1;

            sb.Append("<tbody>");
            Business.Base.BusinessWorkPlace bc = new project.Business.Base.BusinessWorkPlace();
            foreach (Entity.Base.EntityWorkPlace it in bc.GetListQuery(WPNo, WPType, WPLOCNo1, WPLOCNo2, WPLOCNo3, WPLOCNo4, WPRMID, WPStatus, page, pageSize))
            {
                sb.Append("<tr class=\"text-c\" id=\"" + it.WPNo + "\">");
                sb.Append("<td style=\"text-align:center;\">" + r.ToString() + "</td>");
                sb.Append("<td>" + it.WPNo + "</td>");
                sb.Append("<td>" + it.WPRMID + "</td>");
                sb.Append("<td>" + it.WPLOCNo1Name + "/" + it.WPLOCNo2Name + "/" + it.WPLOCNo3Name + "/" + it.WPLOCNo4Name + "</td>");
                sb.Append("<td>" + it.WPProject + "</td>");
                sb.Append("<td>" + it.WPSeat + "</td>");
                sb.Append("<td>" + it.WPSeatPrice.ToString("0.####") + "</td>");
                sb.Append("<td class=\"td-status\"><span class=\"label " + (it.WPStatus == "use" ? "label-success" : "") + " radius\">" + it.WPStatusName + "</span></td>");
                sb.Append("<td class=\"td-status\"><span class=\"label " + (it.WPISEnable == false ? "label-success" : "") + " radius\">" + (it.WPISEnable == false ? "正常" : "已禁用") + "</span></td>");
                sb.Append("<td>" + it.WPAddr + "</td>");
                sb.Append("</tr>");
                r++;
            }
            sb.Append("</tbody>");
            sb.Append("</table>");

            sb.Append(Paginat(bc.GetListCount(WPNo, WPType, WPLOCNo1, WPLOCNo2, WPLOCNo3, WPLOCNo4, WPRMID, WPStatus), pageSize, page, 7));

            return(sb.ToString());
        }