Beispiel #1
0
        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));
        }
Beispiel #2
0
        private void frmDiem_Load(object sender, EventArgs e)
        {
            en = new En_Diem();

            NapLop();
            NapSinhVien();
            NapMonHoc();
            NapGiaoVien();
            NapLoaiDiem();
            NapTrangThai();
            NapDuLieu();

            EvenButton(0);
            EnableOrDisable(true);
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        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));
        }
Beispiel #5
0
 public void deletedata(En_Diem en)
 {
     dal.deletedata(en);
 }
Beispiel #6
0
 public void updatedata(En_Diem en)
 {
     dal.updatedata(en);
 }
Beispiel #7
0
 public void insertdata(En_Diem en)
 {
     dal.insertdata(en);
 }