摘要:
controller 中定义以下方法:public JsonResult UpdateSingle(int id, string actionName, string actionValue) { var res = new JsonResult(); //var value = "actionValue"; //db.ContextOptions.ProxyCreationEnabled = false; var list = (from a in db.Articles select new { name = a.ArtTitle, yy = a.ArtPublishT 阅读全文
2012年11月16日 #
2012年11月14日 #
摘要:
/* * Image preload and auto zoom * scaling 是否等比例自动缩放 * width 图片最大高 * height 图片最大宽 * loadpic 加载中的图片路径 * example $("*").LoadImage(true,w,h);*/jQuery.fn.LoadImage=function(scaling,width,height,loadpic){ if(loadpic==null)loadpic="../images/loading.gif"; return this.each(function(){ v 阅读全文
2012年11月6日 #
摘要:
方法一:这个很不错,好像是 csdn 的 Meizz 写的: [javascript] view plaincopyprint?//对Date的扩展,将Date转化为指定格式的String //月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q)可以用1-2个占位符, //年(y)可以用1-4个占位符,毫秒(S)只能用1个占位符(是1-3位的数字) //例子: //(newDate()).Format("yyyy-MM-ddhh:mm:ss.S")==>2006-07-0208:09:04.423 //(newDate()).Format("yyy 阅读全文
2012年8月1日 #
摘要:
drop table test4SELECT * INTO test4 from(select len(isnull(姓名,0)+isnull(性别,0)+isnull(年龄,0)+isnull(级别,0)+isnull(职务,0)+isnull(行业,0)+isnull([国家/省份],0)+isnull(城市,0)+isnull(企业名称,0)+isnull(电话,0)+isnull(手机,0)+isnull(EMail,0)) as t,ROW_NUMBER() OVER(ORDER BY len(isnull(姓名,0)+isnull(性别,0)+isnull(年龄,0)+isnull 阅读全文
2012年7月31日 #
摘要:
<script type="text/javascript"> $(document).ready(function() { $(".mid_tex").show(); $(".mid_title03").click(function() { //$(this).css({ borderStyle: "inset", cursor: "wait" }); //$(".mid_tex:visible").slideUp("slow"); //$( 阅读全文
2012年6月19日 #
摘要:
SELECT * from Testwhere ISNUMERIC(name)<> 1INSERT INTO test(name) VALUES('Test1'), ('Test2'), ('Test3');SELECT *,patindex('%[^0-9a-zA-Z]%',name) from Testwhere patindex('%[^0-9a-zA-Z]%',name)>1 阅读全文
2012年5月10日 #
摘要:
public DataTable GetData() { DataTable table = new DataTable(); table.Columns.Add("ID"); table.Columns.Add("FirstName"); table.Columns.Add("LastName"); DataRow row; row = table.NewRow(); row["ID"] = 1; row["FirstName"] = "John"; row["L 阅读全文
2012年3月28日 #
摘要:
【linq to sql】已有打开的与此命令相关联的 DataReader,必须首先将它关闭在Linq to SQL和Entity Framework,使用Linq查询数据的时候会出现错误:There is already an open DataReader associated with this Command which must be closed first 。解决方案: 1.在数据库连接串上添加MultipleActiveResultSets=true。 2.进行重复操作之前,将数据查询结果放入内存中,再进行使用。 阅读全文
2011年12月15日 #
摘要:
this.keytxt.Text.Trim().Replace("'", "''").Replace("[", "[[]").Replace("]", "[]]").Replace("_", "[_]").Replace("%", "[%]") 阅读全文
2011年11月22日 #
摘要:
Oracle 数据类型映射.NET Framework 4下表列出 Oracle 数据类型及其与 OracleDataReader 的映射。Oracle 数据类型由 OracleDataReader.GetValue 返回的 .NET Framework 数据类型由 OracleDataReader.GetOracleValue 返回的 OracleClient 数据类型备注BFILEByte[]OracleBFileBLOBByte[]OracleLobCHARStringOracleStringCLOBStringOracleLobDATEDateTimeOracleDateTimeFLO 阅读全文