文件信息:Windows 7 简体中文旗舰版 x86 (32位 MSDN RTM正式版)
27
2013
09
win7 32位与64位下载地址存档
发布:pukuimin | 分类:技术博文转载 | 评论:0 | 浏览:
24
2013
09
17
2013
09
.Net时间计算函数,统计某一天是一年的第几周,这一周从哪天开始到哪天结束
Code:
/// <summary> /// 计算某年第一周的天数 /// </summary> /// <param name="dt">某年中的一个时间</param> /// <returns></returns> public static int DaysInFirstweekInYear(DateTime dt) { DateTime FirstDate = Convert.ToDateTime(string.Format("{0}-1-1", dt.Year)); int DayOfWeekInYear = DayOfWeek(FirstDate); int DaysInFirstWeek = 8 - DayOfWeekInYear; return DaysInFirstWeek; } /// <summary> /// 一年中的第几周 /// </summary> /// <param name="dt"></param> /// <returns></returns> public static int WeekOfYear(DateTime dt)
发布:pukuimin | 分类:c#/.net | 评论:0 | 浏览:
17
2013
09
子站点间使用同一个cookie的问题
//c# code
public string testcookie(string id) { HttpCookie Cookie; Cookie = Request.Cookies["testcookie"]; string GotoDomain = System.Configuration.ConfigurationManager.AppSettings["GotoDomain"].ToString(); if (string.IsNullOrEmpty(id))//读取 { string test1 = ""; if (Cookie != null) { test1 = Common.OperateText.Decrypt(Cookie["test1"].ToString()); } return ("{\"读取到的test1\":\"" + test1 + "\",\"code\":\"200\"}"); } else//写入 { Cookie = new HttpCookie("testcookie"); string test1 = id + "-" + DateTime.Now + GotoDomain; Cookie["test1"] = Common.OperateText.Encrypt(test1); Cookie.Domain = GotoDomain; Cookie.Path = "/"; Cookie.Secure = false; Cookie.Expires = DateTime.Now.AddHours(24); Response.Cookies.Add(Cookie); return ("{\"写入的test1\":\"" + test1 + "\",\"code\":\"200\"}"); } }
发布:pukuimin | 分类:c#/.net | 评论:0 | 浏览:
06
2013
09
MetadataType的使用,MVC的Model层数据验证
//ActivityFlowContent是实体模型的model类
//ActivityFlowContentMetadata是自己写的model类
//这两个类属性相同可以形成映射关系,ActivityFlowContent中还可以加其他额外字段
[MetadataType(typeof(ActivityFlowContentMetadata))] public partial class ActivityFlowContent : IBaseEntity { [Display(Name = "活动流程分类")] public string ActivityClassificIDOld { get; set; } #region 自定义属性 #endregion } public class ActivityFlowContentMetadata { [ScaffoldColumn(false)] [Display(Name = "主键", Order = 1)] public string ID { get; set; } [ScaffoldColumn(true)] [StringLength(36, ErrorMessage = "长度不可超过36")] [Display(Name = "活动分类ID", Order = 2)] public object ActivityClassificID { get; set; } [ScaffoldColumn(true)] [StringLength(200, ErrorMessage = "长度不可超过200")] [Display(Name = "活动摘要", Order = 3)] public object Sumary { get; set; } [ScaffoldColumn(true)] [DataType(DataType.MultilineText,ErrorMessage="字符格式不正确")] [Display(Name = "活动内容", Order = 4)] public object Content { get; set; } [ScaffoldColumn(true)] [StringLength(50, ErrorMessage = "长度不可超过50")] [Display(Name = "关键字", Order = 5)] public object Keywords { get; set; } }
发布:pukuimin | 分类:c#/.net | 评论:0 | 浏览:
04
2013
09
[转载]windows server2008r2 下载
Windows Server 2008 R2 With SP1 64位简体中文VOL版
发布:pukuimin | 分类:技术博文转载 | 评论:0 | 浏览: