コード例 #1
0
        private void btnAddReader_Click(object sender, EventArgs e)
        {
            READER reader = new READER();
            CARD   card   = new CARD();

            var tempReader = Connection.db.READERS.Count();


            reader.idReader   = tempIDReader + tempReader;
            reader.nameReader = txtFirstName.Text + txtLastName.Text;
            reader.idClass    = cbbClass.SelectedValue.ToString();
            if (cbbSex.SelectedText == "Male")
            {
                reader.sex = false;
            }
            else
            {
                reader.sex = true;
            }
            reader.birthday = Convert.ToDateTime(dtpBirthday.Text);
            reader.address  = txtAddress.Text;
            ReaderDAL.addNewReader(reader);
        }