惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Martin Fowler
Martin Fowler
雷峰网
雷峰网
Recent Announcements
Recent Announcements
博客园 - 叶小钗
F
Full Disclosure
C
Check Point Blog
A
About on SuperTechFans
L
LangChain Blog
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美
C
Cybersecurity and Infrastructure Security Agency CISA
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cisco Talos Blog
Cisco Talos Blog
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
MongoDB | Blog
MongoDB | Blog
Project Zero
Project Zero
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Know Your Adversary
Know Your Adversary
D
Docker
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Exploit Database - CXSecurity.com
L
Lohrmann on Cybersecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Latest news
Latest news
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 最新话题
Google DeepMind News
Google DeepMind News
小众软件
小众软件
NISL@THU
NISL@THU
GbyAI
GbyAI
H
Heimdal Security Blog
Jina AI
Jina AI
I
InfoQ
PCI Perspectives
PCI Perspectives
P
Privacy International News Feed
P
Proofpoint News Feed
N
News and Events Feed by Topic
C
CERT Recently Published Vulnerability Notes
aimingoo的专栏
aimingoo的专栏
SecWiki News
SecWiki News
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志

博客园 - codingsilence

都是分号惹的祸(ORA-00911: invalid character) 降低Winform 内存占用 installshiled 创建iis应用程序池和站点 FARPOINT 常见用法 比较Double型数据时的注意事项 WinForm中获取鼠标当前位置 查看SQL Server日志 WinForm winform动态生成菜单 WinForm 从XML中动态加载菜单的示例 “轻松加愉快”地实现并使用IComparer接口 WinForm 选择器 C#程序实现动态调用DLL的研究 WCF 的 WebGet 方式 WCF WebGet WebInvoke WCF Jquery 调用 开源选型关注点 在64位Windows的IIS上开启32位程序支持(转) Oracle grant用户授权 ODP.NET开发和部署的相关问题 Client使用c#和odp.net连接server oracle
更新部分字段 NHibernate
codingsilence · 2011-08-12 · via 博客园 - codingsilence
 

public static bool UpdateIsBrowse(decimal id)
        {
            
bool IsSuccess = false;

            ITransaction trans 

= session.BeginTransaction();
            
try
            {
                
//2 修改记录
                string sql = " update jkpt_oaxt_weatherforecast set Isbrowse=1 where Weatherforecastid=" + id;           

                ISQLQuery Query 

= session.CreateSQLQuery(sql).AddEntity(typeof(JkptOaxtWeatherforecast));
                Query.ExecuteUpdate();             
                session.Flush();
                trans.Commit();
                
//写日志
                Helpers.SaveInfo("Update weatherforecast 's isbrowse Success!");
                IsSuccess 
= true;
            }
            
catch (Exception ex)
            {
                IsSuccess 
= false;
                trans.Rollback();
                
//写日志
                Helpers.SaveInfo("更新是否浏览失败!错误提示如下:" + ex.Message);
            }
            
finally
            {
                
if (session != null)
                {
                    session.Clear();
                }
            }
            
return IsSuccess;
        }