コード例 #1
0
        private void btnFieldMapping_Click(object sender, RoutedEventArgs e)
        {
            string sourceDatabase = this.cbSourceDatabase.SelectedValue as string;
            string sourceTable = this.cbSourceTable.SelectedValue as string;
            ItemInfo targetSchema = this.cbTargetSchema.SelectedValue as ItemInfo;

            if (sourceDatabase == null || sourceTable == null || targetSchema == null)
                return;

            FieldMappingWindow dialog = new FieldMappingWindow();

            dialog.Host = this.txtHost.Text;

            dialog.TargetSchemaUri = targetSchema.TcmId;

            dialog.DbHost = this.txtDbHost.Text;
            dialog.DbUsername = this.txtDbUsername.Text;
            dialog.DbPassword = this.txtDbPassword.Password;

            dialog.SourceDatabase = sourceDatabase;
            dialog.SourceTable = sourceTable;

            bool res = dialog.ShowDialog() == true;
            if (res)
            {
                this.HistoryMapping = dialog.HistoryMapping;
                this.ChangeButtonsVisibility();
            }
        }
コード例 #2
0
        private void btnFieldMapping_Click(object sender, RoutedEventArgs e)
        {
            ItemInfo sourceSchema = this.cbSourceSchema.SelectedValue as ItemInfo;
            ItemInfo targetSchema = this.cbTargetSchema.SelectedValue as ItemInfo;

            if (sourceSchema == null || targetSchema == null)
                return;

            FieldMappingWindow dialog = new FieldMappingWindow();
            dialog.Host = this.txtHost.Text;
            dialog.SourceSchemaUri = sourceSchema.TcmId;
            dialog.TargetSchemaUri = targetSchema.TcmId;

            bool res = dialog.ShowDialog() == true;
            if (res)
            {
                this.HistoryMapping = dialog.HistoryMapping;
                this.ChangeButtonsVisibility();
            }
        }