B-Arts DocumentationIndice generale

BBarraDati

Identità

  • Namespace: B.BWindows.BControls

  • Base: UserControl

Scopo

Barra di navigazione e gestione dati per maschere WinForms B-Arts. Coordina posizione nel BDataTable, stati nuovo/visione/modifica, comandi CRUD e operazioni accessorie come ricerca, refresh, stampa e uscita.

Stati e modalità

  • Stato: mbeNuovo, mbeVisione, mbeModifica.

  • TipoSalvataggio: INTERNO oppure ESTERNO.

  • In modalità interna usa Cnn, DataTable, Query, campi chiave e query di cancellazione.

  • In modalità esterna delega salvataggio ed eliminazione tramite EST_SalvaRecord ed EST_EliminaRecord.

Eventi principali

  • BeforeClick e AfterClick: comando della barra.

  • NuovoRec: preparazione del nuovo record.

  • CambiaRec(DataRow): visualizzazione del record corrente.

  • ScriviRec(DataRow, DataRow old): copia dei valori della form nella riga.

  • StateChange(statoPrecedente): cambio di modalità.

  • EST_SalvaRecord(ByRef DataRow, ByRef bool nuovo) e EST_EliminaRecord: persistenza esterna.

Operazioni

Init, Primo, Indietro, Avanti, Ultimo, Nuovo, Salva, Annulla, Elimina, Aggiorna, Cerca, Stampa, Uscita, VisionaRecord e ControllaStato corrispondono al flusso della barra.

AddCampoChiave configura le chiavi; AddQueryDelete aggiunge istruzioni di cancellazione collegate. Le proprietà Show* controllano soltanto la disponibilità visuale dei pulsanti.

Riferimento API completo

Identità

  • Namespace: B.BWindows.BControls

  • Assembly: BFrameworkControls

  • Tipo: class

  • Classe base: UserControl

  • Sorgente API: versione 5.0.0

Dichiarazione

public class BBarraDati : UserControl

Costruttori

  • BBarraDati()

Campi pubblici

Nessun campo pubblico dichiarato.

Proprietà

Proprietà Tipo Accesso
AnnullaComando mbeBtn get/set
BarraDatiStyle mbeStyle get/set
BDBackColor Color get/set
BDBackColorSel Color get/set
BorderStyle BorderStyle get/set
CloseConnection bool get/set
Cnn BConnection get/set
DataTable BDataTable get/set
DeleteMessage bool get/set
EnableTransaction bool get/set
EST_CampiChiave List<CampiChiave> get
EST_EventoOk bool get/set
EST_SP_SELECT string get/set
FlatStyle FlatStyle get/set
ForeColor Color get/set
OneRecord bool get/set
OnStartNewRecord bool get/set
Posizione long get/set
Query string get/set
QueryDelete ArrayList get
ReadOnly bool get/set
ShowBottonsCommand bool get/set
ShowBottonsNavigator bool get/set
ShowBottonsOtherCommand bool get/set
ShowBtnCancel bool get/set
ShowBtnDelete bool get/set
ShowBtnExit bool get/set
ShowBtnNew bool get/set
ShowBtnPrint bool get/set
ShowBtnRefresh bool get/set
ShowBtnSearch bool get/set
ShowBtnUpdate bool get/set
ShowInfoNavigator bool get/set
Spaziatura double get/set
Stato mbeStato get/set
TipoSalvataggio eTipoSalvataggio get/set

Eventi CLR

  • AfterClick: AfterClickEventHandler

  • BeforeClick: BeforeClickEventHandler

  • CambiaRec: CambiaRecEventHandler

  • EST_EliminaRecord: EST_EliminaRecordEventHandler

  • EST_SalvaRecord: EST_SalvaRecordEventHandler

  • NuovoRec: NuovoRecEventHandler

  • ScriviRec: ScriviRecEventHandler

  • StateChange: StateChangeEventHandler

Metodi

  • bool AddCampoChiave(CampiChiave Campo)

  • bool AddCampoChiave(string CampoNome, object CampoValore)

  • bool AddQueryDelete(string Query)

  • void Aggiorna()

  • void Annulla()

  • void Avanti()

  • void CancelUpdate(Control oCtl)

  • void Cerca()

  • bool ClearCampiChiave()

  • bool ClearQueryDelete()

  • void ControllaStato()

  • bool DelCampoChiave(int Index)

  • bool DelQueryDelete(int Index)

  • void Elimina()

  • void Indietro()

  • bool Init(bool Refresh = false)

  • void Nuovo()

  • void Primo()

  • void RedrawControls()

  • bool RicaricaDati(DataRow dr, bool Nuovo)

  • void Salva()

  • bool SalvaCampoChiave(int Index, CampiChiave Campo)

  • void Stampa()

  • void Ultimo()

  • bool Update(DataRow dr, string sWhere = "")

  • bool UpdateQueryDelete(int Index, string Query)

  • void Uscita()

  • void VisionaRecord()

Tipi annidati pubblici

Delegate AfterClickEventHandler

  • Firma: void AfterClickEventHandler(mbeBtn btn)

Delegate BeforeClickEventHandler

  • Firma: void BeforeClickEventHandler(mbeBtn btn)

Delegate CambiaRecEventHandler

  • Firma: void CambiaRecEventHandler(DataRow dr)

CampiChiave (struct)

  • Campo: string Nome

  • Campo: object Valore

Delegate EST_EliminaRecordEventHandler

  • Firma: void EST_EliminaRecordEventHandler()

Delegate EST_SalvaRecordEventHandler

  • Firma: void EST_SalvaRecordEventHandler(DataRow& dr, bool& Nuovo)

eTipoSalvataggio

  • INTERNO = 0

  • ESTERNO = 1

mbeBtn

  • mbeNessuno = 0

  • mbePrimo = 1

  • mbePrecedente = 2

  • mbeSuccessivo = 3

  • mbeUltimo = 4

  • mbeAggiungi = 5

  • mbeElimina = 6

  • mbeSalva = 7

  • mbeAnnulla = 8

  • mbeRefresh = 9

  • mbeRicerca = 10

  • mbeStampa = 11

  • mbeUscita = 12

mbeStato

  • mbeNuovo = 0

  • mbeVisione = 1

  • mbeModifica = 2

mbeStyle

  • STANDARD = 0

  • STYLE_XP = 1

Delegate NuovoRecEventHandler

  • Firma: void NuovoRecEventHandler()

Delegate ScriviRecEventHandler

  • Firma: void ScriviRecEventHandler(DataRow dr, DataRow drOld)

Delegate StateChangeEventHandler

  • Firma: void StateChangeEventHandler(mbeStato StatoOld)