예제 #1
0
        public void Nuevo()
        {
            try
            {
                if (ItemTabla != null)
                {
                    MView.ClearItem();
                    this.Item = new Tipos();
                    this.Item.TIPO_CodTabla = ItemTabla.TIPO_CodTipo;
                    this.Item.AUDI_UsrCrea  = Session.UserName;
                    this.Item.AUDI_FecCrea  = Session.Fecha;
                    this.Item.Instance      = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added;
                    MView.SetItem();
                    MView.setTamanoPorTipo();
                    MView.TRFPaises();

                    ((MAN002MView)MView).StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                    ((MAN002MView)MView).ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "Debe seleccionar una tabla de tipos.");
                }
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); }
        }
예제 #2
0
        public void Editar()
        {
            try
            {
                if (Item != null)
                {
                    MView.ClearItem();
                    this.Item.AUDI_UsrMod = Session.UserName;
                    this.Item.AUDI_FecMod = Session.Fecha;
                    this.Item.Instance    = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Modified;
                    MView.SetItem();
                    MView.setTamanoPorTipo();
                    MView.TRFPaises();

                    ((MAN002MView)MView).ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "Debe seleccionar un elemento de la grilla");
                }
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.EditPresenter, ex); }
        }