コード例 #1
0
        private void btThemPC_Click(object sender, EventArgs e)
        {
            if (txtMaPC.Text == "" || txtTenPC.Text == "" || txtTienPC.Text == "")
            {
                MessageBox.Show("Không có dữ liệu để phụ cấp", "Thông báo");
                return;
            }
            PhuCap pc = new PhuCap(txtMaPC.Text, txtTenPC.Text, int.Parse(txtTienPC.Text));

            try
            {
                cnb.AddPhuCap(pc);
            }
            catch (Exception p)
            {
                MessageBox.Show(p.ToString());
            }
        }