Example #1
0
        private static BusinessProfile Mapper(IDataReader reader)
        {
            BusinessProfile model         = new BusinessProfile();
            int             startingIndex = 0;

            model.Id     = reader.GetSafeInt32(startingIndex++);
            model.UserId = reader.GetSafeInt32(startingIndex++);
            model.Name   = reader.GetSafeString(startingIndex++);
            model.ProjectedAnnualBusinessIncome = reader.GetSafeInt32(startingIndex++);
            model.AnnualBusinessIncome          = reader.GetSafeInt32(startingIndex++);
            model.YearsInBusiness = reader.GetSafeInt32(startingIndex++);
            model.ImageUrl        = reader.GetSafeString(startingIndex++);
            model.AddressId       = reader.GetSafeInt32(startingIndex++);
            model.DateCreated     = reader.GetSafeDateTime(startingIndex++);
            model.DateModified    = reader.GetSafeDateTime(startingIndex++);
            model.CreatedBy       = reader.GetSafeInt32(startingIndex++);
            model.ModifiedBy      = reader.GetSafeInt32(startingIndex++);
            model.BusinessTypeId  = new BusinessTypeId();
            BusinessTypeId businessTypes = new BusinessTypeId();

            model.BusinessTypeId.Id   = reader.GetSafeInt32(startingIndex++);
            model.BusinessTypeId.Name = reader.GetSafeString(startingIndex++);
            model.BusinessStageId     = new BusinessStageId();
            BusinessStageId businessStages = new BusinessStageId();

            model.BusinessStageId.Id   = reader.GetSafeInt32(startingIndex++);
            model.BusinessStageId.Name = reader.GetSafeString(startingIndex++);
            model.IndustryTypes        = new IndustryTypeId();
            IndustryTypeId industry = new IndustryTypeId();

            model.IndustryTypes.Id   = reader.GetSafeInt32(startingIndex++);
            model.IndustryTypes.Name = reader.GetSafeString(startingIndex++);

            return(model);
        }
Example #2
0
        public BusinessInfo_TypeStageIndustry GetBusinessInfo()
        {
            BusinessInfo_TypeStageIndustry dropModel = new BusinessInfo_TypeStageIndustry();

            _dataProvider.ExecuteCmd("dbo.BusinessProfiles_AdditionalInfo", inputParamMapper : delegate(SqlParameterCollection parms)
            {
            }, singleRecordMapper : delegate(IDataReader reader, short set) {
                switch (set)
                {
                case 0:

                    BusinessStageId businessStagedModel = new BusinessStageId();
                    int index = 0;
                    businessStagedModel.Id   = reader.GetSafeInt32(index++);
                    businessStagedModel.Name = reader.GetSafeString(index++);
                    if (dropModel.BusinessStageId == null)
                    {
                        dropModel.BusinessStageId = new List <BusinessStageId>();
                    }
                    if (dropModel.BusinessStageId != null)
                    {
                        BusinessStageId businessStages = new BusinessStageId();
                    }
                    dropModel.BusinessStageId.Add(businessStagedModel);
                    break;

                case 1:

                    BusinessTypeId businessTypesModel = new BusinessTypeId();
                    int btindex             = 0;
                    businessTypesModel.Id   = reader.GetSafeInt32(btindex++);
                    businessTypesModel.Name = reader.GetSafeString(btindex++);
                    if (dropModel.BusinessTypeId == null)
                    {
                        dropModel.BusinessTypeId = new List <BusinessTypeId>();
                    }
                    if (dropModel.BusinessTypeId != null)
                    {
                        BusinessTypeId businessTypes = new BusinessTypeId();
                    }
                    dropModel.BusinessTypeId.Add(businessTypesModel);
                    break;

                case 2:

                    IndustryTypeId industryTypesModel = new IndustryTypeId();
                    int itindex             = 0;
                    industryTypesModel.Id   = reader.GetSafeInt32(itindex++);
                    industryTypesModel.Name = reader.GetSafeString(itindex++);
                    if (dropModel.IndustryTypeId == null)
                    {
                        dropModel.IndustryTypeId = new List <IndustryTypeId>();
                    }
                    if (dropModel.IndustryTypeId != null)
                    {
                        IndustryTypeId industryTypes = new IndustryTypeId();
                    }
                    dropModel.IndustryTypeId.Add(industryTypesModel);
                    break;
                }
            });

            return(dropModel);
        }