private void comboRecordCategory_SelectedIndexChanged(object sender, EventArgs e) { FineType type = FineTypeDataMapper.FindByID((int)comboRecordCategory.SelectedValue); boxRecordAmmount.Text = type.MaxFine.ToString(); boxRecordPoints.Text = type.PointPenalty.ToString(); }
private bool loadData() { bool ret = false; List <FineType> list = FineTypeDataMapper.FindAll(); comboRecordCategory.DisplayMember = "Category"; comboRecordCategory.ValueMember = "ID"; comboRecordCategory.DataSource = list; //Vyplnit tabulku FineType type = FineTypeDataMapper.FindByID((int)comboRecordCategory.SelectedValue); boxRecordAmmount.Text = type.MaxFine.ToString(); boxRecordPoints.Text = type.PointPenalty.ToString(); return(ret); }