摘要: public virtual ArrayList QueryEmployeeDemissionSettlementListByExec(DateTime begin,DateTime end) { using (ISession session = OpenSession()) { return (ArrayList)session.CreateCriteria(typeof(EmployeeDemissionInfo)).Add(Expression.Eq("SettlementStatus",... 阅读全文
posted @ 2012-08-29 23:05 Tom Fan 阅读(409) 评论(0) 推荐(0) 编辑
摘要: public virtual DemissionRemittanceInfo GetDemissionRemittanceInfo(int demissionremittanceID) { using (ISession session = OpenSession()) { return (DemissionRemittanceInfo)NHibernateHelper.GetObject(session, typeof(DemissionRemittanceInfo), demissionremitta... 阅读全文
posted @ 2012-08-29 23:03 Tom Fan 阅读(204) 评论(0) 推荐(0) 编辑
摘要: public virtual void DeletePerson(int id) { using(ISession session = OpenSession()) { ITransaction tx = null; try { tx = session.BeginTransaction(); session.Delete(string.Format("from Perso... 阅读全文
posted @ 2012-08-29 23:01 Tom Fan 阅读(383) 评论(0) 推荐(0) 编辑
摘要: public virtual IList GetEmployeeListByPeriodAndDeptList(IList deptlist, DateTime begin, DateTime end) { using (ISession session = OpenSession()) { return session.CreateCriteria(typeof(EmployeeInfo)).Add(Expression.In("DeptID", deptlist)).Add(Expression.S... 阅读全文
posted @ 2012-08-29 22:58 Tom Fan 阅读(255) 评论(0) 推荐(0) 编辑
摘要: public virtual int InsertEmployeeInfoByImport(EmployeeInfo info, PersonInfo person, CorporationSaveCountInfo count) { using (ISession session = OpenSession()) { ITransaction tx = null;//创建一个事务 try { tx = se... 阅读全文
posted @ 2012-08-29 22:53 Tom Fan 阅读(197) 评论(0) 推荐(0) 编辑
摘要: View Code select sum(c) from ( select count(*) as c from auditingapply where AuditingStatus in (4400000 ) and MakeDraftMan=9500 union select count(*) as c from auditingapply where AuditingStatus in (4400004 ) and MakeDraftMan=9500 and createtime>(select case when month(getdate())-5<0 --如果当前月份. 阅读全文
posted @ 2012-08-29 22:43 Tom Fan 阅读(183) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Data;using System.IO;using System.Web;using NPOI;using NPOI.HPSF;using NPOI.HSSF;using NPOI.HSSF.UserModel;using NPOI.POIFS;using NPOI.Util;using System.Text;namespace SKY.SUBUNIT{ /// <summary> /// 使用第三方组件NPOI动态创建EXC 阅读全文
posted @ 2012-07-18 16:54 Tom Fan 阅读(1076) 评论(0) 推荐(0) 编辑
摘要: 存储过程的代码如下:ALTER proc [dbo].[Get_Model_ByGroup]( @groups varchar(200), @msg varchar(50)='' output)asdeclare @sqlPage nvarchar(1000) --主语句begin set @sqlPage='select * from T_Model where moduleid in(select distinct moduleid from T_Groups_Model_Popedom where GroupsID in('+@groups+')) 阅读全文
posted @ 2012-07-04 17:52 Tom Fan 阅读(1017) 评论(0) 推荐(0) 编辑
摘要: update T_Product set amount=(case when quantity<10 then amount*(1-0.1)when quantity between 10 and 20 then amount*(1-0.2)else amount*(1-0.3)end) 阅读全文
posted @ 2012-06-13 22:43 Tom Fan 阅读(151) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace RefAndOutAndParams{ class Program { /// <summary> /// 一个方法中可以动态传递多个参数的方法 /// </summary> /// <param name="list"></param> public static void MyTestParams(params Object [... 阅读全文
posted @ 2012-06-13 22:28 Tom Fan 阅读(268) 评论(0) 推荐(0) 编辑