예제 #1
0
        // 焦點專欄 - 列表
        public ActionResult EducationList(int?eduTypeID, int?page)
        {
            if (!eduTypeID.HasValue)
            {
                return(View());
            }


            //======語系取得========
            string langCd = GetLang();
            //======================

            EducationListFilter filter = new EducationListFilter()
            {
                CurrentPage = page ?? 1,
                LangCode    = langCd
            };

            eduTypeID = eduTypeID ?? 1;

            EducationRepository repo  = new EducationRepository();
            EducationResult     mdoel = repo.GetList((int)eduTypeID, filter);

            GetLang();

            return(View(mdoel));
        }
예제 #2
0
        public IEnumerable <Education> GetEducationByUser(string iduser)
        {
            EducationRepository <Education> edurepo = new EducationRepository <Education>();

            return(edurepo.GetList(" Where UserId = '" + iduser + "'"));
        }