Esempio n. 1
0
        public virtual List <Notice> GetNoticeList(GetNoticeListReq parame, ref int totalSize)
        {
            DbCommand cmd = GetStoredProcCommand("P_Api_GetNoticeList");

            AddInParameter(cmd, "@userId", DbType.Int32, parame.userId);
            AddInParameter(cmd, "@pi", DbType.Int32, parame.pi);
            AddInParameter(cmd, "@ps", DbType.Int32, parame.ps);
            AddOutParameter(cmd, "@totalSize", DbType.Int32, 4);
            DataSet ds = ExecuteDataSet(cmd);

            int.TryParse(cmd.Parameters["@totalSize"].Value.ToString(), out totalSize);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                return(BuildToModelList(ds.Tables[0].Select()));
            }
            return(new List <Notice>());
        }
Esempio n. 2
0
 public virtual List <Notice> GetNoticeList(GetNoticeListReq parame, ref int totalSize)
 {
     return(noticeDal.GetNoticeList(parame, ref totalSize));
 }