Esempio n. 1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            short Rchecked = 0;

            if (rBtnBoy.Checked)
            {
                Rchecked = 1;
            }
            else if (rBtnGirl.Checked)
            {
                Rchecked = 2;
            }
            else if (rBtnOther.Checked)
            {
                Rchecked = 3;
            }
            try
            {
                Garningsman g = new Garningsman(tbxName.Text, Rchecked, short.Parse(tbxAge.Text), short.Parse(tbxLenght.Text), tbxHairColor.Text);
                Anmalan     A = new Anmalan(g, tbxCrime.Text);
                Anmalan.AnmalanAlla.Add(A);
                UpdateList();
            }
            catch
            {
                MessageBox.Show("Felkod Affepaffe");
            }
        }
Esempio n. 2
0
 public Anmalan(Garningsman gMan, string brott)
 {
     this._brottsmisstanke = brott;
     this.g = gMan;
 }