摘要: 第一种使用SetInterval: $(function () { setInterval(ChangeTime, 1000); }); function ChangeTime() { var time; time = $("#time").text(); time = parseInt(time) 阅读全文
posted @ 2016-07-01 21:05 576 阅读(605) 评论(0) 推荐(0) 编辑
摘要: ADO.Net中Sql语句: insert into RoomType(TypeName,Price,AddBed,BedPrice,Remark)output inserted.ID values('kkk',321,1,34,'oooo') EF中: 添加数据保存后直接对象名.ID。 例子:Us 阅读全文
posted @ 2016-07-01 21:03 576 阅读(4192) 评论(0) 推荐(0) 编辑
摘要: SQL语句中: 1 2 3 4 1)select * from TableName where StartTime > '2015-04-08' 2)select * from TableName where StartTime >= '2015-04-08' 3)select * from Tab 阅读全文
posted @ 2016-07-01 21:02 576 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 增加: 第一种方法:Response.Cookies[“UserName”].Value=”张三” Response.Cookies[“UserName”].Expires=DateTime.Now.AddDays(1); 第二种方法: HttpCookie cookie=new HttpCooki 阅读全文
posted @ 2016-07-01 20:57 576 阅读(797) 评论(0) 推荐(1) 编辑
摘要: //标准化总价钱 s:总价钱,n:保留几位小数 function fmoney(s, n) { n = n > 0 && n <= 20 ? n : 2; s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";//更改这里 阅读全文
posted @ 2016-07-01 20:55 576 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 第一步:新建一个类实现IEqualityComparer<T>接口,用实现此接口的方法。T是复杂集合中对象的类型。 第二步:复杂类型集合=复杂类型集合.Distinct(new 新建类()).ToList(); 例子: 1.新建的类 public class EqualCompare:IEquali 阅读全文
posted @ 2016-07-01 20:42 576 阅读(276) 评论(0) 推荐(0) 编辑
摘要: function ChangeDateFormat(cellval) { var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10)); var month = date.getMonth() + 阅读全文
posted @ 2016-07-01 20:39 576 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 创建上下文对象:WordBoradEntities db = new WordBoradEntities(); 添加://1.1创建实体对象 User uObj = new User() { uName = "刘德华", uLoginName = "aaa", uPwd = "asdfasdfasd 阅读全文
posted @ 2016-07-01 20:32 576 阅读(9775) 评论(1) 推荐(5) 编辑
摘要: create proc [dbo].[usp_contacts_select_by_page]--存储过程名称 @pageindex int,--当前页 @pagesize int,--每页条数 @pagecount int output,--总页数 @recordcount int output- 阅读全文
posted @ 2016-07-01 20:25 576 阅读(482) 评论(0) 推荐(0) 编辑