public void Nuevo() { try { if (!isMViewShow) { MView = new CAJ007ExportacionBancosMView(); MView.Presenter = this; MView.LoadView(); } MView.ClearItem(); this.Item = new Planillas(); this.Item.EMPR_Codigo = Controls.Entorno.ItemEmpresa.EMPR_Codigo; this.Item.SetEstado(Planillas.Estado.Ingresado); this.Item.SetTipoPlanilla(TPlanilla); this.Item.AUDI_UsrCrea = Session.UserName; this.Item.AUDI_FecCrea = Session.Fecha; this.Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; this.Item.TPlanilla = TPlanilla; MView.SetItem(); isMViewShow = true; if (LView != null) { ((CAJ007ExportacionBancosMView)MView).Icon = System.Drawing.Icon.FromHandle(((System.Drawing.Bitmap)LView.IconView).GetHicon()); } ((CAJ007ExportacionBancosMView)MView).Show(); ((CAJ007ExportacionBancosMView)MView).BringToFront(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); } }
public void Nuevo() { try { MView.ClearItem(); this.Item = new GRR(); if (FILTRO_ENTC_CodTransportista != null) { this.Item.ENTC_CodTransportista = FILTRO_ENTC_CodTransportista; } this.Item.EMPR_Codigo = Controls.Entorno.ItemEmpresa.EMPR_Codigo; this.Item.AUDI_UsrCrea = Session.UserName; this.Item.AUDI_FecCrea = Session.Fecha; this.Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; foreach (Paquete itemPaquete in ListPaquetes) { GRR_Paquetes _itemGRR_Paquetes = new GRR_Paquetes(); _itemGRR_Paquetes.PACK_Codigo = itemPaquete.PACK_Codigo; _itemGRR_Paquetes.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; this.Item.ListGRR_Paquetes.Add(_itemGRR_Paquetes); } MView.SetItem(); ((MAN012MView)MView).ShowDialog(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); } }
public System.Windows.Forms.DialogResult Nuevo() { try { //if (ItemTransportista != null) //{ MView.ClearItem(false); this.Item = new NaveViaje(); //this.Item.NAVE_Codigo = Item.NAVE_Codigo; //this.Item.NAVE_Nombre = Item.NAVE_Nombre; if (ItemTransportista != null) { this.Item.ENTC_CodTransportista = ItemTransportista.ENTC_Codigo; } this.Item.AUDI_UsrCrea = Session.UserName; this.Item.AUDI_FecCrea = Session.Fecha; this.Item.NVIA_Estado = "A"; //this.Item.TIPO_CodTRF = "001"; this.Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; MView.SetItem(false); return(((MAN011MView)MView).ShowDialog()); //} //else //{ Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "Debe seleccionar un Transportista."); return System.Windows.Forms.DialogResult.Cancel; } } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); return(System.Windows.Forms.DialogResult.Cancel); } }
public void Editar() { try { //if (!isMViewShow) //{ // MView = new DOC002MView(); // MView.Presenter = this; // MView.LoadView(); //} Boolean _Estado = false; switch (_ccot_estado) { case "004": case "006": case "007": _Estado = true; break; default: _Estado = false; break; } if (_load_codigo != null) { if ((_con_prealerta == true && _ccot_codigo != null && _Estado) || (_con_prealerta != true)) { _Item = Client.GetALoadingListByLoad_Codigo(_load_codigo); MView.ClearItem(); //this._Item.AUDI_UsrMod = Session.UserName; //this._Item.AUDI_FecMod = Session.Fecha; this._Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Modified; if (_Item.LOAD_FecDevolucion == null && _con_prealerta == true) { _Item.LOAD_FecDevolucion = DateTime.Now; } MView.ShowCampos(true); MView.SetItem(); isMViewShow = true; ((DOC002MView)MView).ShowDialog(); } else { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "El registro no cuenta con una Orden de Venta en estado Concluida en Adelante"); } } 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); } }
public void Editar(Int32 x_CACU_Codigo) { try { MView.ClearItem(); ItemCajaCuentas = Client.GetOneCajaCuentas(x_CACU_Codigo); MView.SetItem(); MView.SetInstance(InstanceView.Edit); ((PRO009MView)MView).ShowDialog(); } catch (Exception ex) { Dialogos.MostrarMensajeError(Title, Mensajes.EditPresenter, ex); } }
/// <summary> /// Metodo para refrescar la pantalla con nuevos datos /// </summary> public void ScreenRefresh(Int32 x_NVIA_Codigo) { try { Item = Client.GetOneNaveViaje(x_NVIA_Codigo); MView.ClearItem(false); this.Item.AUDI_UsrMod = Session.UserName; this.Item.AUDI_FecMod = Session.Fecha; this.Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Modified; MView.SetItem(false); MView.FormatGridDetalle(Item.CONS_CodRGM); } catch (Exception ex) { throw ex; } }
public void Nuevo() { try { MView.ClearItem(); this.Item = new ResultGestion(); this.Item.RESG_Activo = true; this.Item.RESG_PositivoNegativo = 0; this.Item.AUDI_UsrCrea = Session.UserName; this.Item.AUDI_FecCrea = Session.Fecha; this.Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; MView.SetItem(); ((MAN003MView)MView).ShowDialog(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); } }
public void Nuevo() { try { MView.ClearItem(); this._Item = new LoadingList(); this._Item.LOAD_SegundoOK = false; this._Item.LOAD_CargaUsuario = Session.UserName; this._Item.Instance = Infrastructure.Aspect.BusinessEntity.InstanceEntity.Added; MView.ShowCampos(true); MView.SetItem(); isMViewShow = true; ((DOC002MView)MView).ShowDialog(); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, Infrastructure.Aspect.Constants.Mensajes.NewPresenter, ex); } }