當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。