public IEnumerable <Vcr> GetVcrs(string k, out int ttl, int pg) { IPager <Vcr> vcrbBLL = new TrainVcrBLL(); string whr = string.Format("LessonId='{0}' and videopath is not null", k); var vcrmdls = vcrbBLL.Query(whr, null, pg, out ttl); return(vcrmdls); }
/// <summary> /// ajax bulk del video record. /// </summary> /// <param name="vids"></param> /// <returns></returns> public ActionResult DelMany(string[] vids) { int vcr = 0; int files = 0; int tsts = 0; if (vids.Count() > 0) { IEnumerable <VcrFile> mdl; IEnumerable <VcrTest> tst; for (int s = 0; s < vids.Count(); s++) { mdl = _trainVcrBll.vcrFiles(vids[s]); if (mdl != null && mdl.Count() > 0) { mdl.ToList().ForEach(a => a.DelFile()); files = new VcrFileBLL().BulkDel(mdl.Select(a => a.Id).ToList()); } files = mdl == null?0:mdl.Count(); tst = _trainVcrBll.vcrTests(vids[s]); if (tst != null && tst.Count() > 0) { tsts = new VcrTestBLL().BulkDel(tst.Select(a => a.Id).ToList()); } bool b = new TrainVcrBLL().DelVcrVideo(vids[s]); vcr += _trainVcrBll.Del(vids[s]) == AppConfigs.OperResult.success ?1:0; } } return(Json(new { v = vcr, f = files, t = tsts }, JsonRequestBehavior.AllowGet)); }
public TrainVcrController() { _trainVcrBll = new TrainVcrBLL(); }
public BasicLessonSvc() { _lessonBLL = new LessonBLL(); _vcrBLL = new TrainVcrBLL(); }
public VcrSvc() { trainVcrBLL = new TrainVcrBLL(); lessonBLL = new LessonBLL(); }