public PreguntasAddForm(Pregunta source) : base() { InitializeComponent(); _entity = source.Clone(); _entity.BeginEdit(); SetFormData(); _mf_type = ManagerFormType.MFAdd; this.Text = Resources.Labels.PREGUNTA_ADD_TITLE; }
protected override void GetFormSourceData() { _entity = Pregunta.New(); Respuesta respuesta_a = Respuesta.NewChild(_entity); respuesta_a.Opcion = "A"; _entity.Respuestas.AddItem(respuesta_a); Respuesta respuesta_b = Respuesta.NewChild(_entity); respuesta_b.Opcion = "B"; _entity.Respuestas.AddItem(respuesta_b); Respuesta respuesta_c = Respuesta.NewChild(_entity); respuesta_c.Opcion = "C"; _entity.Respuestas.AddItem(respuesta_c); _entity.BeginEdit(); }