private void InitializeEvents(ref Formularios.frmFDSEVincular formFVincular) { // Refresh DSEs formFVincular.eCallRefreshDSEs += new mdlDSE.Formularios.frmFDSEVincular.delCallRefreshDSEs(formFVincular_eCallRefreshREs); // Refresh DSEs Vinculados formFVincular.eCallRefreshDSEsVinculados += new mdlDSE.Formularios.frmFDSEVincular.delCallRefreshDSEsVinculados(formFVincular_eCallRefreshDSEsVinculados); //ShowDialogDSEs formFVincular.eCallShowDialogDSEs += new mdlDSE.Formularios.frmFDSEVincular.delCallShowDialogDSEs(ShowDialog); // DSE Vincular formFVincular.eCallDSEVincular += new mdlDSE.Formularios.frmFDSEVincular.delCallDSEVincular(formFVincular_eCallDSEVincular); // DSE Desvincular formFVincular.eCallDSEDesvincular += new mdlDSE.Formularios.frmFDSEVincular.delCallDSEDesvincular(formFVincular_eCallDSEDesvincular); // DSE Novo formFVincular.eCallShowDSENovo += new mdlDSE.Formularios.frmFDSEVincular.delCallShowDSENovo(ShowDialogNovo); // DSE Editar formFVincular.eCallShowDSEEditar += new mdlDSE.Formularios.frmFDSEVincular.delCallShowDSEEditar(ShowDialogEditar); // DSE Excluir formFVincular.eCallShowDSERemover += new mdlDSE.Formularios.frmFDSEVincular.delCallShowDSERemover(formFDSEs_eCallShowDSERemover); }
private bool formFVincular_eCallDSEVincular(Formularios.frmFDSEVincular sender, int nIdDSE) { mdlDataBaseAccess.Tabelas.XsdTbDSEsPEs.tbDSEsPEsRow dtrwVincular = m_typDatSetDSEsPEs.tbDSEsPEs.NewtbDSEsPEsRow(); dtrwVincular.nIdExportador = m_nIdExportador; dtrwVincular.strIdPE = m_strIdPe; dtrwVincular.nIdDSE = nIdDSE; m_typDatSetDSEsPEs.tbDSEsPEs.AddtbDSEsPEsRow(dtrwVincular); vGeraPersonalizavel(); sender.Personalizavel = this.Personalizavel; sender.Editavel = (bDSEVinculado(m_strIdPe)) && (!bReVinculado(m_strIdPe)); return(true); }
private bool formFVincular_eCallDSEDesvincular(Formularios.frmFDSEVincular sender, int nIdDSE) { mdlDataBaseAccess.Tabelas.XsdTbDSEsPEs.tbDSEsPEsRow dtrwDesvincular = m_typDatSetDSEsPEs.tbDSEsPEs.FindBynIdExportadornIdDSEstrIdPE(m_nIdExportador, nIdDSE, m_strIdPe); if ((dtrwDesvincular == null) || (dtrwDesvincular.RowState == System.Data.DataRowState.Deleted)) { return(false); } dtrwDesvincular.Delete(); vGeraPersonalizavel(); sender.Personalizavel = this.Personalizavel; sender.Editavel = (bDSEVinculado(m_strIdPe)) && (!bReVinculado(m_strIdPe)); return(true); }
public bool ShowDialogVincular() { Formularios.frmFDSEVincular formFVincular = new Formularios.frmFDSEVincular(m_strEnderecoExecutavel); InitializeEvents(ref formFVincular); formFVincular.Personalizavel = this.Personalizavel; formFVincular.Editavel = (bDSEVinculado(m_strIdPe)) && (!bReVinculado(m_strIdPe)); formFVincular.ShowDialog(); if (formFVincular.Modificado) { if (m_typDatSetPes.tbPEs.Rows.Count > 0) { mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow dtrwPE = (mdlDataBaseAccess.Tabelas.XsdTbPes.tbPEsRow)m_typDatSetPes.tbPEs.Rows[0]; dtrwPE.mstrDSE = formFVincular.Personalizavel; } return(bSalvaDados()); } return(formFVincular.Modificado); }