コード例 #1
0
 /// <summary>
 /// 从数据行读取
 /// </summary>
 /// <param name="dr">数据行</param>
 protected override BaseEntity GetFrom(IDataRow dr)
 {
     Id             = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldId]);
     UserFrom       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldUserFrom]);
     Code           = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCode]);
     UserName       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldUserName]);
     NickName       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldNickName]);
     RealName       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldRealName]);
     QuickQuery     = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldQuickQuery]);
     SimpleSpelling = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldSimpleSpelling]);
     SecurityLevel  = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldSecurityLevel]);
     WorkCategory   = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldWorkCategory]);
     CompanyId      = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCompanyId]);
     // 2015-12-29 吉日嘎拉 防止程序出错,没有这个字段也可以正常运行
     if (dr.ContainsColumn(BaseUserEntity.FieldCompanyCode))
     {
         CompanyCode = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCompanyCode]);
     }
     CompanyName       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCompanyName]);
     SubCompanyId      = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldSubCompanyId]);
     SubCompanyName    = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldSubCompanyName]);
     DepartmentId      = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldDepartmentId]);
     DepartmentName    = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldDepartmentName]);
     SubDepartmentId   = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldSubDepartmentId]);
     SubDepartmentName = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldSubDepartmentName]);
     WorkgroupId       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldWorkgroupId]);
     WorkgroupName     = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldWorkgroupName]);
     IDCard            = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldIDCard]);
     Gender            = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldGender]);
     Birthday          = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldBirthday]);
     Duty               = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldDuty]);
     Title              = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldTitle]);
     Province           = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldProvince]);
     City               = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCity]);
     District           = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldDistrict]);
     HomeAddress        = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldHomeAddress]);
     Score              = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldScore]);
     IsAdministrator    = BaseBusinessLogic.ConvertToBoolean(dr[BaseUserEntity.FieldIsAdministrator]);
     Lang               = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldLang]);
     Theme              = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldTheme]);
     Signature          = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldSignature]);
     IsStaff            = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldIsStaff]);
     IsCheckBalance     = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldIsCheckBalance]);
     AuditStatus        = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldAuditStatus]);
     ManagerId          = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldManagerId]);
     ManagerAuditStatus = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldManagerAuditStatus]);
     ManagerAuditDate   = BaseBusinessLogic.ConvertToNullableDateTime(dr[BaseUserEntity.FieldManagerAuditDate]);
     IsVisible          = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldIsVisible]);
     DeletionStateCode  = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldDeletionStateCode]);
     Enabled            = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldEnabled]);
     SortCode           = BaseBusinessLogic.ConvertToInt(dr[BaseUserEntity.FieldSortCode]);
     Description        = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldDescription]);
     CreateOn           = BaseBusinessLogic.ConvertToNullableDateTime(dr[BaseUserEntity.FieldCreateOn]);
     CreateUserId       = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCreateUserId]);
     CreateBy           = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldCreateBy]);
     ModifiedOn         = BaseBusinessLogic.ConvertToNullableDateTime(dr[BaseUserEntity.FieldModifiedOn]);
     ModifiedUserId     = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldModifiedUserId]);
     ModifiedBy         = BaseBusinessLogic.ConvertToString(dr[BaseUserEntity.FieldModifiedBy]);
     // 获取扩展属性
     GetFromExpand(dr);
     return(this);
 }