private void buttonDelete_Click(object sender, EventArgs e) { DOT_baocaotuan m = new DOT_baocaotuan(Convert.ToInt32(field_id.Text), Convert.ToInt32(field_macv.Text), Convert.ToInt32(field_manv.Text), field_ngaybd.Text, field_tiendo.Text, field_ghichu.Text, field_dexuat.Text); bct.baocaotuan_xoa(m); MessageBox.Show("xóa thành công nhân viên "); dgv.DataSource = bct.Get_baocaotuan(); }
private void buttonUpdate_Click(object sender, EventArgs e) { if (field_tiendo.Text != "" && field_ghichu.Text != " " && field_dexuat.Text != " ") { DOT_baocaotuan m = new DOT_baocaotuan(Convert.ToInt32(field_id.Text), Convert.ToInt32(field_macv.Text), Convert.ToInt32(field_manv.Text), field_ngaybd.Text, field_tiendo.Text, field_ghichu.Text, field_dexuat.Text); bct.baocaotuan_sua(m); MessageBox.Show("sửa thành công"); dgv.DataSource = bct.Get_baocaotuan(); } else { MessageBox.Show("Xin hãy nhập đầy đủ"); } }
private void buttonInsert_Click(object sender, EventArgs e) { if (field_tiendo.Text != "" && field_ghichu.Text != " " && field_dexuat.Text != " ") { DOT_baocaotuan m = new DOT_baocaotuan(0, Convert.ToInt32(field_macv.Text), Convert.ToInt32(field_manv.Text), field_ngaybd.Text, field_tiendo.Text, field_ghichu.Text, field_dexuat.Text); Convert.ToString(bct.baocaotuan_them(m)); MessageBox.Show("Thêm thành công"); dgv.DataSource = bct.Get_baocaotuan(); } else { MessageBox.Show("Xin hãy nhập đầy đủ"); } }
public bool baocaotuan_xoa(DOT_baocaotuan baocaotuan) { return(ma.baocaotuan_xoa(baocaotuan)); }
public int baocaotuan_them(DOT_baocaotuan nv) { return(ma.baocaotuan_them(nv)); }