Ejemplo n.º 1
0
 /// <summary>
 /// 构造函数,为测试
 /// </summary>
 /// <param name="currDate"></param>
 /// <param name="days"></param>
 /// <param name="iAccountBll"></param>
 /// <param name="iVacationmock"></param>
 public AutoRemindVacation(DateTime currDate, int days, IAccountBll iAccountBll, IVacation iVacationmock)
 {
     _Days        = days;
     _CurrDate    = currDate;
     _IAccountBll = iAccountBll;
     _Dal         = iVacationmock;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 获得请假的方法
 /// </summary>
 /// <param name="mockVacation"></param>
 /// <param name="mockLeaveRequestType"></param>
 /// <param name="mockIPlanDutyDal"></param>
 public GetLeaveRequest(IVacation mockVacation, ILeaveRequestType mockLeaveRequestType,
                        IPlanDutyDal mockIPlanDutyDal)
 {
     _DalVacation         = mockVacation;
     _DalLeaveRequestType = mockLeaveRequestType;
     _DalPlanDutyDal      = mockIPlanDutyDal;
 }
 /// <summary>
 /// 构造函数,为测试
 /// </summary>
 /// <param name="date"></param>
 /// <param name="dateList"></param>
 /// <param name="iVacationmock"></param>
 public AutoRemindVacationSendEmail(DateTime date, List <DateTime> dateList,
                                    IVacation iVacationmock)
 {
     _CurrDate     = date;
     _DateList     = dateList;
     _Dal          = iVacationmock;
     _MailBodyList = new List <MailBody>();
 }
Ejemplo n.º 4
0
 ///<summary>
 /// for 单元测试
 ///</summary>
 ///<param name="date"></param>
 ///<param name="inComanyMonth"></param>
 ///<param name="createAnnualHolidayDay"></param>
 ///<param name="createAnnualHolidayMonth"></param>
 ///<param name="annualHolidayLow"></param>
 ///<param name="annualHolidayHigh"></param>
 ///<param name="deferredMonths"></param>
 ///<param name="mockIVacation"></param>
 public AutoCreateVacation(DateTime date, int createAnnualHolidayMonth,
                           int annualHolidayLow, int annualHolidayHigh, int deferredMonths,
                           int inComanyMonth, int createAnnualHolidayDay,
                           IVacation mockIVacation)
 {
     _Date = date;
     _CreateAnnualHolidayDay   = createAnnualHolidayDay;
     _CreateAnnualHolidayMonth = createAnnualHolidayMonth;
     _AnnualHolidayLow         = annualHolidayLow;
     _AnnualHolidayHigh        = annualHolidayHigh;
     _DeferredMonths           = deferredMonths;
     _VacationDal = mockIVacation;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 用于测试
 /// </summary>
 public void TestExcute(int accountid, List <LeaveRequestItem> leaveRequestitems, LeaveRequestType type,
                        List <Vacation> VacationList, List <DayAttendance> dayAttendanceList,
                        IVacation mockvacation)
 {
     _AccountID         = accountid;
     _LeaveRequestItems = leaveRequestitems;
     _Type              = type;
     _VacationList      = VacationList;
     _DayAttendanceList = dayAttendanceList;
     _IsTest            = true;
     _VacationDal       = mockvacation;
     Excute();
 }
        /// <summary>
        /// 取消整张请假单
        /// </summary>
        public FastApproveWholeLeaveRequest(int leaveRequestID, int accountID, string reason,
                                            ILeaveRequestDal mockILeaveRequestDal, ILeaveRequestFlowDal mockILeaveRequestFlowDal,
                                            IEmployeeDiyProcessDal mockIEmployeeDiyProcessDal, IVacation mockIVacation,
                                            IAdjustRest mockIAdjustRest, IPlanDutyDal mockIPlanDutyDal, ILeaveRequestType mockILeaveRequestType)
        {
            _AccountID      = accountID;
            _LeaveRequestID = leaveRequestID;
            _Reason         = reason;

            _DalLeaveRequest       = mockILeaveRequestDal;
            _DalLeaveRequestFlow   = mockILeaveRequestFlowDal;
            _DalEmployeeDiyProcess = mockIEmployeeDiyProcessDal;
            _DalVacation           = mockIVacation;
            _IAdjustRestDal        = mockIAdjustRest;
            _DalPlanDutyDal        = mockIPlanDutyDal;
            _DalLeaveRequestType   = mockILeaveRequestType;
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 新增请假单
 /// </summary>
 public AddLeaveRequest(LeaveRequest leaveRequest, bool ifSubmit, IVacation mockIVacation,
                        IAdjustRest mockIAdjustRest, ILeaveRequestDal mockILeaveRequestDal,
                        ILeaveRequestFlowDal mockILeaveRequestFlowDal,
                        IEmployeeDiyProcessDal mockIEmployeeDiyProcessDal,
                        IOverWork mockIOverWork, IOutApplication mockIOutApplication,
                        IPlanDutyDal mockIPlanDutyDal,
                        ILeaveRequestType mockILeaveRequestType, IEmployee mockIEmployee)
 {
     _LeaveRequest          = leaveRequest;
     _IfSubmit              = ifSubmit;
     _IVacationDal          = mockIVacation;
     _IAdjustRestDal        = mockIAdjustRest;
     _DalLeaveRequest       = mockILeaveRequestDal;
     _DalLeaveRequestFlow   = mockILeaveRequestFlowDal;
     _DalEmployeeDiyProcess = mockIEmployeeDiyProcessDal;
     _OverWorkDal           = mockIOverWork;
     _DalOutApplication     = mockIOutApplication;
     _DalPlanDutyDal        = mockIPlanDutyDal;
     _DalLeaveRequestType   = mockILeaveRequestType;
     _DalEmployee           = mockIEmployee;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 测试用
 /// </summary>
 public EditVacation(List <Model.Vacation> vacationList, Employee employee, IVacation mockDal)
 {
     _Employee     = employee;
     _VacationList = vacationList;
     _Dal          = mockDal;
 }
Ejemplo n.º 9
0
 public DeleteVacation(int vacationID, IVacation mockVacation)
     : this(vacationID)
 {
     _VacationDal = mockVacation;
 }
Ejemplo n.º 10
0
 public AddVacation(Model.Vacation vacation, IVacation mockVacation)
     : this(vacation)
 {
     _VacationDal = mockVacation;
 }
        /// <summary>
        /// 取消整张请假单
        /// </summary>
        public ApproveLeaveRequestItem(int leaveRequestID, int leaveRequestItemID, int operatorID,
                                       RequestStatus requestStatus, string reason,
                                       ILeaveRequestDal mockILeaveRequestDal, ILeaveRequestFlowDal mockILeaveRequestFlowDal,
                                       IEmployeeDiyProcessDal mockIEmployeeDiyProcessDal, IVacation mockIVacation,
                                       IAdjustRest mockIAdjustRest, IPlanDutyDal mockIPlanDutyDal, ILeaveRequestType mockILeaveRequestType)
        {
            _LeaveRequestID     = leaveRequestID;
            _LeaveRequestItemID = leaveRequestItemID;
            _RequestStatus      = requestStatus;
            _Reason             = reason;
            _OperatorID         = operatorID;

            _DalLeaveRequest       = mockILeaveRequestDal;
            _DalLeaveRequestFlow   = mockILeaveRequestFlowDal;
            _DalEmployeeDiyProcess = mockIEmployeeDiyProcessDal;
        }
Ejemplo n.º 12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="mockVacation"></param>
 public GetVacation(IVacation mockVacation)
 {
     _dal = mockVacation;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 构造函数,测试
 /// </summary>
 public GetEmployeeStatistics(IVacation iVacation, IPositionHistory iPositionHistory)
 {
     _DalVacation        = iVacation;
     _DalPositionHistory = iPositionHistory;
 }