private void loadVehicleCombo(Counts count) { cboVehicle.DataSource = count.FillVehicleCombo(); cboVehicle.DisplayMember = "RadioId"; cboVehicle.ValueMember = "Id"; cboVehicle.SelectedValue = currentCrew.Vehicle; }
private void getCounts() { Counts counts = new Counts(); if (counts.Crew1 < 12) { lblPlt1Count.ForeColor = System.Drawing.Color.Red; } else { lblPlt1Count.ForeColor = new System.Drawing.Color(); } lblPlt1Count.Text = counts.Crew1.ToString(); if (counts.Crew2 < 12) { lblPlt2Count.ForeColor = System.Drawing.Color.Red; } else { lblPlt2Count.ForeColor = new System.Drawing.Color(); } lblPlt2Count.Text = counts.Crew2.ToString(); if (counts.Crew3 < 12) { lblPlt3Count.ForeColor = System.Drawing.Color.Red; } else { lblPlt3Count.ForeColor = new System.Drawing.Color(); } lblPlt3Count.Text = counts.Crew3.ToString(); if (counts.Crew4 < 12) { lblPlt4Count.ForeColor = System.Drawing.Color.Red; } else { lblPlt4Count.ForeColor = new System.Drawing.Color(); } lblPlt4Count.Text = counts.Crew4.ToString(); lblPlt5Count.Text = counts.BugCrew.ToString(); lblCalFireGradeInCampGrade.Text = counts.CALFIREGradeInCamp.ToString(); lblCalFireInCampNonGrade.Text = counts.CALFIRENonGradeInCamp.ToString(); lblTotalCalFireInCamp.Text = counts.CALFIREInCamp.ToString(); lblCdcrInCamp.Text = counts.CDCRInCamp.ToString(); lblSpecialStatusGrade.Text = counts.SpecialStatusGrade.ToString(); lblSpecialStatusNonGrade.Text = counts.SpecialStatusNonGrade.ToString(); lblTotalSpecialStatus.Text = (counts.SpecialStatusGrade + counts.SpecialStatusNonGrade).ToString(); lblCampTotal.Text = counts.TotalAtCamp.ToString(); lblGradeEligibleCount.Text = counts.GradeEligible.ToString(); lblNonGradeCount.Text = counts.NonGrade.ToString(); }
public crewForm(CrewNumber crew) { InitializeComponent(); Counts count = new Counts(); crewNum = crew; //hookline = new List<Hookline>(); hookline = new Dictionary <string, int>(); currentCrew = new Crew((int)crew); this.Tag = (int)crew; lblSaveStatus.Visible = false; loadComboBoxes(cboFirstSaw, count, currentCrew.FirstSaw); loadComboBoxes(cboFirstPuller, count, currentCrew.FirstPuller); loadComboBoxes(cboSecondSaw, count, currentCrew.SecondSaw); loadComboBoxes(cboSecondPuller, count, currentCrew.SecondPuller); loadComboBoxes(cboRhino, count, currentCrew.Rhino); loadComboBoxes(cboLeadPulaski, count, currentCrew.FirstPulaski); loadComboBoxes(cboSecondPulaski, count, currentCrew.SecondPulaski); loadComboBoxes(cboThirdPulaski, count, currentCrew.ThirdPulaski); loadComboBoxes(cboFourthPulaski, count, currentCrew.FourthPulaski); loadComboBoxes(cboFifthPulaski, count, currentCrew.FifthPulaski); loadComboBoxes(cboFirstMcLeod, count, currentCrew.FirstMcLeod); loadComboBoxes(cboSecondMcLeod, count, currentCrew.SecondMcLeod); loadComboBoxes(cboThirdMcLeod, count, currentCrew.ThirdMcLeod); loadComboBoxes(cboFourthMcLeod, count, currentCrew.FourthMcLeod); loadComboBoxes(cboFifthMcLeod, count, currentCrew.FifthMcLeod); loadComboBoxes(cboDragSpoon, count, currentCrew.Dragspoon); loadComboBoxes(cboSwamper, count, currentCrew.Swamper); loadCaptainCombo(count); loadVehicleCombo(count); }
private void setUpDataGridView() { dgvVehicleRoster.DataSource = null; Counts counts = new Counts(); dgvVehicleRoster.DataSource = counts.VehicleRoster("SELECT * FROM [vehicle]"); dgvVehicleRoster.DataMember = "vehicle"; }
private void setUpDataGridView() { dgvStaff.DataSource = null; Counts counts = new Counts(); dgvStaff.DataSource = counts.StaffRoster(queryString); dgvStaff.DataMember = "staff"; }
private void setUpDataGridView() { dgvCampRoster.DataSource = null; Counts counts = new Counts(); dgvCampRoster.DataSource = counts.CampRoster(queryString); dgvCampRoster.DataMember = "inmate"; }
private void loadCaptainCombo(Counts count) { cboCaptain.DataSource = count.FillStaffCombo("CALFIRE"); cboCaptain.DisplayMember = "FullName"; cboCaptain.ValueMember = "Id"; cboCaptain.FormattingEnabled = true; cboCaptain.SelectedValue = currentCrew.Captain; }
public campSnapShot(MainMenu mainMenu) { mainmenu = mainMenu; InitializeComponent(); counts = new Counts(); getCounts(); mainmenu.CampRosterUpdated += Mainmenu_CampRosterUpdated; loadComboBoxes(); }
private void loadComboBoxes(ComboBox comboBox, Counts count, int crewMemberID) { //ComboBox comboBox = (ComboBox)this.Controls[comboName]; //Counts count = new Counts(); comboBox.DataSource = count.FillCrewCombo(crewNumber(crewNum)); comboBox.DisplayMember = "ComboListName"; comboBox.ValueMember = "id"; comboBox.FormattingEnabled = true; comboBox.SelectedValue = crewMemberID; hookline.Add(comboBox.Tag.ToString(), crewMemberID); loadCrewLabels(crewMemberID, comboBox.Tag.ToString()); }