示例#1
0
    public bool DelegateEmployee(iDelegate idel)
    {
        string empID = idel.EmployeeID.ToString();

        DateTime start   = Convert.ToDateTime(idel.StartDate.ToString());
        DateTime end     = Convert.ToDateTime(idel.EndDate.ToString());
        bool     delFlag = delegateAuthorityController.delegateEmployee(empID, start, end);

        return(delFlag);
    }
示例#2
0
    public static iDelegate Make(string employeeID, string employeeName, string startDate, string endDate)
    {
        iDelegate emp = new iDelegate();

        emp.employeeID   = employeeID;
        emp.employeeName = employeeName;
        emp.startDate    = startDate;
        emp.endDate      = endDate;

        return(emp);
    }
示例#3
0
    public iDelegate GetDelegate(string deptCode)
    {
        Delegation delegation = delegateAuthorityController.getDelegatedEmployeeForDept(deptCode);
        String     sDate      = delegation.StartDate.ToString();
        String     eDate      = delegation.EndDate.ToString();
        iDelegate  idelegate  = new iDelegate();

        DateTime s = (DateTime)delegation.StartDate;
        DateTime d = (DateTime)delegation.EndDate;



        idelegate.EmployeeID = delegation.EmployeeID;

        idelegate.EmployeeName = delegation.Employee.EmployeeName;
        idelegate.StartDate    = s.ToShortDateString().Replace("/", "-");
        idelegate.EndDate      = d.ToShortDateString().Replace("/", "-");

        return(idelegate);
    }