Esempio n. 1
0
        public static void Update(string uuid, EntitySensitiveInformation sensitiveInformation)
        {
            string columnsAndValues = BuilderColumnsValuesSensitiveInformation
                                      .GetValuesAndColumnsToUpdate(sensitiveInformation);

            SqlCommandUpdateByUuid.Execute(tableName, uuid, columnsAndValues.ToString());
        }
Esempio n. 2
0
        internal static string GetValuesAndColumnsToUpdate(EntitySensitiveInformation sensitiveInformation)
        {
            StringBuilder columnsAndValues = new StringBuilder();

            columnsAndValues.Append($"{columnsNames["type"]}='{sensitiveInformation.type}',");
            columnsAndValues.Append($"{columnsNames["informationName"]}='{sensitiveInformation.informationName}',");
            columnsAndValues.Append($"{columnsNames["containerName"]}='{sensitiveInformation.containerName}',");
            columnsAndValues.Append($"{columnsNames["notes"]}='{sensitiveInformation.notes}',");
            columnsAndValues.Append($"{columnsNames["username"]}='{sensitiveInformation.username}',");
            columnsAndValues.Append($"{columnsNames["password"]}='{sensitiveInformation.password}',");
            columnsAndValues.Append($"{columnsNames["urlsList"]}='{sensitiveInformation.urlsList}',");
            columnsAndValues.Append($"{columnsNames["cardName"]}='{sensitiveInformation.cardName}',");
            columnsAndValues.Append($"{columnsNames["cardEntity"]}='{sensitiveInformation.cardEntity}',");
            columnsAndValues.Append($"{columnsNames["cardNumber"]}='{sensitiveInformation.cardNumber}',");
            columnsAndValues.Append($"{columnsNames["cardExpirationDate"]}='{sensitiveInformation.cardExpirationDate}',");
            columnsAndValues.Append($"{columnsNames["cardSecurityNumber"]}='{sensitiveInformation.cardSecurityNumber}',");
            columnsAndValues.Append($"{columnsNames["contactName"]}='{sensitiveInformation.contactName}',");
            columnsAndValues.Append($"{columnsNames["contactLastname"]}='{sensitiveInformation.contactLastname}',");
            columnsAndValues.Append($"{columnsNames["businessName"]}='{sensitiveInformation.businessName}',");
            columnsAndValues.Append($"{columnsNames["emailsList"]}='{sensitiveInformation.emailsList}',");
            columnsAndValues.Append($"{columnsNames["phoneNumbersList"]}='{sensitiveInformation.phoneNumbersList}',");
            columnsAndValues.Append($"{columnsNames["addressesList"]}='{sensitiveInformation.addressesList}',");
            columnsAndValues.Append($"{columnsNames["postalCode"]}='{sensitiveInformation.postalCode}',");
            columnsAndValues.Append($"{columnsNames["country"]}='{sensitiveInformation.country}',");
            columnsAndValues.Append($"{columnsNames["state"]}='{sensitiveInformation.state}',");
            columnsAndValues.Append($"{columnsNames["birthday"]}='{sensitiveInformation.birthday}',");
            columnsAndValues.Append($"{columnsNames["tagsList"]}='{sensitiveInformation.tagsList}',");
            columnsAndValues.Append($"{columnsNames["favorite"]}='{sensitiveInformation.favorite}',");
            columnsAndValues.Append($"{columnsNames["contentKey"]}='{sensitiveInformation.contentKey}'");

            return(columnsAndValues.ToString());
        }
Esempio n. 3
0
        internal static string GetValuesToCreate(EntitySensitiveInformation sensitiveInformation)
        {
            StringBuilder values = new StringBuilder();

            values.Append($"'{ sensitiveInformation.type }',");
            values.Append($"'{ sensitiveInformation.informationName }',");
            values.Append($"'{ sensitiveInformation.containerName }',");
            values.Append($"'{ sensitiveInformation.notes }',");
            values.Append($"'{ sensitiveInformation.username }',");
            values.Append($"'{ sensitiveInformation.password }',");
            values.Append($"'{ sensitiveInformation.urlsList }',");
            values.Append($"'{ sensitiveInformation.cardName }',");
            values.Append($"'{ sensitiveInformation.cardEntity }',");
            values.Append($"'{ sensitiveInformation.cardNumber }',");
            values.Append($"'{ sensitiveInformation.cardExpirationDate }',");
            values.Append($"'{ sensitiveInformation.cardSecurityNumber }',");
            values.Append($"'{ sensitiveInformation.contactName }',");
            values.Append($"'{ sensitiveInformation.contactLastname }',");
            values.Append($"'{ sensitiveInformation.businessName }',");
            values.Append($"'{ sensitiveInformation.emailsList }',");
            values.Append($"'{ sensitiveInformation.phoneNumbersList }',");
            values.Append($"'{ sensitiveInformation.addressesList }',");
            values.Append($"'{ sensitiveInformation.postalCode }',");
            values.Append($"'{ sensitiveInformation.country }',");
            values.Append($"'{ sensitiveInformation.state }',");
            values.Append($"'{ sensitiveInformation.birthday }',");
            values.Append($"'{ sensitiveInformation.tagsList }',");
            values.Append($"'{ sensitiveInformation.favorite }',");
            values.Append($"'{ sensitiveInformation.contentKey }'");

            return(values.ToString());
        }
