Exemple #1
0
        public void CreateCauHoi1(string NoiDung, int mucDo, string maCauHoi)
        {
            CauHoi ch = new CauHoi();

            ch.ID        = Guid.NewGuid().ToString();
            ch.NoiDung   = NoiDung;
            ch.MucDo     = mucDo;
            ch.MaCauHoi  = maCauHoi;
            ch.InUsed    = true;
            ch.IsDeleted = false;
            db.CauHois.InsertOnSubmit(ch);
            db.SubmitChanges();
        }
Exemple #2
0
        public void CreateCauHoi(string idMon, string idLoaiCauHoi, string tieuDe, string NoiDung, int mucDo, string idChuong, string idBai, string maCauHoi, string idacc)
        {
            CauHoi ch = new CauHoi();

            ch.ID            = Guid.NewGuid().ToString();
            ch.ID_Mon        = idMon;
            ch.ID_LoaiCauHoi = idLoaiCauHoi;
            ch.TieuDe        = tieuDe;
            ch.NoiDung       = NoiDung;
            ch.MucDo         = mucDo;
            ch.ID_Chuong     = idChuong;
            ch.ID_Bai        = idBai;
            ch.MaCauHoi      = maCauHoi;
            ch.ID_Account    = idacc;
            ch.InUsed        = true;
            ch.IsDeleted     = false;
            db.CauHois.InsertOnSubmit(ch);
            db.SubmitChanges();
        }
Exemple #3
0
        public CauHoi GetByID(string ID)
        {
            CauHoi lst = db.CauHois.SingleOrDefault(p => p.ID == ID);

            return(lst);
        }