当前位置: 首页>>代码示例>>C#>>正文


C# BlogDataDataContext.SubmitChanges方法代码示例

本文整理汇总了C#中Ncuhome.Blog.Data.BlogDataDataContext.SubmitChanges方法的典型用法代码示例。如果您正苦于以下问题:C# BlogDataDataContext.SubmitChanges方法的具体用法?C# BlogDataDataContext.SubmitChanges怎么用?C# BlogDataDataContext.SubmitChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ncuhome.Blog.Data.BlogDataDataContext的用法示例。


在下文中一共展示了BlogDataDataContext.SubmitChanges方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

 /// <summary>
 /// 删除记录
 /// </summary>
 /// <param name="GroupId"></param>
 public static void Delete(int GroupId)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Groups.Single(p => p.Group_Id == GroupId);
     BD.Weblog_Groups.DeleteOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_Group.cs

示例2: Edit

 public static void Edit(Weblog_Recommend WR)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
    var temp= BD.Weblog_Recommends.Single(p=>p.Recommend_Id==WR.Recommend_Id);
    temp.Recommend_LogId = WR.Recommend_LogId;
    BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:BWeblog_Recommend.cs

示例3: InsertRssLink

 /// <summary>
 /// 插入新的RssLink
 /// </summary>
 /// <param name="WURL"></param>
 public static bool InsertRssLink(Weblog_UserRssLink WURL)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     BD.Weblog_UserRssLinks.InsertOnSubmit(WURL);
     BD.SubmitChanges();
     return true;
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_UserRssLink.cs

示例4: DeleteById

 public static void DeleteById(int Id)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_CssFiles.Where(p => p.CssFile_Id == Id);
     BD.Weblog_CssFiles.DeleteAllOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:BWeblog_CssFile.cs

示例5: Delete

 /// <summary>
 /// 删除主题
 /// </summary>
 /// <param name="Id"></param>
 public static void Delete(int Id)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Themes.Single(p => p.Theme_Id == Id);
     BD.Weblog_Themes.DeleteOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_Theme.cs

示例6: Delete

 /// <summary>
 /// 删除记录
 /// </summary>
 /// <param name="CssId"></param>
 public static void Delete(int CssId)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_UserCsses.Single(p => p.UserCss_Id == CssId);
     BD.Weblog_UserCsses.DeleteOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_UserCss.cs

示例7: Edit

 public static void Edit(Weblog_Notice WN)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     Weblog_Notice notice = BD.Weblog_Notices.Where(p => p.Notice_Type == 1).First();
     notice.Notice_Content = System.Web.HttpContext.Current.Server.HtmlEncode(WN.Notice_Content).Replace("\n", "<br />");
     notice.Notice_CreateTime = DateTime.Now;
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:BWeblog_Notice.cs

示例8: Update

 /// <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();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:12,代码来源:BWeblog_Theme.cs

