Esempio n. 1
0
        public bool SaveInstallationDetails(TUFStatus.Domain.Cloud.App.Installations installation)
        {
            try
            {
                // first delete existing ? no need because we use save or update

                Domain.Local.App.Installations newInstallation = new Domain.Local.App.Installations
                {
                    installation_id    = installation.installation_id,
                    country_code       = installation.country_code,
                    install_no         = installation.install_no,
                    description        = installation.description,
                    tufman_driver      = installation.tufman_driver,
                    tufman_server      = installation.tufman_server,
                    tufman_database    = installation.tufman_database,
                    tufman_userlogin   = installation.tufman_userlogin,
                    tufman_username    = installation.tufman_username,
                    tufman_password    = installation.tufman_password,
                    run_backup         = installation.run_backup,
                    backup_folder      = installation.backup_folder,
                    backup_copy_folder = installation.backup_copy_folder,
                    portal_driver      = installation.portal_driver,
                    portal_server      = installation.portal_server,
                    portal_database    = installation.portal_database,
                    portal_userlogin   = installation.portal_userlogin,
                    portal_username    = installation.portal_username,
                    portal_password    = installation.portal_password
                };

                var repository = new TUFStatus.DAL.Repositories.Repository <ISession, Domain.Local.App.Installations>(session);


                using (var xa = session.BeginTransaction())
                {
                    repository.Add(newInstallation);
                    xa.Commit();
                    //Assert.NotNull(fad);
                    //Assert.AreNotEqual(0, fad.Id);
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Instance.HandleError(ActionLog.ActionTypes.Application, "", "There was an error writing the local installation copy:", ex.Message);
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        public bool SetInstallationDetails(TUFStatus.Domain.Cloud.App.Installations installation)
        {
            try
            {
                if (installation != null)
                {
                    installation_id    = installation.installation_id;
                    country_code       = Program.GetDBString(installation.country_code);
                    install_no         = installation.install_no;
                    description        = Program.GetDBString(installation.description);
                    tufman_driver      = Program.GetDBString(installation.tufman_driver);
                    tufman_server      = Program.GetDBString(installation.tufman_server);
                    tufman_database    = Program.GetDBString(installation.tufman_database);
                    tufman_userlogin   = installation.tufman_userlogin;
                    tufman_username    = Program.GetDBString(installation.tufman_username);
                    tufman_password    = Program.GetDBString(installation.tufman_password);
                    run_backup         = installation.run_backup;
                    backup_folder      = Program.GetDBString(installation.backup_folder);
                    backup_copy_folder = Program.GetDBString(installation.backup_copy_folder);
                    portal_driver      = Program.GetDBString(installation.portal_driver);
                    portal_server      = Program.GetDBString(installation.portal_server);
                    portal_database    = Program.GetDBString(installation.portal_database);
                    portal_userlogin   = installation.portal_userlogin;
                    portal_username    = Program.GetDBString(installation.portal_username);
                    portal_password    = Program.GetDBString(installation.portal_password);
                    run_sync           = installation.run_sync;
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Instance.HandleError(ActionLog.ActionTypes.Application, "", "There was an error setting the installation details from the cloud:", ex.Message);
                return(false);
            }

            return(true);
        }
Esempio n. 3
0
 public bool SaveInstallationDetails(TUFStatus.Domain.Cloud.App.Installations installation)
 {
     throw new NotImplementedException();
 }