//得到要回传的function字符串 public string GetFunctionstringForView(string functionlist, int memberid, int ProductID, Hashtable htparm) { string temp = string.Empty; if (functionlist != null) { string[] list = functionlist.Split(','); CRMService crm = new CRMService(); IList<ProductFunction> versionFunctionList = crm.GetFunctions(memberid, ProductID, htparm); int functioncount = 1; temp = "<div><input type='checkbox' id='checkall' />全选</div><table width='600px' border='1'cellpadding='6' cellspacing='1'><thead><tr>" + "<th align='left'><input type='checkbox' class='function kind' id='kind1' />会员管理</th><th align='left'><input type='checkbox' class='function kind' id='kind12' />项目与日程管理</th><th align='left'><input type='checkbox' class='function kind' id='kind2' />招标公告与信息</th>" + "<th align='left'><input type='checkbox' class='function kind' id='kind3' />招标数据库查询</th><th align='left'><input type='checkbox' class='function kind' id='kind4' />招标管理与助手</th>" + "</tr></thead><tbody><tr>"; temp += "<td align='left'>"; string html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 1); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind1"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 12); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind12"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 2); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind2"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 3); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind3"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 4); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind4"); functioncount++; } temp += html; temp += "</td></tr></tbody></table>"; temp += "<table width='600px' border='1'cellpadding='6' cellspacing='1'><thead><tr><th width='180px' align='left'><input type='checkbox' class='function kind' id='kind5' />数据分析与报告</th>" + "<th align='left'><input type='checkbox' class='function kind' id='kind6' />模拟评标与竞价</th><th align='left'><input type='checkbox' class='function kind' id='kind7' />专业数据库查询</th>" + "<th align='left'><input type='checkbox' class='function kind' id='kind8' />辅助数据库查询</th></tr></thead><tbody><tr>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 5); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind5"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 6); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind6"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 7); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind7"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 8); foreach (ProductFunction func in versionFunctionList) { html += GetDictEx(list, functioncount, func, "kind8"); functioncount++; } temp += html; temp += "</td></tr></tbody></table>"; } else { CRMService crm = new CRMService(); IList<ProductFunction> versionFunctionList = crm.GetFunctions(memberid, ProductID, htparm); int functioncount = 1; temp = "<div><input type='checkbox' id='checkall' />全选</div><table width='600px' border='1'cellpadding='6' cellspacing='1'><thead><tr>" + "<th align='left'><input type='checkbox' class='function kind' id='kind1' />会员管理</th><th align='left'><input type='checkbox' class='function kind' id='kind12' />项目与日程管理</th><th align='left'><input type='checkbox' class='function kind' id='kind2' />招标公告与信息</th>" + "<th align='left'><input type='checkbox' class='function kind' id='kind3' />招标数据库查询</th><th align='left'><input type='checkbox' class='function kind' id='kind4' />招标管理与助手</th>" + "</tr></thead><tbody><tr>"; temp += "<td align='left'>"; string html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 1); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind1"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 12); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind12"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 2); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind2"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 3); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind3"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 4); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind4"); functioncount++; } temp += html; temp += "</td></tr></tbody></table>"; temp += "<table width='600px' border='1'cellpadding='6' cellspacing='1'><thead><tr><th width='180px'align='left'><input type='checkbox' class='function kind' id='kind5' />数据分析与报告</th>" + "<th align='left'><input type='checkbox' class='function kind' id='kind6' />模拟评标与竞价</th><th align='left'><input type='checkbox' class='function kind' id='kind7' />专业数据库查询</th>" + "<th align='left'><input type='checkbox' class='function kind' id='kind8' />辅助数据库查询</th></tr></thead><tbody><tr>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 5); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind5"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 6); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind6"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 7); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind7"); functioncount++; } temp += html; temp += "</td>"; temp += "<td align='left'>"; html = string.Empty; versionFunctionList = crm.GetEachKindFunctions(memberid, ProductID, htparm, 8); foreach (ProductFunction func in versionFunctionList) { html += GetDict(functioncount, func, "kind8"); functioncount++; } temp += html; temp += "</td></tr></tbody></table>"; } return temp; }