public void Race_Load(Object sender, EventArgs e) { adjustStatusBar.AdjustLoadStatus(0); DataSet ds = new DataSet(); PRDatabaseManager.Instance().FillRace(ds); cmbSearch.DataSource = ds; cmbSearch.DisplayMember = "Race.Name"; dtpRaceDate.DataBindings.Add("Value", ds, "Race.RaceDate"); txtRaceName.DataBindings.Add("Text", ds, "Race.Name"); txtRaceDistance.DataBindings.Add("Text", ds, "Race.Distance"); cmbLocation.DataSource = ds; cmbLocation.DisplayMember = "Race.Location"; txtStart.DataBindings.Add("Text", ds, "Race.StartPoint"); txtFinish.DataBindings.Add("Text", ds, "Race.FinishPoint"); txtLevel.DataBindings.Add("Text", ds, "Race.Level"); adjustStatusBar.AdjustLoadStatus(1); }
public static PRDatabaseManager Instance() { if (_instance == null) { _instance = new PRDatabaseManager(); } return(_instance); }
private bool Authenticate() { DataSet ds = new DataSet(); PRDatabaseManager.Instance().FillAuthen(ds, TxtUserName.Text, TxtPassword.Text); return(ds.Tables[0].Rows.Count > 0); }
private void frmRacers_Load(object sender, EventArgs e) { adjustStatusBar.AdjustLoadStatus(0); //PRDatabaseManager.Instance().FillSponsorWithParticipant(ds, "PS"); PRDatabaseManager.Instance().FillSponsor(ds); PRDatabaseManager.Instance().FillParticipant(ds); cmbParticipants.DataSource = ds; cmbParticipants.DisplayMember = "Participant.FullName"; txtFirstName.DataBindings.Add("Text", ds, "Participant.FirstName"); txtLastName.DataBindings.Add("Text", ds, "Participant.LastName"); cmbCountry.DataSource = ds; cmbCountry.DisplayMember = "Participant.Country"; txtRank.DataBindings.Add("Text", ds, "Participant.Rank"); cmbSponsor.DataSource = ds; cmbSponsor.DisplayMember = "Sponsor.SponsorName"; cmbSponsor.ValueMember = "Sponsor.SponsorId"; cmbSponsor.DataBindings.Add("SelectedValue", ds, "Participant.SponsorId"); txtGender.DataBindings.Add("Text", ds, "Participant.Gender"); chkMember.DataBindings.Add("Checked", ds, "Participant.IACMember"); //cmbParticipants.DataSource = ds; //cmbParticipants.DisplayMember = "PS.FullName"; //cmbParticipants.ValueMember = "PS.SponsorId"; //cmbParticipants.DataBindings.Add("SelectedValue", ds, "PS.SponsorId"); //txtFirstName.DataBindings.Add("Text", ds, "PS.FirstName"); //txtLastName.DataBindings.Add("Text", ds, "PS.LastName"); //cmbCountry.DataSource = ds; //cmbCountry.DisplayMember = "PS.Country"; //txtRank.DataBindings.Add("Text", ds, "PS.Rank"); //cmbSponsor.DataSource = ds; //cmbSponsor.DisplayMember = "PS.SponsorName"; //cmbSponsor.ValueMember = "PS.SponsorId"; //txtGender.DataBindings.Add("Text", ds, "PS.Gender"); //chkMember.DataBindings.Add("Checked", ds, "PS.IACMember"); adjustStatusBar.AdjustLoadStatus(1); }
private void Sponsor_Load(object sender, EventArgs e) { adjStatusBar.AdjustLoadStatus(0); DataSet ds = new DataSet(); PRDatabaseManager.Instance().FillSponsor(ds); lstSearch.DataSource = ds; lstSearch.DisplayMember = "Sponsor.SponsorName"; txtName.DataBindings.Add("Text", ds, "Sponsor.SponsorName"); txtAddress.DataBindings.Add("Text", ds, "Sponsor.Address"); adjStatusBar.AdjustLoadStatus(1); }