Пример #1
0
 public static bool UpdateMonHoc(string x_strMaMonHoc, string x_strTenMonHoc)
 {
     if (DataProvider.ConnectDatabase())
     {
         return(DataProvider.ExecSQLQuery(string.Format("UPDATE MONHOC SET TENMH = N'{0}' WHERE MAMH = '{1}'", x_strTenMonHoc, x_strMaMonHoc)));
     }
     return(false);
 }
Пример #2
0
 public static bool DeleteMonHoc(string x_strMaMonHoc)
 {
     if (DataProvider.ConnectDatabase())
     {
         return(DataProvider.ExecSQLQuery(string.Format("DELETE FROM MONHOC WHERE MAMH = '{0}'", x_strMaMonHoc)));
     }
     return(false);
 }
Пример #3
0
 public static bool InsertMonHoc(string x_strMaMonHoc, string x_strTenMonHoc)
 {
     if (DataProvider.ConnectDatabase())
     {
         return(DataProvider.ExecSQLQuery(string.Format("INSERT INTO MONHOC(MAMH, TENMH) VALUES('{0}', N'{1}')", x_strMaMonHoc, x_strTenMonHoc)));
     }
     return(false);
 }
Пример #4
0
 public static bool UpdateLop(LopDTO lop)
 {
     if (DataProvider.ConnectDatabase())
     {
         string str = "update LOP set TENLOP = N'" + lop.TENLOP + "', MAKH = '" + lop.MAKH + "' where MALOP = '" + lop.MALOP + "'";
         return(DataProvider.ExecSQLQuery(str));
     }
     return(false);
 }
Пример #5
0
 public static bool DeleteLop(string malop)
 {
     if (DataProvider.ConnectDatabase())
     {
         string str = "delete from LOP where MALOP = '" + malop + "'";
         return(DataProvider.ExecSQLQuery(str));
     }
     return(false);
 }
Пример #6
0
 public static bool AddLop(LopDTO lop)
 {
     if (DataProvider.ConnectDatabase())
     {
         string str = "insert into LOP(MALOP,TENLOP,MAKH) values ('" + lop.MALOP + "',N'" + lop.TENLOP + "','" + lop.MAKH + "')";
         return(DataProvider.ExecSQLQuery(str));
     }
     return(false);
 }
Пример #7
0
 public static bool DeleteSinhVien(string masv)
 {
     if (DataProvider.ConnectDatabase())
     {
         string str = "delete from SINHVIEN where MASV = '" + masv + "'";
         return(DataProvider.ExecSQLQuery(str));
     }
     return(false);
 }
Пример #8
0
 public static bool UpdateSinhVien(SinhVienDTO sv)
 {
     if (DataProvider.ConnectDatabase())
     {
         string str = "update SINHVIEN set HO = N'" + sv.HO + "', TEN = N'" + sv.TEN + "',MALOP = '" + sv.MALOP + "' ," +
                      "PHAI = '" + sv.PHAI + "',NGAYSINH = '" + sv.NGAYSINH + "',NOISINH = N'" + sv.NOISINH + "',DIACHI = N'" + sv.DIACHI + "'," +
                      "NGHIHOC = '" + sv.NGHIHOC + "',GHICHU = N'" + sv.GHICHU + "' where MASV = '" + sv.MASV + "'";
         return(DataProvider.ExecSQLQuery(str));
     }
     return(false);
 }
Пример #9
0
 public static bool AddSinhVien(SinhVienDTO sv)
 {
     if (DataProvider.ConnectDatabase())
     {
         string str = "insert into SINHVIEN(MASV,HO,TEN,MALOP,PHAI,NGAYSINH,NOISINH,DIACHI,NGHIHOC,GHICHU) " +
                      "values('" + sv.MASV + "',N'" + sv.HO + "',N'" + sv.TEN + "','" + sv.MALOP + "','" + sv.PHAI + "'," +
                      "'" + sv.NGAYSINH + "',N'" + sv.NOISINH + "',N'" + sv.DIACHI + "','" + sv.NGHIHOC + "',N'" + sv.GHICHU + "')";
         return(DataProvider.ExecSQLQuery(str));
     }
     return(false);
 }