/// <summary>
        /// 列表数据获取
        /// </summary>
        /// <param name="page"></param>
        /// <param name="sid"></param>
        /// <returns></returns>
        public List<ProInvoiceModel> DataGet(int page,QueryModel queryModel)
        {
            //分页助手
            PageHelper parameter = GetPageParameterInfo();
            //ViewBag.SearchModel = model;
            ViewBag.PageParameter = parameter;
            string sid = queryModel.Sid;
            DataTable dt = new DataTable();
            List<ProInvoiceModel> list = new List<ProInvoiceModel>();
            using (SqlHelper sqlhelper = new SqlHelper())
            {
                string sql = "select * from proinvoice where 1=1 ";
                if (!string.IsNullOrWhiteSpace(sid)) sql += " and sid like '" + sid + "%'";
                if (!string.IsNullOrWhiteSpace(queryModel.Randnum)) sql += " and randnum like '" + queryModel.Randnum + "%'";
                parameter.SqlScript =sql;
                parameter.OrderBy = string.IsNullOrWhiteSpace(parameter.OrderBy) ? " AddTime desc " : parameter.OrderBy;
                parameter.RecordCount =
                    TypeParse.StrToInt(
                        sqlhelper.ExecuteScalar(string.Format("select count(1) from {0}", parameter.SqlScript)), 0);
                dt = sqlhelper.ExecuteSql(parameter.ToString());
                if (dt == null) return null;
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        ProInvoiceModel model = new ProInvoiceModel();
                        model.SID = (int) dt.Rows[i]["sid"];
                        model.ReceiveMan = dt.Rows[i]["receiveman"].ToString();
                        model.AddTime = (DateTime) dt.Rows[i]["addtime"];
                        model.BusinessId = (int) dt.Rows[i]["BusinessId"];
                        model.InvoiceTypeId = (int) dt.Rows[i]["InvoiceTypeId"];
                        model.Randnum = dt.Rows[i]["Randnum"].ToString();
                        model.Randint = (int) dt.Rows[i]["Randint"];
                        list.Add(model);
                    }
                }

            }
            return list;
        }
 /// <summary>
 /// 分页数据获取
 /// </summary>
 /// <param name="page"></param>
 /// <param name="sid"></param>
 public void PageGet(int page,QueryModel model)
 {
     //分页助手
     PageHelper parameter = GetPageParameterInfo();
     ViewBag.PageParameter = parameter;
     string sid = model.Sid;
     DataTable dt = new DataTable();
     List<ProInvoiceModel> list = new List<ProInvoiceModel>();
     using (SqlHelper sqlhelper = new SqlHelper())
     {
         string sql = "select * from proinvoice";
         if (!string.IsNullOrWhiteSpace(sid)) sql += " where sid like '" + sid + "%'";
         if (!string.IsNullOrWhiteSpace(model.Randnum)) sql += " and randnum like '" + model.Randnum + "%'";
         parameter.SqlScript = sql;
         parameter.OrderBy = string.IsNullOrWhiteSpace(parameter.OrderBy) ? " AddTime desc " : parameter.OrderBy;
         parameter.RecordCount =
             TypeParse.StrToInt(
                 sqlhelper.ExecuteScalar(string.Format("select count(1) from {0}", parameter.SqlScript)), 0);
     }
 }
 //
 // GET: /Pagewidget/
 public ActionResult Index(QueryModel model,int page = 1)
 {
     ViewBag.queryModel = model;
     if (string.IsNullOrWhiteSpace(Request.Form["idCard"])) ViewBag.idCard = string.Empty;
     else ViewBag.idCard = Request.Form["idCard"] + GetValidateCode(Request.Form["idCard"]);
     return View(DataGet(page, model));
 }