Ejemplo n.º 1
0
        protected override EmployeeEntity Load(IDataReader reader)
        {
            EmployeeEntity entity = null;

            if (reader != null && reader.IsClosed == false)
            {
                BusinessUser businessUser = BusinessUserCommonDAL <TTransaction, TConnection, TCommand, TDataReader, TParameter> .Load((TDataReader)reader);

                entity = Converter.InheritedEntityConvert <BusinessUser, EmployeeEntity>(businessUser);

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "EmployeeID"))
                {
                    entity.EmployeeID = reader.GetInt32(reader.GetOrdinal("EmployeeID"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "UserGuid"))
                {
                    entity.UserGuid = reader.GetGuid(reader.GetOrdinal("UserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "Foo"))
                {
                    entity.Foo = reader.GetString(reader.GetOrdinal("Foo"));
                }
            }

            return(entity);
        }
Ejemplo n.º 2
0
        protected override LaborEntity Load(IDataReader reader)
        {
            LaborEntity entity = null;

            if (reader != null && reader.IsClosed == false)
            {
                BusinessUser businessUser = BusinessUserCommonDAL <TTransaction, TConnection, TCommand, TDataReader, TParameter> .Load((TDataReader)reader);

                entity = Converter.InheritedEntityConvert <BusinessUser, LaborEntity>(businessUser);

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "LaborID"))
                {
                    entity.LaborID = reader.GetInt32(reader.GetOrdinal("LaborID"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "UserGuid"))
                {
                    entity.UserGuid = reader.GetGuid(reader.GetOrdinal("UserGuid"));
                }

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "LaborCode"))
                {
                    entity.LaborCode = reader.GetString(reader.GetOrdinal("LaborCode"));
                }

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "NativePlace"))
                {
                    entity.NativePlace = reader.GetString(reader.GetOrdinal("NativePlace"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentPlace"))
                {
                    entity.CurrentPlace = reader.GetString(reader.GetOrdinal("CurrentPlace"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "IDCardPlace"))
                {
                    entity.IDCardPlace = reader.GetString(reader.GetOrdinal("IDCardPlace"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "HouseHoldType"))
                {
                    entity.HouseHoldType = (HouseHoldTypes)reader.GetInt32(reader.GetOrdinal("HouseHoldType"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "WorkSkill"))
                {
                    entity.WorkSkill = reader.GetString(reader.GetOrdinal("WorkSkill"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "WorkSkillPaper"))
                {
                    entity.WorkSkillPaper = reader.GetString(reader.GetOrdinal("WorkSkillPaper"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "WorkSituation"))
                {
                    entity.WorkSituation = reader.GetString(reader.GetOrdinal("WorkSituation"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "PreWorkSituation"))
                {
                    entity.PreWorkSituation = reader.GetString(reader.GetOrdinal("PreWorkSituation"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "HopeWorkSituation"))
                {
                    entity.HopeWorkSituation = reader.GetString(reader.GetOrdinal("HopeWorkSituation"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "HopeWorkSalary"))
                {
                    entity.HopeWorkSalary = reader.GetString(reader.GetOrdinal("HopeWorkSalary"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "UrgentLinkMan"))
                {
                    entity.UrgentLinkMan = reader.GetString(reader.GetOrdinal("UrgentLinkMan"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "UrgentTelephone"))
                {
                    entity.UrgentTelephone = reader.GetString(reader.GetOrdinal("UrgentTelephone"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "UrgentRelationship"))
                {
                    entity.UrgentRelationship = reader.GetString(reader.GetOrdinal("UrgentRelationship"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "InformationComeFrom"))
                {
                    entity.InformationComeFrom = reader.GetString(reader.GetOrdinal("InformationComeFrom"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "ProviderUserGuid"))
                {
                    entity.ProviderUserGuid = reader.GetGuid(reader.GetOrdinal("ProviderUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "ProviderUserName"))
                {
                    entity.ProviderUserName = reader.GetString(reader.GetOrdinal("ProviderUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "RecommendUserGuid"))
                {
                    entity.RecommendUserGuid = reader.GetGuid(reader.GetOrdinal("RecommendUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "RecommendUserName"))
                {
                    entity.RecommendUserName = reader.GetString(reader.GetOrdinal("RecommendUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "ServiceUserGuid"))
                {
                    entity.ServiceUserGuid = reader.GetGuid(reader.GetOrdinal("ServiceUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "ServiceUserName"))
                {
                    entity.ServiceUserName = reader.GetString(reader.GetOrdinal("ServiceUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "FinanceUserGuid"))
                {
                    entity.FinanceUserGuid = reader.GetGuid(reader.GetOrdinal("FinanceUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "FinanceUserName"))
                {
                    entity.FinanceUserName = reader.GetString(reader.GetOrdinal("FinanceUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "BusinessUserGuid"))
                {
                    entity.BusinessUserGuid = reader.GetGuid(reader.GetOrdinal("BusinessUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "BusinessUserName"))
                {
                    entity.BusinessUserName = reader.GetString(reader.GetOrdinal("BusinessUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "SettleUserGuid"))
                {
                    entity.SettleUserGuid = reader.GetGuid(reader.GetOrdinal("SettleUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "SettleUserName"))
                {
                    entity.SettleUserName = reader.GetString(reader.GetOrdinal("SettleUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "InformationBrokerUserGuid"))
                {
                    entity.InformationBrokerUserGuid = reader.GetGuid(reader.GetOrdinal("InformationBrokerUserGuid"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "InformationBrokerUserName"))
                {
                    entity.InformationBrokerUserName = reader.GetString(reader.GetOrdinal("InformationBrokerUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "InsureType"))
                {
                    entity.InsureType = reader.GetInt32(reader.GetOrdinal("InsureType"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "LaborWorkStatus"))
                {
                    entity.LaborWorkStatus = (LaborWorkStatuses)reader.GetInt32(reader.GetOrdinal("LaborWorkStatus"));
                }

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentLaborDepartment"))
                {
                    entity.CurrentLaborDepartment = reader.GetString(reader.GetOrdinal("CurrentLaborDepartment"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentLaborWorkShop"))
                {
                    entity.CurrentLaborWorkShop = reader.GetString(reader.GetOrdinal("CurrentLaborWorkShop"));
                }

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentContractStartDate"))
                {
                    entity.CurrentContractStartDate = reader.GetDateTime(reader.GetOrdinal("CurrentContractStartDate"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentContractStopDate"))
                {
                    entity.CurrentContractStopDate = reader.GetDateTime(reader.GetOrdinal("CurrentContractStopDate"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentContractDesc"))
                {
                    entity.CurrentContractDesc = reader.GetString(reader.GetOrdinal("CurrentContractDesc"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentContractDiscontinueDate"))
                {
                    entity.CurrentContractDiscontinueDate = reader.GetDateTime(reader.GetOrdinal("CurrentContractDiscontinueDate"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentContractDiscontinueDesc"))
                {
                    entity.CurrentContractDiscontinueDesc = reader.GetString(reader.GetOrdinal("CurrentContractDiscontinueDesc"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentEnterpriseKey"))
                {
                    entity.CurrentEnterpriseKey = reader.GetString(reader.GetOrdinal("CurrentEnterpriseKey"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentEnterpriseName"))
                {
                    entity.CurrentEnterpriseName = reader.GetString(reader.GetOrdinal("CurrentEnterpriseName"));
                }

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentContractKey"))
                {
                    entity.CurrentContractKey = reader.GetString(reader.GetOrdinal("CurrentContractKey"));
                }

                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "Memo1"))
                {
                    entity.Memo1 = reader.GetString(reader.GetOrdinal("Memo1"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "Memo2"))
                {
                    entity.Memo2 = reader.GetString(reader.GetOrdinal("Memo2"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "Memo3"))
                {
                    entity.Memo3 = reader.GetString(reader.GetOrdinal("Memo3"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "Memo4"))
                {
                    entity.Memo4 = reader.GetString(reader.GetOrdinal("Memo4"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "Memo5"))
                {
                    entity.Memo5 = reader.GetString(reader.GetOrdinal("Memo5"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CreateUserKey"))
                {
                    entity.CreateUserKey = reader.GetString(reader.GetOrdinal("CreateUserKey"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CreateUserName"))
                {
                    entity.CreateUserName = reader.GetString(reader.GetOrdinal("CreateUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CreateDate"))
                {
                    entity.CreateDate = reader.GetDateTime(reader.GetOrdinal("CreateDate"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "LastUpdateUserKey"))
                {
                    entity.LastUpdateUserKey = reader.GetString(reader.GetOrdinal("LastUpdateUserKey"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "LastUpdateUserName"))
                {
                    entity.LastUpdateUserName = reader.GetString(reader.GetOrdinal("LastUpdateUserName"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "LastUpdateDate"))
                {
                    entity.LastUpdateDate = reader.GetDateTime(reader.GetOrdinal("LastUpdateDate"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "IsProtectedByOwner"))
                {
                    entity.IsProtectedByOwner = (Logics)reader.GetInt32(reader.GetOrdinal("IsProtectedByOwner"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "CurrentDispatchType"))
                {
                    entity.CurrentDispatchType = (DispatchTypes)reader.GetInt32(reader.GetOrdinal("CurrentDispatchType"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "ComeFromType"))
                {
                    entity.ComeFromType = (ComeFromTypes)reader.GetInt32(reader.GetOrdinal("ComeFromType"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "PropertyNames"))
                {
                    entity.PropertyNames = reader.GetString(reader.GetOrdinal("PropertyNames"));
                }
                if (DataReaderHelper.IsExistFieldAndNotNull(reader, "PropertyValues"))
                {
                    entity.PropertyValues = reader.GetString(reader.GetOrdinal("PropertyValues"));
                }
            }

            return(entity);
        }