Пример #1
0
        public override void OpenAddForm()
        {
            MunicipioAddForm form = new MunicipioAddForm(this);

            AddForm(form);
            _entity = form.Entity;
        }
Пример #2
0
        public override void CopyObjectAction(long oid)
        {
            MunicipioAddForm form = new MunicipioAddForm(Library.Common.Municipio.CloneAsNew(ActiveItem), this);

            if (form.Entity != null)
            {
                AddForm(form);
                _entity = form.Entity;
            }
        }
Пример #3
0
 public override void OpenAddForm()
 {
     try
     {
         MunicipioAddForm form = new MunicipioAddForm(this);
         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);
     }
 }