private void GPFrmProcesaPlanilla_Load(object sender, EventArgs e) { try { _presenter = new PlanGeneralPresenter(this, new PlanGeneralModelo(), new PlanGeneralService(DatosDB.DBDatos), DatosDB.DBDatos.Intercompany); textBUsuario.Text = DatosDB.DBDatos.Usuario + " / " + DatosDB.DBDatos.Compannia; _suppressEvents = true; //-- initialize presenter _presenter.Initialize(); _isDirty = false; } catch (Exception pr) { MessageBox.Show("Error al iniciar la aplicación. [Load]" + pr.Message); this.Close(); } finally { _suppressEvents = false; } }
private void tsBtnBuscar_Click(object sender, EventArgs e) { _presenter = new PlanGeneralPresenter(this, new PlanGeneralModelo(), new PlanGeneralService(_DatosConexion), ""); try { _suppressEvents = true; //-- initialize presenter _presenter.Initialize(); _isDirty = false; if (tsTxtBxBuscar.Text.Trim().Equals("")) { _presenter.OnLoadLookup(); } else { _presenter.OnLoadLookup(tsTxtBxBuscar.Text); } } finally { _suppressEvents = false; } }
private void PlanillaLookup_Load(object sender, EventArgs e) { _presenter = new PlanGeneralPresenter(this, new PlanGeneralModelo(), new PlanGeneralService(_DatosConexion), ""); try { _suppressEvents = true; //-- initialize presenter _presenter.Initialize(); _isDirty = false; if (_IdPlanilla.Equals(string.Empty)) { _presenter.OnLoadLookup(); } else { _presenter.OnLoadLookup(_IdPlanilla); } } finally { _suppressEvents = false; } }