public bool deletedata(En_Diem en) { string query = string.Format("DELETE FROM Diem WHERE id=@id"); SqlParameter[] sqlPara = new SqlParameter[1]; sqlPara[0] = new SqlParameter("@id", en.id); return(cnn.executeDeleteQuery(query, sqlPara)); }
private void frmDiem_Load(object sender, EventArgs e) { en = new En_Diem(); NapLop(); NapSinhVien(); NapMonHoc(); NapGiaoVien(); NapLoaiDiem(); NapTrangThai(); NapDuLieu(); EvenButton(0); EnableOrDisable(true); }
public bool updatedata(En_Diem en) { string query = string.Format("UPDATE Diem SET MaL = @MaL, MaSV = @MaSV, MaMH = @MaMH, MaGV = @MaGV, MaLD = @MaLD, Diem = @Diem, TrangThai = @TrangThai, NgayCapNhat = @NgayCapNhat WHERE id=@id"); SqlParameter[] sqlPara = new SqlParameter[9]; sqlPara[0] = new SqlParameter("@MaL", en.MaL); sqlPara[1] = new SqlParameter("@MaSV", en.MaSV); sqlPara[2] = new SqlParameter("@MaMH", en.MaMH); sqlPara[3] = new SqlParameter("@MaGV", en.MaGV); sqlPara[4] = new SqlParameter("@MaLD", en.MaLD); sqlPara[5] = new SqlParameter("@Diem", en.Diem); sqlPara[6] = new SqlParameter("@TrangThai", en.TrangThai); sqlPara[7] = new SqlParameter("@NgayCapNhat", en.NgayCapNhat); sqlPara[8] = new SqlParameter("@id", en.id); return(cnn.executeUpdateQuery(query, sqlPara)); }
public bool insertdata(En_Diem en) { string query = string.Format("INSERT INTO Diem(MaL, MaSV, MaMH, MaGV, MaLD, Diem, TrangThai, NgayTao, NgayCapNhat) VALUES(@MaL, @MaSV, @MaMH, @MaGV, @MaLD, @Diem, @TrangThai, @NgayTao, @NgayCapNhat)"); SqlParameter[] sqlPara = new SqlParameter[9]; sqlPara[0] = new SqlParameter("@MaL", en.MaL); sqlPara[1] = new SqlParameter("@MaSV", en.MaSV); sqlPara[2] = new SqlParameter("@MaMH", en.MaMH); sqlPara[3] = new SqlParameter("@MaGV", en.MaGV); sqlPara[4] = new SqlParameter("@MaLD", en.MaLD); sqlPara[5] = new SqlParameter("@Diem", en.Diem); sqlPara[6] = new SqlParameter("@TrangThai", en.TrangThai); sqlPara[7] = new SqlParameter("@NgayTao", en.NgayTao); sqlPara[8] = new SqlParameter("@NgayCapNhat", en.NgayCapNhat); return(cnn.executeInsertQuery(query, sqlPara)); }
public void deletedata(En_Diem en) { dal.deletedata(en); }
public void updatedata(En_Diem en) { dal.updatedata(en); }
public void insertdata(En_Diem en) { dal.insertdata(en); }