示例#1
0
        /// <summary>
        /// 返回所有的市场资源/预约单信息   ,EnrollAuditList页面的 微信页面
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public static PagedList <vw_EnrollAudit> GetEnrollAuditInfo(EnrollAuditInfoSearchModel search)
        {
            string table = string.Empty, fields = string.Empty, orderby = string.Empty, where = string.Empty; //定义结构

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

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

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

            return(new PagedList <vw_EnrollAudit>(list, search.CurrentPage, search.PageSize, allcount));
        }
示例#2
0
        //


        public ActionResult EnrollAuditInfo(string APID)
        {
            EnrollAuditInfoViewModel   model  = new EnrollAuditInfoViewModel();
            EnrollAuditInfoSearchModel search = new EnrollAuditInfoSearchModel();// 页面的搜索条件

            search.StateID            = "2";
            search.DiscountID         = "-1";
            search.APID               = APID;                                           //根据预约单号
            model.EnrollAuditInfoList = EnrollAuditInfoData.GetEnrollAuditInfo(search); //业务层获取底层方法,返回数据

            return(View(model));
        }