⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dutydao.cs

📁 值班管理系统源码 net2005+sqlserver2005 ,三层模式
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// DutyDao 的摘要说明
/// </summary>
public class DutyDao
{
	public DutyDao()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}

    public static DataSet dsDuty()
    {
        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";
        return ShareCommon.dsBySql(sql);
    }

    public static void insertDuty(DutyPO dp)
    {
        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+"')";
        ShareCommon.executeNonQuery(sql);

    }
    public static DataSet dsDuty(DateTime  date)
    {
        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";
        return ShareCommon.dsBySql(sql);
    }

    public static DataSet dsDuty(DateTime date1,DateTime date2)
    {
        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)+"'";
        return ShareCommon.dsBySql(sql);
    }


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -