1、
问题:
在知道一个对象的类型后,(当然该类型是用字符串来表示,如:“ST.Project.Entities.BillEnum”) ,如何在程序中获取该类型的Type.
解答:
光知道类型名字是不能取到Type对象的,必须知道这个类型所在的程序集。如果类型所在的程序集为mscorlib或者当前程序集,那么这种情况下就不需要指定程序集了,如:Type t = Assembly.LoadFrom( "Class1.dll").GetType( "ST.Project.Entities.BillEnum",true,true);
2、
问题:
如何查看他人编写的复杂而结构性又不好的查询语句
解答:
可以使用plsqldev的功能点,按工具栏上的对号按钮,就是SQL美化器
3、
问题:html select标签二级关联
解答:
function getProVer(obj){
var proid=document.getElementById("PROID").value;
new ARSNew("business","com.hztech.platform.middle.commfunc2.CommFunc2,getCommFunc",getXMLNode("ACTION","XML.PROJECT.getProVersion")+getXMLNode("PROID",proid),"showImpl");
}
function showImpl(xml,other){
var nodeList = xml.selectSingleNode("/output/body/array0/rowset").childNodes;
var select=document.getElementById("PROVERSION");
for(var i=select.options.length-1;i>=0;i--){
select.remove(select.options[i]);
}
for(var i=0;i<nodeList.length;i++){
var option=document.createElement("OPTION");
option.value=nodeList[i].firstChild.firstChild.nodeValue;
option.text=option.value;
select.add(option);
}
}
4、
问题:web form导出Excel,文件名称不支持中文
解答:
string pagename = Request.QueryString["pagename"] == null ? "" : Server.UrlDecode(Request.QueryString["pagename"].ToString());
string filename = Request.QueryString["filename"] == null ? "" : Server.UrlDecode(Request.QueryString["filename"].ToString());
string filetype = Request.QueryString["filetype"] == null ? "" : Request.QueryString["filetype"].ToString().ToLower();
Response.Clear();
Response.Buffer = true;
Response.Charset = "gb2312";
if (filetype == "excel")
Response.AppendHeader("content-disposition", "attachment; filename=" + Server.UrlEncode(filename) + ".xls");
else if (filetype == "word")
Response.AppendHeader("content-disposition", "attachment; filename=" + Server.UrlEncode(filename) + ".doc");
else
Response.AppendHeader("content-disposition", "attachment; filename=" + Server.UrlEncode(filename));
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.ContentType = "application/vnd.ms-" + filetype;
Response.Write("<meta http-equiv=Content-Type content=text/html;charset=gb2312>");
ViewData["isexport"] = "1";
return View(pagename);
5、
问题:jquery设置表单不可操作状态
解答:
$("input[type=text],input[type=checkbox],input[type=button]").attr("disabled", "disabled");
$("select").attr("disabled", "disabled");
$("textarea").attr("disabled", "disabled");