Exemple #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);
            }
        }
Exemple #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());
        }
Exemple #4
0
        public static Department getdepartmentfromempid(String empid)
        {
            Department dep = DepartmentDAO.getdepartmentfromempid(empid);

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

            return(dept);
        }
 public static void setRepname(string repno, string deph)
 {
     DepartmentDAO.setRepname(repno, deph);
 }
 //////****************Sreeja********************///////
 public static void setCollectionPt(string collecpt, string deph)
 {
     DepartmentDAO.setCollectionPt(collecpt, deph);
 }
 public static List <CollectionPoint> getAllCollectionPoins()
 {
     return(DepartmentDAO.getAllCollectionPoins());
 }
 public static List <Object> getAllEmployeesOfThisHead(String depH)
 {
     return(DepartmentDAO.getAllEmployeesOfThisHead(depH));
 }
 public static string GetCollectionPoint(String den)
 {
     return(DepartmentDAO.GetCollectionPoint(den));
 }