ITeye博客

cw_volcano的博客

cw_volcano · 共 19 篇文章

zTree5

//DfxRepository.cs #region 获取类别树 public string BuildCategoryTreeChildNode(string id, string pduid, string pduaddress, string selecttreeid) { List nodeList = new List (); List expandidList = new List (); List<MANAGER_CFG_CATEGORY> allList = catedb.MANAGER_CFG_CATEGORY.ToList(); nodeList = GetCategor…

2011-10-14 10:12 · 评论(0)

zTree4

//获取知识库左侧文件夹树菜单节点数据 TreeController.cs public ContentResult QueryProductTreeChildNode(string id, string pdu, string pduaddress, string selecttreeid, string from, string refresh) { string cnt = ""; try { cnt = tree.BuildProductTreeChildNode(id, pdu, pduaddress, selecttreeid, from, refresh); } catch (…

2011-10-14 10:11 · 评论(0)

zTree3

function divClick(s) { var selecttreeid = productTreeInfo.tree.getSelectedNode().id; var url = productTreeInfo.tree.getSelectedNode().url; if (url!=undefined) { var treepath = url.substring(url.lastIndexOf('=') + 1); } switch (s) { case 1: $('#mainFrm').attr('src', "/upload/FileUpload?" + url.subst…

2011-10-14 10:00 · 评论(0)

zTree2

//点击右键方法 function zTreeOnRightClick(event, treeId, treeNode) { productTreeInfo.tree.selectNode(treeNode); } function zTreeOnBeforeClick(treeId, treeNode) { if (treeNode.id=="0") { if (!confirm("将服务器的全部文件显示出来,此操作的花费时间将依服务器文件数量而定!是否继续?")) { } else { $(document.getElementById("mainFrm")).attr("src", "…

2011-10-14 09:59 · 评论(0)

zTree1

aspx: js: var productTreeInfo = { tree: null, setting: null, nodes: null, treeId: "productTree", nodeId: "", nodeName: "", nodeLevel: 0 }; jQuery(function ($) { initTree(); }); //强制刷新树菜单 var refresh = "no"; function refreshTree() { //判断权限 if (!confirm("是否要继续刷新树菜单?该动作将会同步远程文件服务器!")) { return; } refr…

2011-10-14 09:57 · 评论(0)

note3

jqGrid增加按钮: .navButtonAdd('#pager', { caption: "全部取消", buttonicon: "ui-icon-trash", onClickButton: function (id) { cancelSelectedRows(); }, position: "last" }); jqGrid单选选择行: var curSelRow=-1 onSelectRow: function (id) { curSelRow = id; } $("#list").getCell(curSelRow, "Id") jqGrid多选选择行: var ids = $(…

2011-09-29 14:06 · 评论(0)

note2

$("#navigatorInfo", window.parent.document) 查找iframe上一层的节点 $(window.frames.document).find("#BtnAdd") 查找iframe内的节点 var jsonData = new { list = nodeList.ToArray() }; var list1 = treeconfig.INFO_SYS_TREE_CONFIG.Where(x => x.pdu == tree.pdu && x.treename == tree.treename); if (list1.ToList().Count == 0…

2011-09-29 14:05 · 评论(0)

note1

$('#loginForm').serialize()的值为"userName=zkf38667&password=123zxc!%40%23&rememberMe=on" slice(start,) 例如:选择前两个p元素$("p").slice(0, 2).wrapInner(" "); end() 选取所有的p元素,查找并选取span子元素,然后再回过来选取p元素 $("p").find("span").end() NHibername: 临时态(Transient):用new创建的对象,它没有持久化,没有纳入Session中,随时可以被垃圾回收,处于此状态的对象叫临时对象。特点:数据…

2011-09-29 14:05 · 评论(0)

浏览器CSS兼容

可以使用如下形式(以IE6为例),为特定版本的IE使用特定的样式达到IE不同版本间的样式兼容 #example { color: #333; } /* FF及其他浏览器*/ html #example { color: #666; } /* IE6 */ +html #example { color: #999; } / IE7 */ 注意: *+html 对IE7的HACK 必须保证HTML顶部有如下声明: 以下为引用的内容: 可以使用以下HTML: 1, !important 随着IE7对!important的支持, !important 方法现在只针对IE6的HACK.(注意写法.记得…

2011-09-23 14:41 · 评论(0)

txt内容导入数据库

public bool ImportPurviewManIds(string fileName, string CurrentUserDomainId, string Pduid, string uploadtype) { try { if (File.Exists(fileName)) { //读取文件 一行一行读取 StreamReader objReader = new StreamReader(fileName, Encoding.Default); string sLine = ""; List arrText = new List (); while (sLine != null…

2011-09-09 15:24 · 评论(0)

jqGrid子表格

onSelectRow: function (id) { curSelRow = id; }, subGridRowExpanded: function (subgrid_id, row_id) { var subgrid_table_id, pager_id; subgrid_table_id = subgrid_id + " t"; pager_id = "p " + subgrid_table_id; $("#" + subgrid_id).html(" "); jQuery("#" + subgrid_table_id).jqGrid({ }) }, subGridRowColaps…

2011-09-09 14:58 · 评论(0)

uploadfy导入Excel内容到数据库中4

public int ReadFromExcel(string fileName, string sheetName, System.Data.DataTable dataTable) { OleDbConnection connection = new System.Data.OleDb.OleDbConnection(); try { string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileName + ";Extended Properties="Excel 12.0;HDR=YE…

2011-09-09 14:57 · 评论(0)

uploadfy导入Excel内容到数据库中3

private int ImportSheetData(string userno, string sheet, string bigT, DataTable dt, List lstColModel, ref string msg) { BigTColModel COL; /********** 查找列表头对应的列序号 ***** / DataRow drTitle2 = dt.Rows;//二级表头 string colName, colName2; bool bColOver = false; for (int i = 1; i < dt.Columns.Count; i++)//第0…

2011-09-09 14:57 · 评论(0)

uploadfy导入Excel内容到数据库中2

cs:(上传文件并将Excel中的内容导入到数据库中) public JsonResult DoImport(string uploadtype, string q_t) { iPAL.Applications.Authen.LoginUser user = (iPAL.Applications.Authen.LoginUser)(Session); m_userno = user.WorkNo; AjaxCallResult result = new AjaxCallResult(); HttpContext.Response.ContentType = "text/plain"; Htt…

2011-09-09 14:56 · 评论(0)

uploadfy导入Excel内容到数据库中

aspx: js: var uploadSizeLimit = 30242880; $("#uploadify").uploadify({ 'uploader': '/Content/jquery/up/uploadify.swf', 'script': 'DoImport', 'scriptData': { uploadtype: 'selCustom', q_t: $("#txtCustom").text() }, 'cancelImg': '/Content/jquery/up/cancel.png', 'folder': '', 'sizeLimit': uploadSizeLimi…

2011-09-09 14:55 · 评论(0)