private string imgaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); System.Text.StringBuilder sb = new System.Text.StringBuilder(""); string flag = "1"; try { Business.Order.BusinessWorkOrder bc = new project.Business.Order.BusinessWorkOrder(); bc.load(jp.getValue("id")); Business.Base.BusinessFlowNode node = new Business.Base.BusinessFlowNode(); foreach (Entity.Base.EntityFlowNode it in node.GetFlowNodeListQuery(string.Empty, string.Empty, user.Entity.AccID)) { Business.Order.BusinessWorkOrderImages bd = new Business.Order.BusinessWorkOrderImages(); if (bd.GetWorkOrderImagesCount(user.Entity.AccID, bc.Entity.OrderNo, it.NodeNo) > 0) { sb.Append("<div class=\"row cl\" style=\"border-bottom:solid 1px #AFD4E2; height:150px;\">"); sb.Append("<label class=\"form-label col-1\">" + it.NodeName + "</label>"); sb.Append("<div class=\"formControls col-8\">"); foreach (Entity.Order.EntityWorkOrderImages it1 in bd.GetWorkOrderImagesQuery(user.Entity.AccID, bc.Entity.OrderNo, it.NodeNo)) { sb.Append("<img style=\"width:120px; height:120px; margin:10px;\" alt=\"\" src=\"../../upload/" + it1.Img + "\" />"); } sb.Append("</div>"); sb.Append("</div>"); } } if (sb.ToString() == "") { sb.Append("<div class=\"row cl\">"); sb.Append("<div class=\"formControls col-8\" style=\"margin-left:30px;\">当前工单没有图片信息!</div>"); sb.Append("</div>"); } } catch { flag = "2"; } collection.Add(new JsonStringValue("liststr", sb.ToString())); collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("type", "img")); return(collection.ToString()); }
private string createList() { System.Text.StringBuilder sb = new System.Text.StringBuilder(""); sb.Append("<table class=\"table table-border table-bordered table-hover table-bg\" id=\"tablelist\">"); sb.Append("<thead>"); sb.Append("<tr class=\"text-c\">"); sb.Append("<th width=\"30\">序号</th>"); sb.Append("<th width='100'>流程编号</th>"); sb.Append("<th width='100'>流程名称</th>"); sb.Append("<th width='200'>操作内容</th>"); sb.Append("</tr>"); sb.Append("</thead>"); int r = 1; sb.Append("<tbody>"); Business.Base.BusinessFlowNode bc = new Business.Base.BusinessFlowNode(); foreach (Entity.Base.EntityFlowNode it in bc.GetFlowNodeListQuery(string.Empty, string.Empty, user.Entity.AccID)) { if (it.NodeNo == "N") { continue; } sb.Append("<tr class=\"text-c\" id=\"" + it.NodeNo + "\">"); sb.Append("<td align='center'>" + r.ToString() + "</td>"); sb.Append("<td>" + it.NodeNo + "</td>"); sb.Append("<td>" + it.NodeName + "</td>"); sb.Append("<td>" + it.OpName + "</td>"); sb.Append("</tr>"); r++; } sb.Append("</tbody>"); sb.Append("</table>"); return(sb.ToString()); }
private string createList(string Name) { System.Text.StringBuilder sb = new System.Text.StringBuilder(""); if (Request.QueryString["type"] == "dept") { 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='10%'>勾选</th>"); sb.Append("<th width='30%'>部门编号</th>"); sb.Append("<th width='60%'>部门名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Sys.BusinessDept pt = new project.Business.Sys.BusinessDept(); foreach (Entity.Sys.EntityDept it in pt.GetDeptListQuery(string.Empty, Name, user.Entity.AccID, string.Empty)) { sb.Append("<tr class=\"text-c\">"); sb.Append("<td align='center'><input type='checkbox' name='chk' id='" + it.DeptNo + "' value='" + it.DeptName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.DeptNo + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.DeptName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); } if (Request.QueryString["type"] == "user") { 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='10%'>勾选</th>"); sb.Append("<th width='20%'>用户编号</th>"); sb.Append("<th width='30%'>用户名称</th>"); sb.Append("<th width='40%'>所属部门</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Sys.BusinessUserInfo pt = new project.Business.Sys.BusinessUserInfo(); foreach (Entity.Sys.EntityUserInfo it in pt.GetUserInfoListQuery(string.Empty, user.Entity.AccID, string.Empty, Name)) { sb.Append("<tr class=\"text-c\">"); sb.Append("<td align='center'><input type='checkbox' name='chk' id='" + it.UserNo + "' value='" + it.UserName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.UserNo + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.UserName + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.DeptName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); } if (Request.QueryString["type"] == "ordertype") { 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='10%'>勾选</th>"); sb.Append("<th width='30%'>工单类型编号</th>"); sb.Append("<th width='60%'>工单类型名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessOrderType bc = new Business.Base.BusinessOrderType(); foreach (Entity.Base.EntityOrderType it in bc.GetOrderTypeListQuery(string.Empty, Name, string.Empty, user.Entity.AccID)) { sb.Append("<tr class=\"text-c\">"); sb.Append("<td align='center'><input type='checkbox' name='chk' id='" + it.OrderTypeNo + "' value='" + it.OrderTypeName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.OrderTypeNo + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.OrderTypeName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); } if (Request.QueryString["type"] == "node") { 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='10%'>勾选</th>"); sb.Append("<th width='30%'>节点编号</th>"); sb.Append("<th width='60%'>节点名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessFlowNode bc = new Business.Base.BusinessFlowNode(); foreach (Entity.Base.EntityFlowNode it in bc.GetFlowNodeListQuery(string.Empty, Name, user.Entity.AccID)) { if (it.NodeNo == "N") { continue; } sb.Append("<tr class=\"text-c\">"); sb.Append("<td align='center'><input type='checkbox' name='chk' id='" + it.NodeNo + "' value='" + it.NodeName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.NodeNo + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.NodeName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); } if (Request.QueryString["type"] == "op") { 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='10%'>勾选</th>"); sb.Append("<th width='90%'>操作</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessOperate bc = new Business.Base.BusinessOperate(); foreach (Entity.Base.EntityOperate it in bc.GetOpListQuery(string.Empty, Name, user.Entity.AccID)) { sb.Append("<tr class=\"text-c\">"); sb.Append("<td align='center'><input type='checkbox' name='chk' id='" + it.OpNo + "' value='" + it.OpName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.OpName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); } return(sb.ToString()); }