public AddSocialExchange(CommeillFautAsset asset, SocialExchangeDTO dto) { InitializeComponent(); this.dto = dto; this.asset = asset; //Validators EditorTools.AllowOnlyGroundedLiteral(nameTextBox); EditorTools.AllowOnlyVariable(wfNameTarget); nameTextBox.Value = dto.Name; textBoxDescription.Text = dto.Description; wfNameTarget.Value = dto.Target; if (dto.Steps.Count > 0) { foreach (var s in dto.Steps) { stepsTextBox.Text += s.ToString() + ", "; } stepsTextBox.Text = stepsTextBox.Text.ToString().Remove(stepsTextBox.Text.Length - 2); } buttonAdd.Text = (dto.Id == Guid.Empty) ? "Add" : "Update"; }
public AddSocialExchange(CommeillFautAsset asset, SocialExchangeDTO dto) { InitializeComponent(); this.dto = dto; this.asset = asset; //Validators EditorTools.AllowOnlyGroundedLiteral(nameTextBox); EditorTools.AllowOnlyVariable(wfNameTarget); nameTextBox.Value = dto.Name; textBoxDescription.Text = dto.Description; wfNameTarget.Value = dto.Target; stepsTextBox.Text = dto.Steps; buttonAdd.Text = (dto.Id == Guid.Empty) ? "Add" : "Update"; }