Beispiel #1
0
        private DepartmentClassType ConvertDepartmentClass(int nClass)
        {
            this.departmentClass = DepartmentClassType.Unspecified;

            if ((nClass & 32) != 0)
            {
                this.departmentClass |= DepartmentClassType.LiShuHaiGuan;
            }

            if ((nClass & 64) != 0)
            {
                this.departmentClass |= DepartmentClassType.PaiZhuJiGou;
            }

            if ((nClass & 128) != 0)
            {
                this.departmentClass |= DepartmentClassType.NeiSheJiGou;
            }

            if ((nClass & 256) != 0)
            {
                this.departmentClass |= DepartmentClassType.QiTaJiGou;
            }

            return(this.departmentClass);
        }
Beispiel #2
0
 public PhantomOrganization(SchemaObjectBase obj)
     : base(obj)
 {
     this._customCode = obj.Properties.GetValue <string>("CustomCode", string.Empty);
     this._deptClass  = obj.Properties.GetValue <DepartmentClassType>("DepartmentClass", DepartmentClassType.Unspecified);
     this._deptType   = obj.Properties.GetValue <DepartmentTypeDefine>("DepartmentType", DepartmentTypeDefine.Unspecified);
     this._rank       = obj.Properties.GetValue <DepartmentRankType>("DepartmentRank", DepartmentRankType.None);
 }
Beispiel #3
0
        /// <summary>
        /// 初始化属性
        /// </summary>
        /// <param name="row"></param>
        public override void InitProperties(DataRow row)
        {
            base.InitProperties(row);

            this.rank        = ConvertDeptRankCode(Common.GetDataRowTextValue(row, "RANK_CODE"));
            this.customsCode = Common.GetDataRowTextValue(row, "CUSTOMS_CODE");

            this.departmentType  = ConvertDepartmentType(Common.GetDataRowValue(row, "ORG_TYPE", 0));
            ObjectType           = SchemaType.Organizations;
            this.departmentClass = ConvertDepartmentClass(Common.GetDataRowValue(row, "ORG_CLASS", 0));
        }
Beispiel #4
0
        public static DepartmentClassType TranslateDeptClass(string ct)
        {
            DepartmentClassType unspecified = DepartmentClassType.Unspecified;

            if (ct == "d")
            {
                unspecified |= DepartmentClassType.LiShuHaiGuan;
            }
            if (ct == "o")
            {
                unspecified |= DepartmentClassType.PaiZhuJiGou;
            }
            if (ct == "i")
            {
                unspecified |= DepartmentClassType.NeiSheJiGou;
            }
            return(unspecified);
        }