示例#1
0
        public EO_MenuStructDataTable EoMenuStruct_getList(EoMenuStructQryModel qm)
        {
            if (!qm.Q_Code.isNullOrEmpty())
            {
                qm.Q_Code = qm.Q_Code.ToUpper();
            }

            var dt = NsDmHelper.EO_MenuStruct
                     .selectAll(t => t.AllExt)
                     .where (t =>
                             t.EOMS_ClickMode == qm.Q_ClickMode.toConstOpt1()
                             & t.EOMS_NodeType_XX == qm.Q_NodeType_XX.toConstOpt1()
                             & t.EOMS_Viewable == qm.Q_Viewable.toConstOpt1()
                             & t.EOMS_Name.contains(qm.Q_Name.toConstOpt1())
                             & t.EOMS_Code.contains(qm.Q_Code.toConstOpt1())
                             )
                     .query();

            return(dt);
        }
        public ActionResult List(FormCollection collection, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
        {
            //查詢參數
            var qm    = new EoMenuStructQryModel();
            var isOK  = this.TryUpdateModel(qm);
            var token = collection["__RequestVerificationToken"];

            var dt = EoDataService.Instance.EoMenuStruct_getList(qm);

            //排序
            var dtSorted = dt.sort(jtSorting);

            if (Request.IsAjaxRequest())
            {
                return(converToJTableSource(dtSorted, jtStartIndex, jtPageSize));
            }
            else
            {
                return(View(dt));
            }
        }