///// <summary>
        ///// Abre el formulario para borrar item
        ///// <returns>void</returns>
        ///// </summary>
        public override void DeleteObject(long oid)
        {
            if (MessageBox.Show(moleQule.Face.Resources.Messages.DELETE_CONFIRM,
                                moleQule.Face.Resources.Labels.ADVISE_TITLE,
                                MessageBoxButtons.YesNoCancel,
                                MessageBoxIcon.Question) == DialogResult.Yes)
            {
                try
                {
                    PlantillaExamen.Delete(oid);

                    //Se eliminan todos los formularios de ese objeto
                    foreach (EntityDriverForm form in _list_active_form)
                    {
                        if (form is ItemMngBaseForm)
                        {
                            if (((ItemMngBaseForm)form).Oid == oid)
                            {
                                form.Dispose();
                                break;
                            }
                        }
                    }
                }
                catch (DataPortalException ex)
                {
                    MessageBox.Show(iQExceptionHandler.GetiQException(ex).Message);
                }
                finally
                {
                    RefreshList();
                }
            }
        }
        /// <summary>
        /// Abre el formulario para borrar item
        /// <returns>void</returns>
        /// </summary>
        public override void DeleteObject(long oid)
        {
            //if (MessageBox.Show(moleQule.Face.Resources.Messages.DELETE_CONFIRM,
            //                    moleQule.Face.Resources.Labels.ADVISE_TITLE,
            //                    MessageBoxButtons.YesNoCancel,
            //                    MessageBoxIcon.Question) == DialogResult.Yes)
            //{
            try
            {
                PlantillaExamen.Delete(oid);
                _action_result = DialogResult.OK;

                //Se eliminan todos los formularios de ese objeto
                foreach (ItemMngBaseForm form in _list_active_form)
                {
                    if (form.Oid == oid)
                    {
                        form.Dispose();
                        break;
                    }
                }
            }
            catch (Csla.DataPortalException ex)
            {
                MessageBox.Show(iQExceptionHandler.GetiQException(ex).Message);
            }
            //}
        }
예제 #3
0
 ///// <summary>
 ///// Abre el formulario para borrar item
 ///// <returns>void</returns>
 ///// </summary>
 public override void DeleteObject(long oid)
 {
     //if (MessageBox.Show(moleQule.Face.Resources.Messages.DELETE_CONFIRM,
     //                    moleQule.Face.Resources.Labels.ADVISE_TITLE,
     //                    MessageBoxButtons.YesNoCancel,
     //                    MessageBoxIcon.Question) == DialogResult.Yes)
     //{
     try
     {
         PlantillaExamen.Delete(oid);
         RefreshSecondaryData();
     }
     catch (DataPortalException ex)
     {
         MessageBox.Show(iQExceptionHandler.GetiQException(ex).Message);
     }
     finally
     {
         RefreshSecondaryData();
     }
     //}
 }