/// <summary> /// 获取采购单总页数 /// </summary> /// <returns></returns> public int GetPNTotalPage() { try { StringBuilder strSql = new StringBuilder(); strSql.Append(@"select count(distinct VID) from UnitPrice where HasPrice =0 "); int count = (int)dao.ExecuteScalar(strSql.ToString(), new Dictionary <string, object>()); return((int)(Math.Ceiling(count / 20.0))); } catch (Exception ex) { XphpTool.CreateErrorLog(ex.ToString()); return(-1); } }