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

📄 leaveservice.cs

📁 关于微软暑期实训的详细资料
💻 CS
字号:
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
using System.Data;


/// <summary>
/// Summary description for LeaveService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class LeaveService : System.Web.Services.WebService {
    private LeaveRequest lr;
    private Common common;

    public LeaveService () {
        lr = new LeaveRequest();
        common = new Common();
        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    /*
    [WebMethod]
    public LeaveRequest CancelLvReqest(int empID, int hours)
    {
        return CancelLvReqest(empID, hours);
    }
*/

    /*************                                                       ***************/
    /********                             请 假 申 请                             **********/
    /*************                                                       ***************/

    //获得某员工在某个时间段上的请假记录
    [WebMethod]
    public DataSet GetEmpLvHistoryByTime(int empID, string startTime, string endTime)
    {
        return lr.GetEmpLvHistoryByTime(empID, startTime, endTime);
    }
    
    //取消请假申请
    [WebMethod]
    public bool CancelLvReqest(int leaveID)
    {
        return lr.CancelLvReqest(leaveID);
    }

    //提交请假申请
    [WebMethod]
    public bool SubmitLvRequest(int empID, string submitTime, string startTime, string endTime, int approverID, int hours, string reason)
    {
        return lr.SubmitLvRequest(empID, submitTime, startTime, endTime, approverID, hours, reason); 
    }

    //获得员工可取消的请假申请记录    
    [WebMethod]
    public DataSet GetUncheckedEmpLvRequest(int empID)
    {
        return lr.GetUncheckedEmpLvRequest(empID);
    }

    /*************                                                       ***************/
    /********                             请 假 审 核                             **********/
    /*************                                                       ***************/

    //获得所要审核的请假记录
    [WebMethod]
    public DataSet GetAllLUncheckedLvRequest(int mgrID)
    {
        return lr.GetAllLUncheckedLvRequest(mgrID);
    }

    //批准请假
    [WebMethod]
    public bool AgreeLvRequest(int leaveID)
    {
        return lr.AgreeLvRequest(leaveID);
    }

    //否决请假
    [WebMethod]
    public bool DisAgreeLvRequest(int leaveID, string reason)
    {
        return lr.DisAgreeLvRequest(leaveID,reason);
    }

    //获得汇总的部门请假记录
    [WebMethod]
    public DataSet GetSummaryOfLvReqByTime(int depID, string startTime, string endTime)
    {
        return lr.GetSummaryOfLvReqByTime(depID, startTime, endTime);
    }

    //获得汇总的部门请假记录中的个人记录
    [WebMethod]
    public DataSet GetSummaryOfEPsnlLvReqByTime(int empID, string startTime, string endTime)
    {
        return lr.GetSummaryOfEPsnlLvReqByTime(empID, startTime, endTime);
    }

    /*************                                                       ***************/
    /********                             公 共 部 分                             **********/
    /*************                                                       ***************/

    //获取所有部分
    [WebMethod]
    public DataSet GetAllDepartment()
    {
        return common.GetAllDepartment();
    }

    //获取特定部门的所有员工
    [WebMethod]
    public DataSet GetEmpByDepartment(int deptID)
    {
        return common.GetEmpByDepartment(deptID);
    }
}

⌨️ 快捷键说明

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