Ejemplo n.º 1
0
        public EditConfigsViewModel EditConfigs(ProjectWindowViewModel project)
        {
            if (project.IsExistingProject)
                return EditConfigs(project.ConfigFilePath);

            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
            builder.DataSource = project.SqlConnection.Server;
            builder.InitialCatalog = project.SqlConnection.Database;
            builder.IntegratedSecurity = !project.SqlConnection.IsSqlServerSecurity;
            if (project.SqlConnection.IsSqlServerSecurity)
            {
                builder.UserID = project.SqlConnection.Username;
                builder.Password = project.SqlConnection.Password;
            }

            EditConfigsViewModel result = CreateConfig();
            result.Configs[0].ConnectionString = builder.ConnectionString;
            return result;
        }
Ejemplo n.º 2
0
 public ProjectWindow()
 {
     InitializeComponent();
     Model = new ProjectWindowViewModel();
 }