Esempio n. 1
0
        public QuoteContract Process(GetQuoteRequest input)
        {
            _query.BuildQuery(new GetQuote
            {
                Id             = input.Id,
                OrganizationId = input.OrganizationId
            });

            using (DapperUnitOfWork.Begin())
            {
                var quotetask = _runner.Run(_query);

                var result = QuoteMapper.Map(quotetask);

                return(result);
            }
        }
Esempio n. 2
0
        public IEnumerable <ValidCredentialContract> Process(ListValidateCredentialsRequest input)
        {
            var parameter = new ListCredentials
            {
                Email    = input.Username,
                Password = input.Password
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var credentials = _runner.Run(_query);

                return(credentials.Select(CredentialMapper.Map));
            }
        }
Esempio n. 3
0
        public JobTaskContract Process(GetJobTaskByIdRequest input)
        {
            _query.BuildQuery(new GetJobTask
            {
                JobTaskId      = input.Id,
                OrganizationId = input.OrganizationId,
                JobId          = input.JobId
            });

            using (DapperUnitOfWork.Begin())
            {
                var taskDefinition = _runner.Run(_query);

                var result = JobTaskMapper.Map(taskDefinition);

                return(result);
            }
        }
        public InvoiceCostItemContract Process(GetInvoiceCostItemRequest input)
        {
            _query.BuildQuery(new GetInvoiceCostItem
            {
                Id             = input.Id,
                OrganizationId = input.OrganizationId,
                InvoiceId      = input.InvoiceId
            });

            using (DapperUnitOfWork.Begin())
            {
                var quotecostitem = _runner.Run(_query);

                var result = InvoiceCostItemMapper.Map(quotecostitem);

                return(result);
            }
        }
Esempio n. 5
0
        public TaskDefinitionContract Process(GetTaskDefinitionByIdRequest input)
        {
            var parameter = new GetTaskDefinition
            {
                OrganizationId   = input.OrganizationId,
                TaskDefinitionId = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var taskDefinition = _runner.Run(_query);

                var result = TaskDefinitionMapper.Map(taskDefinition);

                return(result);
            }
        }
Esempio n. 6
0
        public ContactContract Process(GetContactRequest input)
        {
            var parameter = new GetContact
            {
                OrganizationId = input.OrganizationId,
                Id             = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var contact = _runner.Run(_query);

                var result = ContactMapper.Map(contact);

                return(result);
            }
        }
        public CustomerContract Process(GetCustomerRequest input)
        {
            var parameter = new GetCustomer
            {
                OrganizationId = input.OrganizationId,
                CustomerId     = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var customer = _runner.Run(_query);

                var result = CustomerMapper.Map(customer);

                return(result);
            }
        }
        public JobDetailsContract Process(GetJobByIdRequest input)
        {
            var parameter = new GetJob
            {
                OrganizationId = input.OrganizationId,
                JobId          = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var job = _runner.Run(_query);

                var result = JobMapper.Map(job);

                return(result);
            }
        }
Esempio n. 9
0
        public StaffContract Process(GetStaffRequest input)
        {
            var parameter = new GetStaff
            {
                OrganizationId = input.OrganizationId,
                Id             = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var staff = _runner.Run(_query);

                var result = StaffMapper.Map(staff);

                return(result);
            }
        }
        public InvoiceContract Process(OrganizationEntityRequest input)
        {
            var parameter = new GetOrganizationEntity
            {
                OrganizationId = input.OrganizationId,
                Id             = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var invoice = _runner.Run(_query);

                var result = InvoiceMapper.Map(invoice);

                return(result);
            }
        }
        public OAuthClientContract Process(GetOAuthClientRequest input)
        {
            var parameter = new GetAuthClient
            {
                ClientId     = input.ClientId,
                ClientSecret = input.ClientSecret,
                IsInternal   = input.IsInternal
            };

            using (DapperUnitOfWork.Begin())
            {
                _query.BuildQuery(parameter);

                var client = _runner.Run(_query);

                var result = OAuthClientMapper.Map(client);

                return(result);
            }
        }
        public JobTimesheetContract Process(GetJobTimesheetRequest input)
        {
            var parameter = new GetJobTimesheet
            {
                OrganizationId = input.OrganizationId,
                Id             = input.Id,
                JobId          = input.JobId
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var jobTimesheet = _runner.Run(_query);

                var result = JobTimesheetMapper.Map(jobTimesheet);

                return(result);
            }
        }
        public CustomerAddressContract Process(GetCustomerAddressRequest input)
        {
            var parameter = new GetCustomerAddress
            {
                OrganizationId = input.OrganizationId,
                CustomerId     = input.CustomerId,
                IsDeleted      = input.IsDeleted ?? false,
                Id             = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var contact = _runner.Run(_query);

                var result = AddressMapper.Map(contact);

                return(result);
            }
        }
Esempio n. 14
0
        public JobCostItemContract Process(GetJobCostItemRequest input)
        {
            var parameter = new GetJobCostItem
            {
                OrganizationId = input.OrganizationId,

                JobId = input.JobId,

                Id = input.Id
            };

            _query.BuildQuery(parameter);

            using (DapperUnitOfWork.Begin())
            {
                var entity = _runner.Run(_query);

                var result = JobCostItemMapper.Map(entity);

                return(result);
            }
        }