示例#1
0
        }//end

        //可以去掉system.data引用
        public List<EnglishContent> GetContentByLesson(EnglishLesson lesson)
        {
            string sql = string.Concat("SELECT * FROM EnglishContent WHERE EnglishLessonID = '", lesson.ID, "'");
            DataSet ds = SqlHelper.GetDataSet(sql);
            List<EnglishContent> wordList = dao.ConvertToObject(ds.Tables[0]);
            return wordList;
        }//end
示例#2
0
        public ActionResult AddLesson(EnglishLesson lesson, string password)
        {
            if (lesson == null || !QueueSearch.IsAdmin(HttpContext, db))
                return RedirectToAction("Index");

            if (ModelState.IsValid)
            {
                englishBLL.AddLesson(lesson);
                return RedirectToAction("Index");
            }

            return View(lesson);
        }//end
示例#3
0
 public int DeleteLessonById(EnglishLesson lessonList)
 {
     return dao.DeleteById(lessonList);
 }//end
示例#4
0
 public int AlertLesson(EnglishLesson lesson)
 {
     return dao.UpdateById(lesson);
 }
示例#5
0
 public int AddLesson(EnglishLesson lesson)
 {
     return dao.Save(lesson);
 }//end
 public Boolean AlertLesson(EnglishLesson lesson)
 {
     return lessonServer.AlertLesson(lesson) > 0;
 }// end
 public Boolean AddLesson(EnglishLesson lesson)
 {
     return lessonServer.AddLesson(lesson) > 0;
 }
示例#8
0
        }//end

        public ActionResult AlertLesson(int id)
        {
            if (id == 0 || !QueueSearch.IsAdmin(HttpContext, db))
                return RedirectToAction("Index");

            List<EnglishLesson> list = englishBLL.GetLessonById(id);
            EnglishLesson lesson = new EnglishLesson();
            if (list.Count > 0)
            {
                lesson = list[0];
            }

            return View(lesson);
        }//end
示例#9
0
        public ActionResult AlertLesson(EnglishLesson lesson, string password)
        {
            if (lesson == null || !QueueSearch.IsAdmin(HttpContext, db))
                return RedirectToAction("Index");

            englishBLL.AlertLesson(lesson);
            //EnglishLesson les= db.EnglishLesson.Where(p => p.ID.Equals(lesson.ID)).FirstOrDefault();
            //les.LessonDescription = lesson.LessonDescription;
            //les.LessonNotesLink = lesson.LessonNotesLink;
            //les.LessonText = lesson.LessonText;
            //db.SaveChanges();
            return RedirectToAction("Index");
        }//end