예제 #1
0
        //
        // GET: /EnrollAudit/

        public ActionResult EnrollAuditList()
        {
            EnrollAuditListViewModel   model  = new EnrollAuditListViewModel();
            EnrollAuditListSearchModel search = new EnrollAuditListSearchModel();

            search.ApStateID      = "5";                                           //因为只查待审核的
            model.EnrollAuditList = EnrollAuditListData.GetEnrollAuditLis(search); //业务层获取底层方法,返回数据

            return(View(model));
        }
예제 #2
0
        /// <summary>
        /// 返回所有的市场资源/预约单信息   ,EnrollAuditList页面的 微信页面
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public static PagedList <vw_Appointment> GetEnrollAuditLis(EnrollAuditListSearchModel search)
        {
            string table = string.Empty, fields = string.Empty, orderby = string.Empty, where = string.Empty; //定义结构

            fields  = @"  * ";                                                                                //输出字段
            table   = @" vw_Appointment ";                                                                    //表或者视图
            orderby = "CreateTime desc";                                                                      //排序信息
            StringBuilder sb = new StringBuilder();                                                           //构建where条件

            sb.Append(" 1=1 ");
            if (!string.IsNullOrWhiteSpace(search.ApStateID)) //判断值。
            {
                sb.AppendFormat(" and ApStateID = {0} ", search.ApStateID);
            }

            where = sb.ToString();
            int allcount = 0;
            var list     = CommonPage <vw_Appointment> .GetPageList(
                out allcount, table, fields : fields, where : where.Trim(),
                orderby : orderby, pageindex : search.CurrentPage, pagesize : search.PageSize, connect : DBKeys.PRX);

            return(new PagedList <vw_Appointment>(list, search.CurrentPage, search.PageSize, allcount));
        }