private string getrmid4action(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; string result = "";; try { Business.Base.BusinessRoom bc = new Business.Base.BusinessRoom(); bc.load(jp.getValue("rmid")); collection.Add(new JsonStringValue("RMID", bc.Entity.RMID)); collection.Add(new JsonStringValue("RMBuildSize", bc.Entity.RMBuildSize.ToString("0.####"))); } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "getrmid4")); collection.Add(new JsonStringValue("flag", flag)); result = collection.ToString(); return(result); }
private string getRMList(string RMLOCNo1, string RMLOCNo2, string RMLOCNo3, string RMID, string CustName, string RMStatus) { StringBuilder sb = new StringBuilder(); Business.Base.BusinessLocation loc = new Business.Base.BusinessLocation(); foreach (Entity.Base.EntityLocation it in loc.GetListQuery(string.Empty, string.Empty, RMLOCNo3)) { sb.Append("<div class=\"mb-10\" style=\"clear:both;\">"); sb.Append("<h3>" + it.LOCName + "</h3>"); Business.Base.BusinessRoom br = new Business.Base.BusinessRoom(); foreach (Entity.Base.EntityRoom it1 in br.GetListQuery(RMID, RMLOCNo1, RMLOCNo2, RMLOCNo3, it.LOCNo, string.Empty, CustName, RMStatus, false)) { sb.Append("<div class=\"div-room pd-10 radius cl mr-10 mb-10\">"); if (it1.RMStatus == "free") { sb.Append("<div class=\"room-status c-red \"><label class=\"c-green\">空闲</label></div>"); } else if (it1.RMStatus == "use") { sb.Append("<div class=\"room-status\"><label class=\"c-red\">已租</label></div>"); } else { sb.Append("<div class=\"room-status c-red\"> <label class=\"c-orange\">预留</label></div>"); } sb.Append("<div class=\"room-text\">" + it1.RMNo + "</div>"); sb.Append("<div class=\"text-c div-name va-m\"><strong>" + it1.RMCurrentCustName + "</strong></div>"); sb.Append("<span class=\"span-w text-l dil-b f-l va-m\">" + it1.RMRentSize.ToString("0.####") + "平米</span>"); //<span class=\"span-w text-r dil-b f-l va-m\"></span> sb.Append("</div>"); } sb.Append("</div>"); } return(sb.ToString()); }