예제 #1
0
    public WCFEmployee findCurrentRepresentative(string headid)
    {
        int         head       = Convert.ToInt32(headid);
        Employee    current    = dhmanager.getDepartmentRepresentative(head);
        WCFEmployee wcfcurrent = WCFEmployee.Make(current.employeecode, current.employeename, current.employeeemail, current.deptcode, current.role, current.del);

        return(wcfcurrent);
    }
예제 #2
0
    public WCFEmployee GetEmployeeByEmail(string email, string password)
    {
        Employee emp = LoginController.login(email, password);

        return(WCFEmployee.Make(emp.EmpID, emp.DeptCode, emp.EmpName, emp.Role, emp.Password
                                , emp.Email, emp.IsTempHead, emp.StartDate.GetValueOrDefault().ToShortDateString()
                                , emp.EndDate.GetValueOrDefault().ToShortDateString()));
    }
예제 #3
0
    //AUTHOR : KHIN MYO MYO SHWE
    public WCFEmployee GetDeptRep(string dcode)
    {
        Department d   = deptController.GetDepartByDepCode(dcode);
        Employee   emp = deptController.GetEmployeeListForDRepSelected(dcode);

        return(WCFEmployee.Make(emp.EmpID, d.DeptName, emp.EmpName, emp.Role, emp.Password
                                , emp.Email, emp.IsTempHead, emp.StartDate.GetValueOrDefault().ToShortDateString()
                                , emp.EndDate.GetValueOrDefault().ToShortDateString()));
    }
예제 #4
0
 /*get employee by username and password*/
 public WCFEmployee getEmployee(String un, String psd)
 {
     try
     {
         Employee e = EmployeeOp.Authenticate(un, psd);
         return(WCFEmployee.Make(e.EmpID, e.DepartmentID, e.EmpTitle, e.EmpName, e.Email, e.Delegate, 1, e.DelegateStartDate.ToString(), e.DelegateEndDate.ToString()));
     }
     catch
     {
         return(WCFEmployee.Make(null, null, null, null, null, 0, 0, null, null));
     }
 }
예제 #5
0
    /*get employee list by department id*/
    public List <WCFEmployee> getEmpByDep(string deptId)
    {
        List <Employee>    e1 = EmployeeOp.getEmployee(deptId);
        List <WCFEmployee> l  = new List <WCFEmployee>();

        foreach (Employee e in e1)
        {
            l.Add(WCFEmployee.Make(e.EmpID, e.DepartmentID, e.EmpTitle, e.EmpName, e.Email, e.Delegate, 1, e.DelegateStartDate.ToString(), e.DelegateEndDate.ToString()));
        }

        return(l);
    }
예제 #6
0
    public List <WCFEmployee> populateEmployee(string headcode)
    {
        int hcode = Convert.ToInt32(headcode);
        List <WCFEmployee> wcfelist = new List <WCFEmployee>();
        List <Employee>    elist    = dhmanager.PopulateEmpList(hcode);

        foreach (Employee i in elist)
        {
            WCFEmployee e = WCFEmployee.Make(i.employeecode, i.employeename, i.employeeemail, i.deptcode, i.role, i.del);
            wcfelist.Add(e);
        }
        return(wcfelist);
    }
예제 #7
0
    //AUTHOR : KHIN MYO MYO SHWE
    public List <WCFEmployee> ListForDeptRep(string dcode, string id)
    {
        List <WCFEmployee> wlist = new List <WCFEmployee>();
        List <Employee>    elist = deptController.GetEmployeeListForDRep(dcode, Convert.ToInt16(id));

        foreach (Employee e in elist)
        {
            wlist.Add(WCFEmployee.Make(e.EmpID, e.DeptCode, e.EmpName, e.Role, e.Password, e.Email
                                       , e.IsTempHead, e.StartDate.GetValueOrDefault().ToShortDateString()
                                       , e.EndDate.GetValueOrDefault().ToShortDateString()));
        }
        return(wlist);
    }
예제 #8
0
    //AUTHOR : KHIN MYO MYO SHWE
    public WCFEmployee GetActingDHead(string dcode)
    {
        int count = deptController.GetEmployeeListForActingDHeadSelectedCount(dcode);

        if (count > 0)
        {
            Department d   = deptController.GetDepartByDepCode(dcode);
            Employee   emp = deptController.GetEmployeeListForActingDHeadSelected(dcode);
            return(WCFEmployee.Make(emp.EmpID, d.DeptName, emp.EmpName, emp.Role, emp.Password
                                    , emp.Email, emp.IsTempHead, emp.StartDate.GetValueOrDefault().ToShortDateString()
                                    , emp.EndDate.GetValueOrDefault().ToShortDateString()));
        }
        else
        {
            return(WCFEmployee.Make(0, null, null, null, null, null, null, null, null));
        }
    }
예제 #9
0
    /*getting current department representative */
    public WCFEmployee currentRep(string deptId)
    {
        Employee e = EmployeeOp.currentRep(deptId);

        return(WCFEmployee.Make(e.EmpID, e.DepartmentID, e.EmpTitle, e.EmpName, e.Email, e.Delegate, 1, e.DelegateStartDate.ToString(), e.DelegateEndDate.ToString()));
    }