Esempio n. 1
0
        public static UserRankType ConvertUserRankCode(string strRCode)
        {
            UserRankType type = UserRankType.COMMON_U;

            switch (strRCode.ToUpper())
            {
            case "90":
                return(UserRankType.POS_MINISTRY_U);

            case "80":
                return(UserRankType.SUB_MINISTRY_U);

            case "70":
                return(UserRankType.POS_OFFICE_U);

            case "60":
                return(UserRankType.SUB_OFFICE_U);

            case "50":
                return(UserRankType.POS_ORGAN_U);

            case "40":
                return(UserRankType.SUB_ORGAN_U);

            case "30":
                return(UserRankType.POS_DEPART_U);

            case "20":
                return(UserRankType.SUB_DEPART_U);

            case "10":
                return(UserRankType.COMMON_U);
            }
            return(type);
        }
Esempio n. 2
0
        private static string ConvertUserRankCodeToString(UserRankType rankType)
        {
            string result = "COMMON_U";

            UserRankMapping.TryGetValue(rankType, out result);

            return(result);
        }
Esempio n. 3
0
 public PhantomUser(SchemaObjectBase obj)
     : base(obj)
 {
     this._attributes = obj.Properties.GetValue("CadreType", UserAttributesType.Unspecified);
     this._email      = obj.Properties.GetValue <string>("Mail", string.Empty);
     this._logOnName  = obj.Properties.GetValue <string>("CodeName", string.Empty);
     this._occupation = obj.Properties.GetValue("Occupation", string.Empty);
     this._userRank   = obj.Properties.GetValue <UserRankType>("UserRank", UserRankType.Unspecified);
 }
Esempio n. 4
0
        public static UserRankType ConvertUserRankCode(string strRCode)
        {
            UserRankType rank = UserRankType.YiBanRenYuan;

            switch (strRCode.ToUpper())
            {
            case "POS_MINISTRY_U":
                rank = UserRankType.ZhengBuJi;
                break;

            case "SUB_MINISTRY_U":
                rank = UserRankType.FuBuJi;
                break;

            case "POS_OFFICE_U":
                rank = UserRankType.ZhengJuJi;
                break;

            case "SUB_OFFICE_U":
                rank = UserRankType.FuJuJi;
                break;

            case "POS_ORGAN_U":
                rank = UserRankType.ZhengChuJi;
                break;

            case "SUB_ORGAN_U":
                rank = UserRankType.FuChuJi;
                break;

            case "POS_DEPART_U":
                rank = UserRankType.ZhengKeJi;
                break;

            case "SUB_DEPART_U":
                rank = UserRankType.FuKeji;
                break;

            case "COMMON_U":
                rank = UserRankType.YiBanRenYuan;
                break;

            case "NAVVY_U":
                rank = UserRankType.GongRen;
                break;

            case "SUSCEPTIVITY_U":
                rank = UserRankType.MinGanJiBie;
                break;
            }

            return(rank);
        }
Esempio n. 5
0
        /// <summary>
        /// 初始化属性
        /// </summary>
        /// <param name="row"></param>
        public override void InitProperties(DataRow row)
        {
            base.InitProperties(row);

            this.logOnName  = Common.GetDataRowTextValue(row, "LOGON_NAME");
            this.email      = Common.GetDataRowTextValue(row, "E_MAIL");
            this.occupation = Common.GetDataRowTextValue(row, "RANK_NAME");

            this.rank = Common.ConvertUserRankCode(Common.GetDataRowTextValue(row, "RANK_CODE"));

            ObjectType      = SchemaType.Users;
            this.attributes = Common.ConvertUserAttribute(Common.GetDataRowValue(row, "ATTRIBUTES", 0));

            this.isSideline = Common.GetDataRowValue(row, "SIDELINE", 0) == 1;
        }
		private static string ConvertUserRankCodeToString(UserRankType rankType)
		{
			string result = "COMMON_U";

			UserRankMapping.TryGetValue(rankType, out result);

			return result;
		}
Esempio n. 7
0
        /// <summary>
        /// 初始化属性
        /// </summary>
        /// <param name="row"></param>
        public override void InitProperties(DataRow row)
        {
            base.InitProperties(row);

            this.accessLevel = Common.ConvertUserRankCode(Common.GetDataRowTextValue(row, "ACCESS_LEVEL"));
        }
Esempio n. 8
0
		/// <summary>
		/// 初始化属性
		/// </summary>
		/// <param name="row"></param>
		public override void InitProperties(DataRow row)
		{
			base.InitProperties(row);

			this.logOnName = Common.GetDataRowTextValue(row, "LOGON_NAME");
			this.email = Common.GetDataRowTextValue(row, "E_MAIL");
			this.occupation = Common.GetDataRowTextValue(row, "RANK_NAME");

			this.rank = Common.ConvertUserRankCode(Common.GetDataRowTextValue(row, "RANK_CODE"));

			ObjectType = SchemaType.Users;
			this.attributes = Common.ConvertUserAttribute(Common.GetDataRowValue(row, "ATTRIBUTES", 0));

			this.isSideline = Common.GetDataRowValue(row, "SIDELINE", 0) == 1;
		}