Ejemplo n.º 1
0
        public ConfigListViewModel QueryConfigList(AppConfigs.BatchType type, int status, int pg)
        {
            string w = "BatchType=" + (int)type + (status == -1? null: " and BatchCardStatus=" + status);
            int    t = 0;

            return(new ConfigListViewModel()
            {
                state = (int)status,
                configs = QueryWithCardCount(w, null, pg, out t, 20),
                ttlRecord = t,
                Pager = Common.Utility.HtmlPager(10, pg, t, 20)
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// get config list of certain type---ajax
        /// </summary>
        /// <param name="cardType"></param>
        /// <param name="state"></param>
        /// <param name="pg"></param>
        /// <returns></returns>
        public ActionResult _ConfigTable(AppConfigs.BatchType cardType, int state = -1, int pg = 1)
        {
            int    i;
            string whr = "BatchType=" + (int)cardType ?? 1.ToString();

            if (state != -1)
            {
                whr += " and BatchCardStatus=" + state;
            }
            var mdl = _financeSv.QueryWithCardCount(whr, null, pg, out i, 10);

            return(PartialView(mdl));
        }