/// <summary>
        /// 分页获取预约订房信息
        /// </summary>
        /// <param name="criteria"></param>
        /// <returns></returns>
        public IList<SaleInfo> GetPageSaleInfos(int pageIndex,int pageSize,SaleInfo SaleInfo)
        {
            Hashtable hashTable = new Hashtable();
            int start = (pageIndex - 1) * pageSize;
            hashTable.Add("start", start);
            hashTable.Add("pageSize", pageSize);
            hashTable.Add("saleinfo", SaleInfo);
            var reValue = SqlMapper.QueryForList<SaleInfo>("GetPageSaleInfos", hashTable);

            logger.Debug("GetPageSaleInfos:" + (reValue == null ? 0 : reValue.Count));
            return reValue;
        }
 //
 // GET: /SaleInfo/
 public ActionResult Index(String id)
 {
     if (this.m_pagination == null)
     {
         this.m_pagination = new Pagination();
     }
     SaleInfo SaleInfo = new SaleInfo();
     if (id != null)
         this.m_pagination.PageIndex = int.Parse(id);
     SaleInfo.SitePath = Request.Url.Host;
     this.m_pagination.TotalCount = SaleInfoDao.Instance.GetTotalCount(SaleInfo);
     IList<SaleInfo> lstSaleInfos = SaleInfoDao.Instance.GetPageSaleInfos(this.m_pagination.PageIndex, this.m_pagination.PageSize, SaleInfo);
     ViewData["lstSaleInfos"] = lstSaleInfos;
     ViewData["pagination"] = this.m_pagination;
     return View();
 }
 public ActionResult Submit(FormCollection form)
 {
     SaleInfo SaleInfo = new SaleInfo();
     SaleInfo.Place = form["Place"];
     SaleInfo.Name = form["Name"];
     SaleInfo.Tel = form["Tel"];
     float fPrice = 0;
     float.TryParse(form["Price"], out fPrice);
     SaleInfo.Price = fPrice;
     SaleInfo.Product = form["Product"];
     SaleInfo.SitePath = Request.Url.Host;
     SaleInfo.SubTime = DateTime.Now;
     bool result = SaleInfoDao.Instance.InsertSaleInfo(SaleInfo);
     if (result)
         return Redirect("/SaleInfo/Index/1");
     else
         return Redirect("/SaleInfo/Index/1");
 }
 public int GetTotalCount(SaleInfo SaleInfo)
 {
     int totalCount=0;
     Hashtable hashTable = new Hashtable();
     hashTable.Add("saleinfo", SaleInfo);
     var reValue=SqlMapper.QueryForObject("GetSaleInfoTotalCount", hashTable);
     totalCount =int.Parse(reValue.ToString());
     return totalCount;
 }
 /// <summary>
 /// 获取手术代码
 /// </summary>
 /// <param name="criteria"></param>
 /// <returns></returns>
 public IList<SaleInfo> GetSaleInfos(SaleInfo SaleInfo)
 {
     var reValue = SqlMapper.QueryForList<SaleInfo>("GetSaleInfos", SaleInfo);
     logger.Debug("GetSaleInfos:" + (reValue == null ? 0 : reValue.Count));
     return reValue;
 }
 /// <summary>
 /// 插入
 /// </summary>
 /// <param name="checkPatientModel"></param>
 /// <returns></returns>
 public bool InsertSaleInfo(SaleInfo SaleInfo)
 {
     try
     {
        SqlMapper.Insert("InsertSaleInfo", SaleInfo);
        return true;
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString());
         return false;
     }
 }