private string newpasswordaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; try { Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo(); bc.load(jp.getValue("id")); string newpwd = getRandom(); bc.Entity.Password = Encrypt.EncryptDES(newpwd, "1"); int r = bc.changepwd(); if (r <= 0) { flag = "2"; } collection.Add(new JsonStringValue("type", "newpassword")); collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("newpassword", newpwd)); } catch { flag = "2"; } return(collection.ToString()); }
private string submitaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; try { Business.Sys.BusinessUserInfo bu = new project.Business.Sys.BusinessUserInfo(); bu.load(userid); if (bu.Entity.Password == Encrypt.EncryptDES(jp.getValue("oldpwd"), "1")) { bu.Entity.Password = Encrypt.EncryptDES(jp.getValue("newpwd"), "1"); bu.changepwd(); } else { flag = "3"; } } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "submit")); collection.Add(new JsonStringValue("flag", flag)); return(collection.ToString()); }
private string validaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; try { Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo(); bc.load(jp.getValue("id")); bc.Entity.Valid = !bc.Entity.Valid; int r = bc.valid(); if (r <= 0) { flag = "2"; } if (bc.Entity.Valid) { collection.Add(new JsonStringValue("stat", "<span class=\"label label-success radius\">有效</span>")); } else { collection.Add(new JsonStringValue("stat", "<span class=\"label radius\">已失效</span>")); } collection.Add(new JsonStringValue("id", jp.getValue("id"))); } catch { flag = "2"; } collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("type", "valid")); return(collection.ToString()); }
private string updateaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; string result = "";; try { Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo(); bc.load(jp.getValue("id")); collection.Add(new JsonStringValue("UserNo", bc.Entity.UserNo)); collection.Add(new JsonStringValue("UserName", bc.Entity.UserName)); collection.Add(new JsonStringValue("UserType", bc.Entity.UserType)); collection.Add(new JsonStringValue("DeptNo", bc.Entity.DeptNo)); collection.Add(new JsonStringValue("Tel", bc.Entity.Tel)); collection.Add(new JsonStringValue("Email", bc.Entity.Email)); collection.Add(new JsonStringValue("Addr", bc.Entity.Addr)); collection.Add(new JsonStringValue("Manager", bc.Entity.Manager)); collection.Add(new JsonStringValue("ManagerName", bc.Entity.ManagerName)); collection.Add(new JsonStringValue("Picture", bc.Entity.Picture)); } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "update")); collection.Add(new JsonStringValue("flag", flag)); result = collection.ToString(); return(result); }
private string deleteaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; try { Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo(); bc.load(jp.getValue("id")); if (bc.Entity.UserNo.ToUpper() == "ADMIN") { flag = "3"; } else { int r = bc.delete(); if (r <= 0) { flag = "2"; } } } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "delete")); collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("liststr", createList(string.Empty, jp.getValue("UserNameS")))); return(collection.ToString()); }
protected void login() { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "0"; string userid = ""; try { string u_name = System.Web.HttpUtility.UrlDecode(Request.QueryString["uname"]); string u_password = Request.QueryString["upassword"]; if (u_name != "" && u_name != null && u_password != "" && u_password != null) { Business.Sys.BusinessUserInfo bu = new project.Business.Sys.BusinessUserInfo(); ArrayList list = new ArrayList(bu.Login(u_name, Encrypt.EncryptDES(u_password, "1"))); if (list.Count > 0) { try { Business.Sys.BusinessUserLog log = new Business.Sys.BusinessUserLog(); log.Entity.LogUser = ((Entity.Sys.EntityUserInfo)(list[0])).UserNo; log.Entity.LogDate = GetDate(); log.Entity.LogIP = ""; log.Entity.LogType = "1"; log.Save(); } catch { } flag = "1"; userid = Encrypt.EncryptDES(((Entity.Sys.EntityUserInfo)(list[0])).InnerEntityOID, "1"); } } } catch { } collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("id", userid)); Response.Write(collection.ToString()); }
private string createList(string Name) { System.Text.StringBuilder sb = new System.Text.StringBuilder(""); 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='30%'>用户编号</th>"); sb.Append("<th width='60%'>用户名称</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, 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("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); } return(sb.ToString()); }
protected override void Page_Load(object sender, EventArgs e) { try { HttpCookie hc = getCookie("1"); if (hc != null) { string str = hc.Value.Replace("%3D", "="); string userid = Encrypt.DecryptDES(str, "1"); user = new project.Business.Sys.BusinessUserInfo(); user.load(userid); if (user.Entity.UserType.ToUpper() != "ADMIN") { Response.Write(errorpage); return; } if (!Page.IsCallback) { string firsttype = ""; TypeStr = "<select id='UserType' class='input-text' style='width:120px;'>"; Business.Sys.BusinessUserType bu = new project.Business.Sys.BusinessUserType(); foreach (Entity.Sys.EntityUserType it in bu.GetUserTypeListQuery(string.Empty, string.Empty)) { if (it.UserTypeNo.ToUpper() == "ADMIN") { continue; } if (firsttype == "") { firsttype = it.UserTypeNo; TypeStr += "<option value='" + it.UserTypeNo + "' selected='selected'>" + it.UserTypeName + "</option>"; } else { TypeStr += "<option value='" + it.UserTypeNo + "'>" + it.UserTypeName + "</option>"; } } TypeStr += "</select>"; list = createList(firsttype); } } else { Response.Write("<script type='text/javascript'>window.parent.window.location.href='../../login.aspx';</script>"); return; } } catch { Response.Write("<script type='text/javascript'>window.parent.window.location.href='../../login.aspx';</script>"); return; } }
private string submitaction(JsonArrayParse jp) { JsonObjectCollection collection = new JsonObjectCollection(); string flag = "1"; try { Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo(); if (jp.getValue("tp") == "update") { bc.load(jp.getValue("id")); bc.Entity.UserName = jp.getValue("UserName"); bc.Entity.UserType = jp.getValue("UserType"); bc.Entity.Tel = jp.getValue("Tel"); bc.Entity.Addr = jp.getValue("Addr"); bc.Entity.Email = jp.getValue("Email"); int r = bc.Save(); if (r <= 0) { flag = "2"; } } else { Data obj = new Data(); DataTable dt = obj.PopulateDataSet("select cnt=COUNT(*) from Sys_UserInfo where UserNo='" + jp.getValue("UserNo") + "'").Tables[0]; if (int.Parse(dt.Rows[0]["cnt"].ToString()) > 0) { flag = "3"; } else { bc.Entity.UserNo = jp.getValue("UserNo"); bc.Entity.UserName = jp.getValue("UserName"); bc.Entity.UserType = jp.getValue("UserType"); bc.Entity.Tel = jp.getValue("Tel"); bc.Entity.Addr = jp.getValue("Addr"); bc.Entity.Email = jp.getValue("Email"); bc.Entity.Valid = true; bc.Entity.RegDate = GetDate(); bc.Entity.Password = Encrypt.EncryptDES("123456", "1"); int r = bc.Save(); if (r <= 0) { flag = "2"; } } } } catch { flag = "2"; } collection.Add(new JsonStringValue("type", "submit")); collection.Add(new JsonStringValue("flag", flag)); collection.Add(new JsonStringValue("liststr", createList(string.Empty, jp.getValue("UserNameS")))); return(collection.ToString()); }
protected override void Page_Load(object sender, EventArgs e) { try { HttpCookie hc = getCookie("1"); if (hc != null) { string str = hc.Value.Replace("%3D", "="); string userid = Encrypt.DecryptDES(str, "1"); user = new project.Business.Sys.BusinessUserInfo(); user.load(userid); if (user.Entity.UserType.ToUpper() != "ADMIN") { GotoNoRightsPage(); } if (!Page.IsCallback) { string firsttype = ""; TypeStr = "<select id='UserType' class='input-text' style='width:120px;'>"; Business.Sys.BusinessUserType bu = new project.Business.Sys.BusinessUserType(); foreach (Entity.Sys.EntityUserType it in bu.GetUserTypeListQuery(string.Empty, string.Empty, user.Entity.AccID, string.Empty)) { if (firsttype == "") { firsttype = it.UserTypeNo; TypeStr += "<option value='" + it.UserTypeNo + "' selected='selected'>" + it.UserTypeName + "</option>"; } else { TypeStr += "<option value='" + it.UserTypeNo + "'>" + it.UserTypeName + "</option>"; } } TypeStr += "</select>"; list = createList(firsttype); } } else { GotoErrorPage(); } } catch { GotoErrorPage(); } }
private string createList(string DeptNo, string UserName) { 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='10%'>用户ID</th>"); sb.Append("<th width='10%'>用户姓名</th>"); sb.Append("<th width='10%'>用户类别</th>"); sb.Append("<th width='10%'>部门</th>"); sb.Append("<th width='10%'>上级经理</th>"); sb.Append("<th width='15%'>电话</th>"); sb.Append("<th width='15%'>Email</th>"); sb.Append("<th width='10%'>创建日期</th>"); sb.Append("<th width='5%'>状态</th>"); sb.Append("</tr>"); sb.Append("</thead>"); int r = 1; sb.Append("<tbody>"); Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo(); foreach (Entity.Sys.EntityUserInfo it in bc.GetUserInfoListQuery(string.Empty, user.Entity.AccID, DeptNo, UserName)) { sb.Append("<tr class=\"text-c\" id=\"" + it.InnerEntityOID + "\">"); sb.Append("<td align='center'>" + r.ToString() + "</td>"); sb.Append("<td>" + it.UserNo + "</td>"); sb.Append("<td>" + it.UserName + "</td>"); sb.Append("<td>" + it.UserTypeName + "</td>"); sb.Append("<td>" + it.DeptName + "</td>"); sb.Append("<td>" + it.ManagerName + "</td>"); sb.Append("<td>" + it.Tel + "</td>"); sb.Append("<td>" + it.Email + "</td>"); sb.Append("<td>" + ParseStringForDate(it.RegDate) + "</td>"); sb.Append("<td class=\"td-status\"><span class=\"label " + (it.Valid ? "label-success" : "") + " radius\">" + (it.Valid ? "有效" : "已失效") + "</span></td>"); sb.Append("</tr>"); r++; } sb.Append("</tbody>"); sb.Append("</table>"); return(sb.ToString()); }
protected override void Page_Load(object sender, EventArgs e) { try { HttpCookie hc = getCookie("1"); if (hc != null) { string str = hc.Value.Replace("%3D", "="); userid = Encrypt.DecryptDES(str, "1"); user.load(userid); if (!Page.IsCallback) { CheckRight(user.Entity, "Order/WorkOrder.aspx"); list = createList(string.Empty, string.Empty, GetDate().AddDays(-GetDate().Day + 1).ToString("yyyy-MM-dd"), GetDate().ToString("yyyy-MM-dd"), string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "", "", 1); orderType = "<select class=\"input-text required\" id=\"OrderType\" data-valid=\"isNonEmpty\" data-error=\"请选择工单类型\">"; orderType += "<option value=\"\" selected>请选择工单类型</option>"; orderTypeS = "<select class=\"input-text required\" id=\"OrderTypeS\" style=\"width:100px\">"; orderTypeS += "<option value=\"\" selected>全部</option>"; Business.Base.BusinessOrderType type = new project.Business.Base.BusinessOrderType(); foreach (Entity.Base.EntityOrderType it in type.GetOrderTypeListQuery(string.Empty, string.Empty, string.Empty, user.Entity.AccID)) { orderType += "<option value='" + it.OrderTypeNo + "'>" + it.OrderTypeName + "</option>"; orderTypeS += "<option value='" + it.OrderTypeNo + "'>" + it.OrderTypeName + "</option>"; } orderType += "</select>"; orderTypeS += "</select>"; alloDept = "<select class=\"input-text required size-S\" id=\"AlloDeptS\" style=\"width:100px\" data-valid=\"isNonEmpty\" data-error=\"请选择\">"; alloDept += "<option value=\"\" selected>请选择</option>"; Business.Sys.BusinessDept allodt = new project.Business.Sys.BusinessDept(); foreach (Entity.Sys.EntityDept it in allodt.GetDeptListQuery(string.Empty, string.Empty, user.Entity.AccID, string.Empty)) { alloDept += "<option value='" + it.DeptNo + "'>" + it.DeptName + "</option>"; } alloDept += "</select>"; alloUser = "******"input-text required size-S\" id=\"AlloUserS\" style=\"width:100px\" data-valid=\"isNonEmpty\" data-error=\"请选择\">"; alloUser += "<option value=\"\" selected>请选择</option>"; Business.Sys.BusinessUserInfo allous = new project.Business.Sys.BusinessUserInfo(); foreach (Entity.Sys.EntityUserInfo it in allous.GetUserInfoListQuery(string.Empty, user.Entity.AccID, string.Empty, string.Empty)) { alloUser += "<option value='" + it.UserNo + "'>" + it.UserName + "</option>"; } alloUser += "</select>"; region = "<select class=\"input-text required size-S\" id=\"RegionS\" style=\"width:80px\" data-valid=\"isNonEmpty\" data-error=\"请选择\">"; region += "<option value=\"\" selected>请选择</option>"; Business.Base.BusinessRegion reg = new project.Business.Base.BusinessRegion(); foreach (Entity.Base.EntityRegion it in reg.GetRegionListQuery(string.Empty, string.Empty, user.Entity.AccID, string.Empty)) { region += "<option value='" + it.RegionNo + "'>" + it.RegionName + "</option>"; } region += "</select>"; status = "<select class=\"input-text required size-S\" id=\"StatusS\" style=\"width:80px\" data-valid=\"\" data-error=\"\">"; status += "<option value=\"\" selected>请选择</option>"; Business.Base.BusinessStatus st = new project.Business.Base.BusinessStatus(); foreach (Entity.Base.EntityStatus it in st.GetStatusListQuery(string.Empty, string.Empty, user.Entity.AccID)) { status += "<option value='" + it.StatusNo + "'>" + it.StatusName + "</option>"; } status += "</select>"; } } else { GotoErrorPage(); } } catch { GotoErrorPage(); } }
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()); }
private string createList(string Name, int page) { System.Text.StringBuilder sb = new System.Text.StringBuilder(""); try { 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='35%'>用户编号</th>"); sb.Append("<th width='65%'>用户名称</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, Name, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.UserNo + "' onclick='submit(\"" + it.UserNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.UserNo + "<input type='hidden' id='it" + it.UserNo + "' value='" + it.UserName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.UserName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetUserInfoListCount(string.Empty, Name), 15, page, 5)); } else if (Request.QueryString["type"] == "SRVType") { 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='35%'>服务类型编号</th>"); sb.Append("<th width='65%'>服务类型名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessServiceType pt = new project.Business.Base.BusinessServiceType(); foreach (Entity.Base.EntityServiceType it in pt.GetListQuery(string.Empty, Name, "null", string.Empty, true, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.SRVTypeNo + "' onclick='submit(\"" + it.SRVTypeNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.SRVTypeNo + "<input type='hidden' id='it" + it.SRVTypeNo + "' value='" + it.SRVTypeName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.SRVTypeName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetListCount(string.Empty, Name, "null", string.Empty, true), 15, page, 5)); } else if (Request.QueryString["type"] == "LOC") { 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='35%'>编号</th>"); sb.Append("<th width='65%'>名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessLocation pt = new project.Business.Base.BusinessLocation(); foreach (Entity.Base.EntityLocation it in pt.GetListQuery(string.Empty, Name, string.Empty, page, 15)) { string spacestr = ""; int row = 1; while (row <= it.LOCLevel) { spacestr += " "; row++; } sb.Append("<tr class=\"text-c\" id='" + it.LOCNo + "' onclick='submit(\"" + it.LOCNo + "\")'>"); sb.Append("<td style=\"white-space: nowrap;text-align:left;\">" + it.LOCNo + "<input type='hidden' id='it" + it.LOCNo + "' value='" + it.LOCName + "' /></td>"); sb.Append("<td style=\"white-space: nowrap;text-align:left;\">" + spacestr + it.LOCName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetListCount(string.Empty, Name, string.Empty), 15, page, 5)); } else if (Request.QueryString["type"] == "Cust") { 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='35%'>客户编号</th>"); sb.Append("<th width='65%'>客户名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessCustomer pt = new project.Business.Base.BusinessCustomer(); foreach (Entity.Base.EntityCustomer it in pt.GetListQuery(string.Empty, Name, string.Empty, string.Empty, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.CustNo + "' onclick='submit(\"" + it.CustNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.CustNo + "<input type='hidden' id='it" + it.CustNo + "' value='" + it.CustName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.CustName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetListCount(string.Empty, Name, string.Empty, string.Empty), 15, page, 5)); } else if (Request.QueryString["type"] == "Billboard") { 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='20%'>广告位编号</th>"); sb.Append("<th width='25%'>广告位名称</th>"); sb.Append("<th width='40%'>位置</th>"); sb.Append("<th width='15%'>广告位类型</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessBillboard pt = new project.Business.Base.BusinessBillboard(); foreach (Entity.Base.EntityBillboard it in pt.GetListQuery(string.Empty, Name, string.Empty, string.Empty, string.Empty, string.Empty, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.BBNo + "' onclick='submit(\"" + it.BBNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.BBNo + "<input type='hidden' id='it" + it.BBNo + "' value='" + it.BBName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.BBName + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.BBAddr + "</td>"); sb.Append("<td style='white-space: nowrap;'>" + it.BBTypeName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetListCount(string.Empty, Name, string.Empty, string.Empty, string.Empty, string.Empty), 15, page, 5)); } } catch { } return(sb.ToString()); }
private string createList(string Name, int page) { 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='35%'>部门编号</th>"); sb.Append("<th width='65%'>部门名称</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, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.DeptNo + "' onclick='submit(\"" + it.DeptNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.DeptNo + "<input type='hidden' id='it" + it.DeptNo + "' value='" + it.DeptName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.DeptName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetDeptListCount(string.Empty, Name, user.Entity.AccID, string.Empty), 15, page, 5)); } else 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='25%'>用户编号</th>"); sb.Append("<th width='35%'>用户名称</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, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.UserNo + "' onclick='submit(\"" + it.UserNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.UserNo + "<input type='hidden' id='it" + it.UserNo + "' value='" + it.UserName + "' /></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>"); sb.Append(Paginat(pt.GetUserInfoListCount(string.Empty, user.Entity.AccID, string.Empty, Name), 15, page, 5)); } else if (Request.QueryString["type"] == "region") { 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='35%'>地区编号</th>"); sb.Append("<th width='65%'>地区名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessRegion pt = new project.Business.Base.BusinessRegion(); foreach (Entity.Base.EntityRegion it in pt.GetRegionListQuery(string.Empty, Name, user.Entity.AccID, string.Empty, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.RegionNo + "' onclick='submit(\"" + it.RegionNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.RegionNo + "<input type='hidden' id='it" + it.RegionNo + "' value='" + it.RegionName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.RegionName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetRegionListCount(string.Empty, Name, user.Entity.AccID, string.Empty), 15, page, 5)); } else if (Request.QueryString["type"] == "cust") { 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='35%'>客户编号</th>"); sb.Append("<th width='65%'>客户名称</th>"); sb.Append("</tr>"); sb.Append("</thead>"); sb.Append("<tbody>"); Business.Base.BusinessCustInfo pt = new project.Business.Base.BusinessCustInfo(); foreach (Entity.Base.EntityCustInfo it in pt.GetCustInfoListQuery(string.Empty, user.Entity.AccID, string.Empty, Name, "", true, page, 15)) { sb.Append("<tr class=\"text-c\" id='" + it.CustNo + "' onclick='submit(\"" + it.CustNo + "\")'>"); sb.Append("<td style='white-space: nowrap;'>" + it.CustNo + "<input type='hidden' id='it" + it.CustNo + "' value='" + it.CustName + "' /></td>"); sb.Append("<td style='white-space: nowrap;'>" + it.CustName + "</td>"); sb.Append("</tr>"); } sb.Append("</tbody>"); sb.Append("</table>"); sb.Append(Paginat(pt.GetCustInfoListCount(string.Empty, user.Entity.AccID, string.Empty, Name, "", true), 15, page, 5)); } return(sb.ToString()); }