Esempio n. 4
0
        public static void Create(EntitySensitiveInformation sensitiveInformation)
        {
            string columns = BuilderColumnsValuesSensitiveInformation
                             .GetColumnsToCreate();
            string values = BuilderColumnsValuesSensitiveInformation
                            .GetValuesToCreate(sensitiveInformation);

            SqlCommandInsert.Execute(tableName, columns.ToString(), values.ToString());
        }
Esempio n. 5
0
        public static SensitiveInformation GetModel(EntitySensitiveInformation entitySI)
        {
            SensitiveInformation modelSI = new SensitiveInformation();

            modelSI.id   = entitySI.id;
            modelSI.uuid = entitySI.uuid.ToString();
            modelSI.type = ConvertStringToEnum <EnumSIType> .Convert(entitySI.type);

            modelSI.informationName    = entitySI.informationName;
            modelSI.containerName      = entitySI.containerName;
            modelSI.notes              = entitySI.notes;
            modelSI.username           = entitySI.username;
            modelSI.password           = entitySI.password;
            modelSI.cardName           = entitySI.cardName;
            modelSI.cardEntity         = entitySI.cardEntity;
            modelSI.cardNumber         = entitySI.cardNumber;
            modelSI.cardExpirationDate = entitySI.cardExpirationDate;
            modelSI.cardSecurityNumber = entitySI.cardSecurityNumber;
            modelSI.contactName        = entitySI.contactName;
            modelSI.contactLastname    = entitySI.contactLastname;
            modelSI.businessName       = entitySI.businessName;
            modelSI.postalCode         = entitySI.postalCode;
            modelSI.country            = entitySI.country;
            modelSI.state              = entitySI.state;
            modelSI.birthday           = entitySI.birthday;
            modelSI.favorite           = entitySI.favorite;
            modelSI.contentKey         = entitySI.contentKey;
            modelSI.tagsList           = ConvertStringToList <string> .Convert(entitySI.tagsList);

            modelSI.addressesList = ConvertStringToList <string> .Convert(entitySI.addressesList);

            modelSI.phoneNumbersList = ConvertStringToList <string> .Convert(entitySI.phoneNumbersList);

            modelSI.emailsList = ConvertStringToList <string> .Convert(entitySI.emailsList);

            modelSI.urlsList = ConvertStringToList <string> .Convert(entitySI.urlsList);

            return(modelSI);
        }
Esempio n. 6
0
        public static EntitySensitiveInformation GetEntity(SensitiveInformation modelSI)
        {
            EntitySensitiveInformation entitySI = new EntitySensitiveInformation();

            entitySI.type               = modelSI.type.ToString();
            entitySI.informationName    = modelSI.informationName;
            entitySI.containerName      = modelSI.containerName;
            entitySI.notes              = modelSI.notes;
            entitySI.username           = modelSI.username;
            entitySI.password           = modelSI.password;
            entitySI.cardName           = modelSI.cardName;
            entitySI.cardEntity         = modelSI.cardEntity;
            entitySI.cardNumber         = modelSI.cardNumber;
            entitySI.cardExpirationDate = modelSI.cardExpirationDate;
            entitySI.cardSecurityNumber = modelSI.cardSecurityNumber;
            entitySI.contactName        = modelSI.contactName;
            entitySI.contactLastname    = modelSI.contactLastname;
            entitySI.businessName       = modelSI.businessName;
            entitySI.postalCode         = modelSI.postalCode;
            entitySI.country            = modelSI.country;
            entitySI.state              = modelSI.state;
            entitySI.birthday           = modelSI.birthday;
            entitySI.favorite           = modelSI.favorite;
            entitySI.contentKey         = modelSI.contentKey;
            entitySI.tagsList           = ConvertListToString <string> .Convert(modelSI.tagsList);

            entitySI.addressesList = ConvertListToString <string> .Convert(modelSI.addressesList);

            entitySI.phoneNumbersList = ConvertListToString <string> .Convert(modelSI.phoneNumbersList);

            entitySI.emailsList = ConvertListToString <string> .Convert(modelSI.emailsList);

            entitySI.urlsList = ConvertListToString <string> .Convert(modelSI.urlsList);

            return(entitySI);
        }
        public void Update(string uuid, SensitiveInformation modelSI)
        {
            EntitySensitiveInformation entitySI = MappingDomainEntityToEntity.GetEntity(modelSI);

            CrudManagerSensitiveInformation.Update(uuid, entitySI);
        }
        public void Create(SensitiveInformation modelSI)
        {
            EntitySensitiveInformation entitySI = MappingDomainEntityToEntity.GetEntity(modelSI);

            CrudManagerSensitiveInformation.Create(entitySI);
        }
        public static void Update(int id, ModelSensitiveInformation modelSI)
        {
            EntitySensitiveInformation entitySI = MappingModelToEntity.GetEntity(modelSI);

            CrudManagerSensitiveInformation.Update(id, entitySI);
        }
        public static void Create(ModelSensitiveInformation modelSI)
        {
            EntitySensitiveInformation entitySI = MappingModelToEntity.GetEntity(modelSI);

            CrudManagerSensitiveInformation.Create(entitySI);
        }