Example #1
0
        protected virtual TypeSetBatch GetTypesetBatchResultsFromReader(IDataReader reader)
        {
            EntityConverter <TypeSetBatch> typesetBatchEntity = new EntityConverter <TypeSetBatch>();
            EntityConverter <Batch>        batchEntity        = new EntityConverter <Batch>();
            TypeSetBatch typesetBatch = new TypeSetBatch();

            if (reader.Read())
            {
                typesetBatch       = typesetBatchEntity.Convert(reader);
                typesetBatch.Batch = batchEntity.Convert(reader);
            }
            return(typesetBatch);
        }
Example #2
0
        protected virtual TranslationBatch GetTranslationBatchResultsFromReader(IDataReader reader)
        {
            EntityConverter <TranslationBatch> translationBatchEntity = new EntityConverter <TranslationBatch>();
            EntityConverter <Batch>            batchEntity            = new EntityConverter <Batch>();
            TranslationBatch translationBatch = new TranslationBatch();

            if (reader.Read())
            {
                translationBatch       = translationBatchEntity.Convert(reader);
                translationBatch.Batch = batchEntity.Convert(reader);
            }
            return(translationBatch);
        }
Example #3
0
        protected virtual PrintBatch GetPrintBatchFromReader(IDataReader reader)
        {
            EntityConverter <PrintBatch> printBatchEntity = new EntityConverter <PrintBatch>();
            EntityConverter <Batch>      batchEntity      = new EntityConverter <Batch>();
            PrintBatch printBatch = new PrintBatch();

            if (reader.Read())
            {
                printBatch       = printBatchEntity.Convert(reader);
                printBatch.Batch = batchEntity.Convert(reader);
            }
            return(printBatch);
        }
Example #4
0
        protected virtual MediaBatch GetMediaBatchFromReader(IDataReader dataReader)
        {
            EntityConverter <MediaBatch> mediaEntity = new EntityConverter <MediaBatch>();
            EntityConverter <Batch>      batchEntity = new EntityConverter <Batch>();
            MediaBatch mediaBatch = new MediaBatch();

            if (dataReader.Read())
            {
                mediaBatch = mediaEntity.Convert(dataReader);
            }
            mediaBatch.batch = batchEntity.Convert(dataReader);
            return(mediaBatch);
        }
Example #5
0
        protected virtual ProjectInvoiceStatus GetProjectInvoiceStatusFromReader(IDataReader reader)
        {
            EntityConverter <ProjectInvoiceStatus> projectInvoiceStatusEntity = new EntityConverter <ProjectInvoiceStatus>();
            EntityConverter <InvoiceType>          invoiceTypeEntity          = new EntityConverter <InvoiceType>();
            EntityConverter <CodeMaster>           codemasterEntity           = new EntityConverter <CodeMaster>();

            ProjectInvoiceStatus projectInvoiceStatus = projectInvoiceStatusEntity.Convert(reader);
            InvoiceType          invoiceType          = new InvoiceType();
            CodeMaster           codemaster           = new CodeMaster();

            codemaster  = codemasterEntity.Convert(reader);
            invoiceType = invoiceTypeEntity.Convert(reader);
            projectInvoiceStatus.InvoiceType1 = invoiceType;
            projectInvoiceStatus.codeMaster   = codemaster;

            return(projectInvoiceStatus);
        }
Example #6
0
        protected virtual Contacts GetContactDetailsByEmailFromReader(IDataReader reader)
        {
            EntityConverter <Contacts> cont = new EntityConverter <Contacts>();

            Contacts contact = new Contacts();

            if (reader.Read())
            {
                contact = cont.Convert(reader);
            }

            if (reader.NextResult())
            {
                while (reader.Read())
                {
                    contact.Add_New_Contacts_List.Add(contact);
                }
            }
            return(contact);
        }
Example #7
0
        protected virtual HospitalityBatch GetHospitalityBatchFromReader(IDataReader reader)
        {
            EntityConverter <HospitalityBatch> hospitalityBatchEntity = new EntityConverter <HospitalityBatch>();
            EntityConverter <Batch>            batchEntity            = new EntityConverter <Batch>();

            EntityConverter <HospitalityConferenceRoomUsage> conferenceUsage           = new EntityConverter <HospitalityConferenceRoomUsage>();
            EntityConverter <HospitalityNoOfMealsUsage>      hospitalityNoOfMealsUsage = new EntityConverter <HospitalityNoOfMealsUsage>();

            HospitalityBatch hospitalityBatch = new HospitalityBatch();
            List <HospitalityConferenceRoomUsage> hospitalityConferenceRoomUsagelist = new List <HospitalityConferenceRoomUsage>();
            List <HospitalityNoOfMealsUsage>      hospitalityNoOfMealsUsageList      = new List <HospitalityNoOfMealsUsage>();

            if (reader.Read())
            {
                hospitalityBatch       = hospitalityBatchEntity.Convert(reader);
                hospitalityBatch.Batch = batchEntity.Convert(reader);
                // hospitalityBatch.conferenceRoomDetailsList.Add(conferenceUsage.Convert(reader));
                //hospitalityBatch.hospitalityNoOfMealsUsageList.Add(hospitalityNoOfMealsUsage.Convert(reader));
            }

            if (reader.NextResult())
            {
                while (reader.Read())
                {
                    hospitalityConferenceRoomUsagelist.Add(conferenceUsage.Convert(reader));
                }
            }

            if (reader.NextResult())
            {
                while (reader.Read())
                {
                    hospitalityNoOfMealsUsageList.Add(hospitalityNoOfMealsUsage.Convert(reader));
                }
            }

            hospitalityBatch.hospitalityNoOfMealsUsageList = hospitalityNoOfMealsUsageList;
            hospitalityBatch.conferenceRoomDetailsList     = hospitalityConferenceRoomUsagelist;

            return(hospitalityBatch);
        }
Example #8
0
        protected virtual VM_UserDetails GetUserDetailsByUserIdFromReader(IDataReader reader)
        {
            EntityConverter <VM_UserDetails> usr             = new EntityConverter <VM_UserDetails>();
            EntityConverter <UserRole>       userRolesEntity = new EntityConverter <UserRole>();
            VM_UserDetails user      = new VM_UserDetails();
            UserRole       userRoles = new UserRole();

            if (reader.Read())
            {
                user = usr.Convert(reader);
            }

            if (reader.NextResult())
            {
                while (reader.Read())
                {
                    userRoles = userRolesEntity.Convert(reader);
                    user.Roles.Add(userRoles);
                }
            }
            return(user);
        }