/// <summary>Duplica un objeto y abre el formulario para editar item
        /// <returns>void</returns>
        /// </summary>
        public override void DuplicateObject(long oid)
        {
            try
            {
                Auditoria old = Auditoria.Get(oid, true);
                Auditoria dup = old.CloneAsNew();
                old.CloseSession();

                AddForm(new AuditoriaAddForm(dup));
            }
            catch (iQException ex)
            {
                MessageBox.Show(ex.Message,
                                moleQule.Face.Resources.Labels.ERROR_TITLE,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
            }
            catch (Csla.DataPortalException ex)
            {
                MessageBox.Show(iQExceptionHandler.GetiQException(ex).Message,
                                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);
            }

            RefreshList();
        }
Пример #2
0
 protected override void GetFormSourceData(long oid)
 {
     _entity = Auditoria.Get(oid, true);
     //AuditoriaController.CompruebaPlazos(_entity);
     _entity.BeginEdit();
     _mf_type = ManagerFormType.MFEdit;
 }