private void fieldMapping_SourceFieldChanged(object sender, Objects.FieldMappingEventArgs e) { //Remove the current field from the master collection, add the old field back to the master collection FieldMapping currentFieldMappingControl = (FieldMapping)sender; FieldMapperWrapper.ProcessSourceFieldChange(currentFieldMappingControl, flowLayoutPanel1.Controls, e); }
private void fieldMapping_SourceFieldChanged(object sender, Objects.FieldMappingEventArgs e) { //Remove the current field from the master collection, add the old field back to the master collection FieldMapping currentFieldMappingControl = (FieldMapping)sender; FieldMapperWrapper.ProcessSourceFieldChange(currentFieldMappingControl, flowLayoutPanel1.Controls, e); //try //{ // foreach (Control c in flowLayoutPanel1.Controls) // { // if (c.GetType() == typeof(FieldMapping)) // { // FieldMapping fm = (FieldMapping) c; // if (fm != currentFieldMappingControl) // //Add or remove the field that was changed and update relevant DestinationFields/SourceFields collection and combo // switch (e.ChangeType) // { // case FieldMappingEventArgs.ChangeTypes.Added: // fm.RemoveBCMField(e.BCMField); // break; // case FieldMappingEventArgs.ChangeTypes.Removed: // fm.AddBCMField(e.BCMField); // break; // } // } // } //} //catch (System.Exception ex) //{ // //MessageBox.Show("Error in BCM_Migration_Tool.Controls.Accounts.fieldMapping_SourceFieldChanged()", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); //} }