Пример #1
0
 /// <summary>
 /// This method returns all the created organizations of the given level and type.
 /// </summary>
 /// <param name="organizationLevel">This is the type of the organization level.</param>
 /// /// <param name="organizationType">This is the type of the organization type.</param>
 /// <returns>Organization List.</returns>
 public static List <Organization> GetAll(OrganizationLevelEnum organizationLevel,
                                          OrganizationTypeEnum organizationType)
 {
     return(InMemoryDatabaseSingleton.DatabaseInstance.SelectMany <Organization>(
                x => x.OrganizationType == organizationType && x.OrganizationLevel == organizationLevel && x.IsCreated).OrderByDescending(
                x => x.CreationDate).ToList());
 }
Пример #2
0
 public Organization(Guid guid, string shortName, string longName, OrganizationTypeEnum organizationType)
 {
     Guid             = guid;
     ShortName        = shortName;
     LongName         = longName;
     OrganizationType = organizationType;
 }
Пример #3
0
 public BillPointRule(
     string description,
     ContractType contractType,
     ContractKind contractKind,
     OrganizationTypeEnum organizationTypeSide1,
     OrganizationTypeEnum organizationTypeSide2,
     Sign entrySign)
 {
     Description           = description;
     ContractType          = contractType;
     ContractKind          = contractKind;
     OrganizationTypeSide1 = organizationTypeSide1;
     OrganizationTypeSide2 = organizationTypeSide2;
     EntrySign             = entrySign;
 }
Пример #4
0
        public void OrganizationType_AreaType_Valid(OrganizationTypeEnum type, AreaInformationTypeEnum areType)
        {
            // Arrange
            var validator = new OrganizationValidator
                                (new VmOpenApiOrganizationInVersionBase()
            {
                OrganizationType = type.ToString(),
                AreaType         = areType.ToString()
            },
                                codeService, organizationService, null, null, commonService, 7, true);

            // Act
            validator.Validate(controller.ModelState);

            // Assert
            controller.ModelState.IsValid.Should().BeTrue();
        }
Пример #5
0
 public Organization(int id, Guid guid, string shortName, string longName, OrganizationTypeEnum organizationType) : this
     (guid, shortName, longName, organizationType)
 {
     Id = id;
 }