예제 #1
0
        public static bool checkAuthorisation(string deptId, string username, string password)
        {
            Employee deptRep = DepartmentDAO.getDepartmentRepDetails(deptId);

            if (deptRep.UserName.Equals(username) && deptRep.Password.Equals(password))
            {
                return(true);
            }

            else
            {
                return(false);
            }
        }
예제 #2
0
        public static List <Department> getAllDeptForCollectionPointID(string collectionPointId)
        {
            //get all dept for collection point who have pending consolidated list(awaiting)

            //1) get all depts for that collection point id
            List <Department> deptForCollectionPtIDList = DepartmentDAO.getDepartmentsForCollectionPointId(collectionPointId);

            //2) get all depts with consolidated list in awaiting
            List <ConsolidatedRequisitionList> awaiting_Consol_List = ConsolidatedRequisitionListEFFacade.getAllAwaitingStatus();

            // 3) create new list for depts for that collection point with awaiting consolidated list
            List <Department> finalDeptList = new List <Department>();

            foreach (ConsolidatedRequisitionList consol_List in awaiting_Consol_List)
            {
                foreach (Department dept in deptForCollectionPtIDList)
                {
                    if (dept.DepartmentCode.Equals(consol_List.DepartmentCode))
                    {
                        //check if theres duplicate in finallist if not add to list
                        bool isduplicate = false;

                        foreach (Department dep in finalDeptList)
                        {
                            if (dept.DepartmentCode.Equals(dep.DepartmentCode))
                            {
                                isduplicate = true;
                            }
                        }

                        if (!isduplicate)
                        {
                            finalDeptList.Add(dept);
                        }
                    }
                }
            }

            return(finalDeptList);
        }
        //--- new methods --//

        public static List <Department> GetAllDepartments()
        {
            return(DepartmentDAO.GetAllDepartments());
        }
예제 #4
0
        public static Department getdepartmentfromempid(String empid)
        {
            Department dep = DepartmentDAO.getdepartmentfromempid(empid);

            return(dep);
        }
예제 #5
0
 public static void updatedepartmentcollection(Department dep, string s2, string s3)
 {
     DepartmentDAO.updatecollectiondetails(dep, s2, s3);
 }
예제 #6
0
 public static string GetRepresentativeName(String de)
 {
     return(DepartmentDAO.GetRepresentativeName(de));
 }
예제 #7
0
        /** added by ashwin
         * */
        public static Department getdepartmentdetails(string deptCode)
        {
            Department dept = DepartmentDAO.getdepartment(deptCode);

            return(dept);
        }
예제 #8
0
 public static void setRepname(string repno, string deph)
 {
     DepartmentDAO.setRepname(repno, deph);
 }
예제 #9
0
 //////****************Sreeja********************///////
 public static void setCollectionPt(string collecpt, string deph)
 {
     DepartmentDAO.setCollectionPt(collecpt, deph);
 }
예제 #10
0
 public static List <CollectionPoint> getAllCollectionPoins()
 {
     return(DepartmentDAO.getAllCollectionPoins());
 }
예제 #11
0
 public static List <Object> getAllEmployeesOfThisHead(String depH)
 {
     return(DepartmentDAO.getAllEmployeesOfThisHead(depH));
 }
예제 #12
0
 public static string GetCollectionPoint(String den)
 {
     return(DepartmentDAO.GetCollectionPoint(den));
 }