示例#1
0
 /// <summary>
 /// 修改主题
 /// </summary>
 /// <param name="WT"></param>
 public static void Update(Weblog_Theme WT)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Themes.Single(p => p.Theme_Id == WT.Theme_Id);
     temp.Theme_Intro = WT.Theme_Intro;
     temp.Theme_Name = WT.Theme_Name;
     BD.SubmitChanges();
 }
 /// <summary>Called before a Weblog_Theme is deleted.</summary>
 /// <param name="instance">The instance.</param>
 partial void DeleteWeblog_Theme(Weblog_Theme instance);
 /// <summary>Called before a Weblog_Theme is updated.</summary>
 /// <param name="instance">The instance.</param>
 partial void UpdateWeblog_Theme(Weblog_Theme instance);
 /// <summary>Called before a Weblog_Theme is inserted.</summary>
 /// <param name="instance">The instance.</param>
 partial void InsertWeblog_Theme(Weblog_Theme instance);
示例#5
0
 /// <summary>
 /// 插入主题记录
 /// </summary>
 /// <param name="WT"></param>
 public static void Insert(Weblog_Theme WT)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     BD.Weblog_Themes.InsertOnSubmit(WT);
     BD.SubmitChanges();
 }