public static int countDiem(string strMaSV) { dataProvider = new CDataProvider_DAL(); string strCountDiem = "select count(*) from DiemSo"; string error = ""; int iCount = dataProvider.executeScalar(System.Data.CommandType.Text, strCountDiem, ref error); return(iCount); }
public static int countHoatDong() { dataProvider = new CDataProvider_DAL(); string strCountHoatDong = "select count(*) from HoatDong"; string strErr = ""; int iCount = (int)dataProvider.executeScalar(CommandType.Text, strCountHoatDong, ref strErr); return(iCount); }
public static bool checkAccount(string strTaiKhoan, string strMatKhau) { dataProvider = new CDataProvider_DAL(); string strCountCmd = string.Format("select count(*) from AccountSinhVien where MaSV='{0}' and PasswordSV=N'{1}'", strTaiKhoan, strMatKhau); string strError = ""; int iCountAccount = (int)dataProvider.executeScalar(CommandType.Text, strCountCmd, ref strError); if (iCountAccount == 0) { return(false); } return(true); }