private void btThemHSL_Click(object sender, EventArgs e) { if (MaHSL.Text == "" || txtTenHSL.Text == "" || txtHSL.Text == "") { MessageBox.Show("Khong co du lieu"); return; } HeSoLuong hsl = new HeSoLuong(MaHSL.Text, txtTenHSL.Text, txtHSL.Text); try { cnb.AddHeSoLuong(hsl); } catch (Exception p) { MessageBox.Show(p.ToString()); } }
private void btThemHSL_Click(object sender, EventArgs e) { if (MaHSL.Text == "" || txtTenHSL.Text == "" || txtHSL.Text == "") { MessageBox.Show("Không có dữ liệu để thêm", "Thông báo"); return; } HeSoLuong hsl = new HeSoLuong(MaHSL.Text, txtTenHSL.Text, int.Parse(txtHSL.Text)); try { cnb.AddHeSoLuong(hsl); LoadHSL_(); } catch (Exception p) { MessageBox.Show(p.ToString()); } }