Ejemplo n.º 1
0
        private static ENUM_POLICE_TYPE ConvertOfficerType(ENUM_PAGE_TYPE page_type_)
        {
            ENUM_POLICE_TYPE ret = ENUM_POLICE_TYPE.E_INVALID;

            switch (page_type_)
            {
            case ENUM_PAGE_TYPE.E_SPECIAL_POLICE:
                ret = ENUM_POLICE_TYPE.E_SPECIAL_POLICE;
                break;

            case ENUM_PAGE_TYPE.E_PATROL_MEN:
                ret = ENUM_POLICE_TYPE.E_PATROL_MEN;
                break;

            case ENUM_PAGE_TYPE.E_INSPECTOR:
                ret = ENUM_POLICE_TYPE.E_INSPECTOR;
                break;

            case ENUM_PAGE_TYPE.E_BAU:
                ret = ENUM_POLICE_TYPE.E_BAU;
                break;

            case ENUM_PAGE_TYPE.E_CSI:
                ret = ENUM_POLICE_TYPE.E_CSI;
                break;

            case ENUM_PAGE_TYPE.E_FORENSIC:
                ret = ENUM_POLICE_TYPE.E_FORENSIC;
                break;
            }

            return(ret);
        }
Ejemplo n.º 2
0
        public static List <UIOfficerInfo> GetOfficerByPoliceType(ENUM_POLICE_TYPE type_)
        {
            List <ConfOfficer> ori_data;

            ori_data = ConfOfficer.array.FindAll((o) => { return(o.profession == (int)type_); });

            List <UIOfficerInfo> ret = TransformConf2UI(ori_data);

            return(ret);
        }
Ejemplo n.º 3
0
        public static List <UIOfficerInfo> GetOfficerByPageType(ENUM_PAGE_TYPE type_)
        {
            if (ENUM_PAGE_TYPE.E_ALL == type_)
            {
                return(GetAllOfficers());
            }
            else
            {
                ENUM_POLICE_TYPE pt = ConvertOfficerType(type_);

                if (ENUM_POLICE_TYPE.E_INVALID == pt)
                {
                    return(null);
                }

                return(GetOfficerByPoliceType(pt));
            }
        }