コード例 #1
0
        public void Editar()
        {
            try
            {
                if (!isMViewShow)
                {
                    MView           = new CAJ014PlantillaAsientosMView();
                    MView.Presenter = this;
                    MView.LoadView();
                }

                Item = Client.GetOneCabPerfilAsientos(Item.CABP_Ano, Item.CABP_Codigo);

                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();

                    isMViewShow = true;
                    ((CAJ014PlantillaAsientosMView)MView).Show();
                    ((CAJ014PlantillaAsientosMView)MView).BringToFront();
                }
                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); }
        }
コード例 #2
0
        public void Nuevo()
        {
            try
            {
                if (!isMViewShow)
                {
                    MView           = new CAJ014PlantillaAsientosMView();
                    MView.Presenter = this;
                    MView.LoadView();
                }

                MView.ClearItem();
                this.Item = new CabPerfilAsientos();
                this.Item.ListDetPerfilAsientos           = new ObservableCollection <DetPerfilAsientos>();
                this.Item.ListDetPerfilAsientosEliminados = new ObservableCollection <DetPerfilAsientos>();
                this.Item.AUDI_UsrCrea = Session.UserName;
                this.Item.AUDI_FecCrea = Session.Fecha;
                this.Item.Instance     = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added;
                MView.SetItem();

                isMViewShow = true;
                ((CAJ014PlantillaAsientosMView)MView).Show();
                ((CAJ014PlantillaAsientosMView)MView).BringToFront();
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); }
        }