Пример #1
0
        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();
        }
Пример #2
0
        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);
        }