示例#1
0
 internal CustomerOrganisationHistoryEntry(CustomerOrganisation customer)
 {
     Name                       = customer.Name;
     PriceListType              = customer.PriceListType;
     EmailDomain                = customer.EmailDomain;
     OrganisationPrefix         = customer.OrganisationPrefix;
     OrganisationNumber         = customer.OrganisationNumber;
     PeppolId                   = customer.PeppolId;
     TravelCostAgreementType    = customer.TravelCostAgreementType;
     UseOrderAgreementsFromDate = customer.UseOrderAgreementsFromDate;
 }
示例#2
0
 public Order(AspNetUser createdByUser, AspNetUser createdByImpersonator, CustomerOrganisation customerOrganisation, DateTimeOffset createdAt)
 {
     CreatedByUser          = createdByUser;
     CreatedAt              = createdAt;
     CustomerOrganisation   = customerOrganisation ?? throw new ArgumentNullException(nameof(customerOrganisation));
     CustomerOrganisationId = customerOrganisation.CustomerOrganisationId;
     CreatedByImpersonator  = createdByImpersonator;
     Status                 = OrderStatus.Requested;
     Requirements           = new List <OrderRequirement>();
     InterpreterLocations   = new List <OrderInterpreterLocation>();
     PriceRows              = new List <OrderPriceRow>();
     Requests               = new List <Request>();
     CompetenceRequirements = new List <OrderCompetenceRequirement>();
 }
示例#3
0
 public OrderGroup(AspNetUser createdByUser, AspNetUser createdByImpersonator, CustomerOrganisation customerOrganisation, DateTimeOffset createdAt, IEnumerable <Order> orders, bool requireSameInterpreter = true)
 {
     NullCheckHelper.ArgumentCheckNull(customerOrganisation, nameof(OrderGroup), nameof(OrderGroup));
     //Verify that all orders have the same customer, region and language
     Validate.Ensure(orders.GroupBy(o => o.CustomerOrganisationId).Count() == 1, "A group cannot have orders connected to several customers.");
     Validate.Ensure(orders.GroupBy(o => o.LanguageId).Count() == 1, "A group cannot have orders connected to several languages.");
     Validate.Ensure(orders.GroupBy(o => o.RegionId).Count() == 1, "A group cannot have orders connected to several regions.");
     Orders = orders.ToList();
     CustomerOrganisation   = customerOrganisation;
     CustomerOrganisationId = customerOrganisation.CustomerOrganisationId;
     CreatedAt              = createdAt;
     CreatedByUser          = createdByUser;
     CreatedByImpersonator  = createdByImpersonator;
     RequestGroups          = new List <RequestGroup>();
     RequireSameInterpreter = requireSameInterpreter;
     Status                 = OrderStatus.Requested;
     Requirements           = new List <OrderGroupRequirement>();
     InterpreterLocations   = new List <OrderGroupInterpreterLocation>();
     CompetenceRequirements = new List <OrderGroupCompetenceRequirement>();
 }
示例#4
0
 public AspNetUser(string email, string userName, string firstName, string lastName, CustomerOrganisation customer)
     : this(email, userName, firstName, lastName)
 {
     CustomerOrganisation   = customer;
     CustomerOrganisationId = customer?.CustomerOrganisationId;
 }
示例#5
0
        public AspNetUser(int id, string email, string userName, string firstName, string lastName, CustomerOrganisation customer)
            : this(email, userName, firstName, lastName, customer)

        {
            Id = id;
        }