Beispiel #1
0
 // thêm câu hỏi thường gặp:
 public int FAQ_Them(string cauhoi, string cautraloi)
 {
     DAOFAQ CauHoiThuongGap = new DAOFAQ();
     if (CauHoiThuongGap.ThemFAQ(cauhoi, cautraloi) == 1)
     {
         return 1;
     }
     else
     {
         return 0;
     }
 }
Beispiel #2
0
 // xóa câu hỏi thường gặp:
 public int FAQ_Xoa(int macauhoi)
 {
     DAOFAQ CauHoiThuongGap = new DAOFAQ();
     if (CauHoiThuongGap.XoaFAQ(macauhoi) == 1)
     {
         return 1;
     }
     else
     {
         return 0;
     }
 }
Beispiel #3
0
 // sửa câu hỏi thường gặp:
 public int FAQ_Sua(int macauhoi, string cauhoi, string cautraloi)
 {
     DAOFAQ CauHoiThuongGap = new DAOFAQ();
     if (CauHoiThuongGap.SuaFAQ(macauhoi, cauhoi, cautraloi) == 1)
     {
         return 1;
     }
     else
     {
         return 0;
     }
 }
Beispiel #4
0
 // lấy câu trả lời của câu hỏi được chọn:
 public CAUHOITHUONGGAP TimKiem(int maCauHoi)
 {
     DAOFAQ CauHoiThuongGap = new DAOFAQ();
     return CauHoiThuongGap.TimKiem(maCauHoi);
 }
Beispiel #5
0
 // lấy tất cả câu hỏi thường gặp:
 public List<CAUHOITHUONGGAP> LayDanhSachTatCaCauHoiThuongGap()
 {
     DAOFAQ CauHoiThuongGap = new DAOFAQ();
     return CauHoiThuongGap.getAll_FAQ();
 }