示例9: Insert

        public static bool  Insert(Weblog_RecommendTheme WRT)
        {
            BlogDataDataContext BD = new BlogDataDataContext();
            BD.Weblog_RecommendThemes.InsertOnSubmit(WRT); 
            BD.SubmitChanges();
            return true;

        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:BWeblog_RecommendTheme.cs

示例10: Update

 /// <summary>
 /// 更新记录
 /// </summary>
 /// <param name="WUC"></param>
 public static void Update(Weblog_UserCss WUC)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_UserCsses.Single(p => p.UserCss_Id == WUC.UserCss_Id);
     temp.UserCss_CssFileId = WUC.UserCss_CssFileId;
     temp.UserCss_Used = WUC.UserCss_Used;
     temp.UserCss_UserId = WUC.UserCss_UserId;
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:13,代码来源:BWeblog_UserCss.cs

示例11: DeleteRssLinkByID

 /// <summary>
 /// 根据ID来删除RssLink
 /// </summary>
 /// <param name="ID"></param>
 /// <returns></returns>
 public static bool DeleteRssLinkByID(int UID,int ID)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     Weblog_UserRssLink temp = null;
     var WURL = BD.Weblog_UserRssLinks.Where(p => p.Weblog_UserRssLinkId == ID&&p.Weblog_UserId==UID);
     if (WURL.Count()>0)
     {
         temp = WURL.First();
         BD.Weblog_UserRssLinks.DeleteOnSubmit(temp);
         BD.SubmitChanges();
         return true;
     }
     return false;
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:19,代码来源:BWeblog_UserRssLink.cs

示例12: Insert

        /// <summary>
        /// 插入新的文章种类
        /// </summary>
        /// <param name="WC"></param>
        /// <returns></returns>
        public static bool Insert(Weblog_Category WC)
        {
            BlogDataDataContext BD = new BlogDataDataContext();

            try
            {
                BD.Weblog_Categorys.InsertOnSubmit(WC);
                BD.SubmitChanges();
            }
            catch (Exception)
            {
                return false;
            }
            return true;
        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:20,代码来源:BWeblog_Category.cs

示例13: Update

 /// <summary>
 /// 修改数据
 /// </summary>
 /// <param name="WG"></param>
 public static void Update(Weblog_Group WG)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Groups.Single(p=>p.Group_Id==WG.Group_Id);
     temp.Group_AdministratorsCount = WG.Group_AdministratorsCount;
     temp.Group_ClassId = WG.Group_ClassId;
     temp.Group_Competence = WG.Group_Competence;
     temp.Group_CreateTime = WG.Group_CreateTime;
     temp.Group_FounderId = WG.Group_FounderId;
     temp.Group_ImageUrl = WG.Group_ImageUrl;
     temp.Group_Introduce = WG.Group_Introduce;
     temp.Group_IsCertificateWhileJoin = WG.Group_IsCertificateWhileJoin;
     temp.Group_IsViewByStrangers = WG.Group_IsViewByStrangers;
     temp.Group_Keywords = WG.Group_Keywords;
     temp.Group_MembersCount = WG.Group_MembersCount;
     temp.Group_Name = WG.Group_Name;
     temp.Group_Notice = WG.Group_Notice;
     temp.Group_TopicCount = WG.Group_TopicCount;
     temp.Group_Url = WG.Group_Url;
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:25,代码来源:BWeblog_Group.cs

示例14: UpdateRssLinkByID

 /// <summary>
 /// 更新RSS镜像是否审核通过
 /// </summary>
 /// <param name="ID">RssLinkID</param>
 /// <returns></returns>
 public static bool UpdateRssLinkByID(int ID)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     Weblog_UserRssLink temp = null;
     var WURL = BD.Weblog_UserRssLinks.Where(p => p.Weblog_UserRssLinkId == ID);
     if (WURL.Count()>0)
     {
         temp = WURL.First();
         if (temp.Weblog_UserRssIsPassed==true)
         {
             temp.Weblog_UserRssIsPassed = false;
         }
         else
         {
             temp.Weblog_UserRssIsPassed = true;
         }
         BD.SubmitChanges();
         return true;
     }
     return false;
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:26,代码来源:BWeblog_UserRssLink.cs

示例15: Update

 public static void Update(Weblog_Log WL)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     Weblog_Log temp = BD.Weblog_Logs.Single(p => p.Log_Id == WL.Log_Id);
     temp.Log_CateId = WL.Log_CateId;
     temp.Log_Title = WL.Log_Title;
     temp.Log_Content = WL.Log_Content;
     temp.Log_IsDraft = WL.Log_IsDraft;
     temp.Log_LastModiTime = WL.Log_LastModiTime;
     temp.Log_IsTop = WL.Log_IsTop;
     temp.Log_IsPasssword = WL.Log_IsPasssword;
     temp.Log_IsEnRePly = WL.Log_IsEnRePly;
     temp.Log_IsIndexShow = WL.Log_IsIndexShow;
     temp.Log_PassWord = WL.Log_PassWord;
     temp.Log_KeyWords = WL.Log_KeyWords;
     temp.Log_CreateTime = WL.Log_CreateTime;
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:18,代码来源:BWeblog_log.cs


注:本文中的Ncuhome.Blog.Data.BlogDataDataContext.SubmitChanges方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。