Пример #1
0
        private string createList(string RMID, string RMLOCNo1, string RMLOCNo2, string RMLOCNo3, string RMLOCNo4, string RMCurrentRMNo, string RMStatus, 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=\"5%\">序号</th>");
            sb.Append("<th width='14%'>房间编号</th>");
            sb.Append("<th width='8%'>房间号</th>");
            sb.Append("<th width='14%'>园区/建设期/楼栋/楼层</th>");
            sb.Append("<th width='8%'>出租类型</th>");
            sb.Append("<th width='8%'>出租面积</th>");
            sb.Append("<th width='6%'>状态</th>");
            sb.Append("<th width='6%'>是否禁用</th>");
            sb.Append("<th width='15%'>租客名称</th>");
            sb.Append("<th width='8%'>预留日期</th>");
            sb.Append("<th width='8%'>操作</th>");
            sb.Append("</tr>");
            sb.Append("</thead>");

            int r = 1;

            sb.Append("<tbody>");
            Business.Base.BusinessRoom bc = new project.Business.Base.BusinessRoom();
            foreach (Entity.Base.EntityRoom it in bc.GetListQuery(RMID, RMLOCNo1, RMLOCNo2, RMLOCNo3, RMLOCNo4, RMCurrentRMNo, string.Empty, RMStatus, null, page, pageSize))
            {
                sb.Append("<tr class=\"text-c\" id=\"" + it.RMID + "\">");
                sb.Append("<td style=\"text-align:center;\">" + r.ToString() + "</td>");
                sb.Append("<td>" + it.RMID + "</td>");
                sb.Append("<td>" + it.RMNo + "</td>");
                sb.Append("<td>" + it.RMLOCNo1Name + "/" + it.RMLOCNo2Name + "/" + it.RMLOCNo3Name + "/" + it.RMLOCNo4Name + "</td>");
                sb.Append("<td>" + it.RMRentTypeName + "</td>");
                sb.Append("<td>" + it.RMRentSize.ToString("0.####") + "</td>");
                sb.Append("<td class=\"td-status\"><span class=\"label " + (it.RMStatus == "use" ? "label-success" : "") + " radius\">" + it.RMStatusName + "</span></td>");
                sb.Append("<td class=\"td-status\"><span class=\"label " + (it.RMISEnable == false ? "label-success" : "") + " radius\">" + (it.RMISEnable == false ? "正常" : "已禁用") + "</span></td>");
                sb.Append("<td>" + it.RMCurrentCustName + "</td>");
                sb.Append("<td>" + ParseStringForDate(it.RMEndReservedDate) + "</td>");
                if (it.RMStatus == "use")
                {
                    sb.Append("<td></td>");
                }
                else if (it.RMStatus == "free")
                {
                    sb.Append("<td><input class=\"btn btn-primary radius size-MINI\" style=\"padding:0px 10px; margin:0px;\" type=\"button\" value=\"预留\" onclick=\"reserve('" + it.RMID + "')\" /></td>");
                }
                else
                {
                    sb.Append("<td><input class=\"btn btn-primary radius size-MINI\" style=\"padding:0px 10px; margin:0px;\" type=\"button\" value=\"取消预留\" onclick=\"unreserve('" + it.RMID + "')\" /></td>");
                }
                sb.Append("</tr>");
                r++;
            }
            sb.Append("</tbody>");
            sb.Append("</table>");

            sb.Append(Paginat(bc.GetListCount(RMID, RMLOCNo1, RMLOCNo2, RMLOCNo3, RMLOCNo4, RMCurrentRMNo, string.Empty, RMStatus, null), pageSize, page, 7));

            return(sb.ToString());
        }
Пример #2
0
        private string createList(string RMLOCNo1, string RMLOCNo2, string RMLOCNo3, string RMLOCNo4, string RMID, string CustName, 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.BusinessRoom pt = new project.Business.Base.BusinessRoom();
                foreach (Entity.Base.EntityRoom it in pt.GetListQuery(RMID, RMLOCNo1, RMLOCNo2, RMLOCNo3, RMLOCNo4, string.Empty, CustName, string.Empty, false, page, 15))
                {
                    string guid = Guid.NewGuid().ToString().Substring(0, 6);
                    sb.Append("<tr class=\"text-c\" id='" + guid + "' onclick='submit(\"" + it.RMID + "\",\"" + guid + "\")'>");
                    sb.Append("<td style='white-space: nowrap;'>" + it.RMID + "<input type='hidden' id='it" + guid + "' value='" + it.RMID + "' /></td>");
                    sb.Append("<td style='white-space: nowrap;'>" + it.RMCurrentCustName + "</td>");
                    sb.Append("</tr>");
                }
                sb.Append("</tbody>");
                sb.Append("</table>");
                sb.Append(Paginat(pt.GetListCount(RMID, RMLOCNo1, RMLOCNo2, RMLOCNo3, RMLOCNo4, string.Empty, CustName, string.Empty, false), 15, page, 5));
            }
            catch { }
            return(sb.ToString());
        }