Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RecordsMapping"/> class.
        /// </summary>
        /// <param name="rdt">The RDT.</param>
        public RecordsMapping(ReferenceDataTransporter rdt)
        {
            this.rdt = rdt;

            //Strange datagridview behaviour fix
            bool tempRecordMappingAdded = false;

            if (rdt.currentProfile.RecordMappings == null)
            {
                tempRecordMappingAdded            = true;
                rdt.currentProfile.RecordMappings = new List <RecordMapping>();
                RecordMapping rd = new RecordMapping {
                    SourceRecordId = Guid.Empty, TargetRecordId = Guid.Empty
                };
                rdt.currentProfile.RecordMappings.Add(rd);
            }
            rm = rdt.currentProfile.RecordMappings;

            InitializeComponent();

            dataGridView1.AutoGenerateColumns = false;

            //Setup Entities Combobox Binding source
            List <string> entitiesList = new List <string>();

            foreach (EnvEntity ee in rdt.es.Entities)
            {
                entitiesList.Add(ee.EntityName);
            }
            BindingSource bindingSourceEntities = new BindingSource();

            bindingSourceEntities.DataSource = entitiesList;
            DataGridViewComboBoxColumn ColumnEntities = (DataGridViewComboBoxColumn)dataGridView1.Columns[0];

            ColumnEntities.DataSource = bindingSourceEntities;

            dataGridView1.DataSource = rm;

            //Cleanup temporary record mapping
            if (tempRecordMappingAdded)
            {
                rm.RemoveAt(0);
                dataGridView1.DataSource = null;
                dataGridView1.DataSource = rm;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RecordsMapping"/> class.
        /// </summary>
        /// <param name="rdt">The RDT.</param>
        public RecordsMapping(ReferenceDataTransporter rdt)
        {
            this.rdt = rdt;

            //Strange datagridview behaviour fix
            bool tempRecordMappingAdded = false;

            if (rdt.currentProfile.RecordMappings == null)
            {
                tempRecordMappingAdded = true;
                rdt.currentProfile.RecordMappings = new List<RecordMapping>();
                RecordMapping rd = new RecordMapping { SourceRecordId = Guid.Empty, TargetRecordId = Guid.Empty };
                rdt.currentProfile.RecordMappings.Add(rd);
            }
            rm = rdt.currentProfile.RecordMappings;

            InitializeComponent();

            dataGridView1.AutoGenerateColumns = false;

            //Setup Entities Combobox Binding source
            List<string> entitiesList = new List<string>();

            foreach (EnvEntity ee in rdt.es.Entities)
                entitiesList.Add(ee.EntityName);
            BindingSource bindingSourceEntities = new BindingSource();
            bindingSourceEntities.DataSource = entitiesList;
            DataGridViewComboBoxColumn ColumnEntities = (DataGridViewComboBoxColumn)dataGridView1.Columns[0];
            ColumnEntities.DataSource = bindingSourceEntities;

            dataGridView1.DataSource = rm;

            //Cleanup temporary record mapping
            if (tempRecordMappingAdded)
            {
                rm.RemoveAt(0);
                dataGridView1.DataSource = null;
                dataGridView1.DataSource = rm;
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetupIgnoredAttributes"/> class.
 /// </summary>
 /// <param name="rdt">The RDT.</param>
 /// <param name="entity">The entity.</param>
 public SetupIgnoredAttributes(ReferenceDataTransporter rdt, string entity)
 {
     this.rdt    = rdt;
     this.entity = entity;
     InitializeComponent();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Handles the Click event of the referenceDataTransporterToolStripMenuItem1 control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void referenceDataTransporterToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     ReferenceDataTransporter rdt = new ReferenceDataTransporter();
     rdt.Show();
 }
Exemplo n.º 5
0
        /// <summary>
        /// Handles the Click event of the referenceDataTransporterToolStripMenuItem1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void referenceDataTransporterToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ReferenceDataTransporter rdt = new ReferenceDataTransporter();

            rdt.Show();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SetupIgnoredAttributes"/> class.
 /// </summary>
 /// <param name="rdt">The RDT.</param>
 /// <param name="entity">The entity.</param>
 public SetupIgnoredAttributes(ReferenceDataTransporter rdt, string entity)
 {
     this.rdt = rdt;
     this.entity = entity;
     InitializeComponent();
 }