Example #1
0
 /// <summary>
 /// Abre el formulario para editar item
 /// <returns>void</returns>
 /// </summary>
 public override void OpenEditForm()
 {
     try
     {
         InstructorEditForm form = new InstructorEditForm(ActiveOID);
         if (form.EntityInfo != null)
         {
             AddForm(form);
             _entity = form.Entity;
         }
     }
     catch (Csla.DataPortalException ex)
     {
         MessageBox.Show(ex.BusinessException.ToString(),
                         moleQule.Face.Resources.Labels.ERROR_TITLE,
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Exclamation);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString(),
                         moleQule.Face.Resources.Labels.ERROR_TITLE,
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Exclamation);
     }
 }
        protected override void ModificarInstructoresAction()
        {
            try
            {
                InstructorSelectForm form = new InstructorSelectForm(this);
                form.ShowDialog();

                if (form.ActionResult == DialogResult.OK)
                {
                    InstructorEditForm edit_form = new InstructorEditForm((form.Selected as InstructorInfo).Oid);
                    edit_form.ShowDialog();

                    if (form.ActionResult == DialogResult.OK)
                    {
                        RefreshHorario();
                    }
                }
            }
            catch { }
        }