温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Asp.net2.0值班管理系统源码
当前文件:
DutySystem/App_Code/Dao/DutyDao.cs[1K,2009-6-12 11:41:29],打开代码结构图
DutySystem/App_Code/Dao/DutyDao.cs[1K,2009-6-12 11:41:29],打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Web; 5
using System.Web.Security; 6
using System.Web.UI; 7
using System.Web.UI.WebControls; 8
using System.Web.UI.WebControls.WebParts; 9
using System.Web.UI.HtmlControls; 10
11
/// <summary> 12
/// DutyDao 的摘要说明 13
/// </summary> 14
public class DutyDao 15
{ 16
public DutyDao() 17
{ 18
// 19
// TODO: 在此处添加构造函数逻辑 20
// 21
} 22
23
public static DataSet dsDuty() 24
{ 25
string sql = "select a.id,a.L_ZBB_dateBegin,a.L_ZBB_dateEnd,a.L_ZBB_BZ,b.L_KS_KSMC,c.L_user_name from LHB_Office_ZBB a ,LHB_Office_ZBB_KS b,LHB_Office_ZBB_USER c where a.L_ZBB_KS = b.id and a.L_ZBB_nameId=c.id"; 26
return ShareCommon.dsBySql(sql); 27
} 28
29
public static void insertDuty(DutyPO dp) 30
{ 31
string sql = "insert into LHB_Office_ZBB (L_ZBB_KS,L_ZBB_nameId,L_ZBB_dateBegin,L_ZBB_dateEnd,L_ZBB_BZ) values("+dp.DepartId+","+dp.StaffId+",'"+dp.DutyDateBegin+"','"+dp.DutyDateEnd+"','"+dp.DutyComment+"')"; 32
ShareCommon.executeNonQuery(sql); 33
34
} 35
public static DataSet dsDuty(DateTime date) 36
{ 37
string sql = "select a.id,a.L_ZBB_dateBegin,a.L_ZBB_dateEnd,a.L_ZBB_BZ,b.L_KS_KSMC,c.L_user_name from LHB_Office_ZBB a ,LHB_Office_ZBB_KS b,LHB_Office_ZBB_USER c where a.L_ZBB_KS = b.id and a.L_ZBB_nameId=c.id and '" + date + "' between L_ZBB_dateBegin and L_ZBB_dateEnd"; 38
return ShareCommon.dsBySql(sql); 39
} 40
41
public static DataSet dsDuty(DateTime date1,DateTime date2) 42
{ 43
string sql = "select a.id,a.L_ZBB_dateBegin,a.L_ZBB_dateEnd,a.L_ZBB_BZ,b.L_KS_KSMC,c.L_user_name from LHB_Office_ZBB a ,LHB_Office_ZBB_KS b,LHB_Office_ZBB_USER c where a.L_ZBB_KS = b.id and a.L_ZBB_nameId=c.id and L_ZBB_dateBegin >='" + date1 + "' and L_ZBB_dateEnd<='"+date2.AddDays(1)+"'"; 44
return ShareCommon.dsBySql(sql); 45
} 46
47
48
} 49









