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); }
/// <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)); }
private static DepartmentRankType ConvertDeptRankCode(string strRCode) { DepartmentRankType innerRank = DepartmentRankType.YiBanBuMen; switch (strRCode.ToUpper()) { case "POS_MINISTRY_D": innerRank = DepartmentRankType.ZhengBuJi; break; case "SUB_MINISTRY_D": innerRank = DepartmentRankType.FuBuJi; break; case "POS_OFFICE_D": innerRank = DepartmentRankType.ZhengJuJi; break; case "SUB_OFFICE_D": innerRank = DepartmentRankType.FuJuJi; break; case "POS_ORGAN_D": innerRank = DepartmentRankType.ZhengChuJi; break; case "SUB_ORGAN_D": innerRank = DepartmentRankType.FuChuJi; break; case "POS_DEPART_D": innerRank = DepartmentRankType.ZhengKeJi; break; case "SUB_DEPART_D": innerRank = DepartmentRankType.FuKeji; break; case "COMMON_D": innerRank = DepartmentRankType.YiBanBuMen; break; case "SUSCEPTIVITY_D": innerRank = DepartmentRankType.MinGanJiBie; break; } return(innerRank); }