/// <summary>
 /// Loads Paper by the id parameter
 /// </summary>
 /// <param name="paperId">Primary Key of Paper table</param>
 /// <returns>Paper entity</returns>
 public static Paper Load(int paperId)
 {
     SearchPaper search
         = new SearchPaper
             {
                 PaperId = paperId
             };
     return Search(search).FirstOrDefault();
 }
Example #2
0
        /// <summary>
        /// Searches for Paper
        /// </summary>
        /// <param name="item" />
        /// <returns>An IEnumerable set of Paper</returns>
        public static IEnumerable<Paper> Search(SearchPaper item)
        {
            List<SqlParameter> parameters
                = new List<SqlParameter>
                    {
                        new SqlParameter("@PaperId", item.PaperId),
                        new SqlParameter("@UserId", item.UserId),
                        new SqlParameter("@PaperCategoryId", item.PaperCategory),
                        new SqlParameter("@Name", item.Name),
                        new SqlParameter("@Description", item.Description),
                        new SqlParameter("@Author", item.Author)
                    };

            DataSet set = DataManager.ExecuteProcedure(ConferencePlusConnectionString, "Paper_Get", parameters);
            IEnumerable<DataRow> dataRows = set.GetRowsFromDataSet();
            return ConvertToEntityObject(dataRows);
        }
 /// <summary>
 /// Searches for Paper
 /// </summary>
 /// <param name="search" />
 /// <returns>An IEnumerable set of Paper</returns>
 public static IEnumerable<Paper> Search(SearchPaper search)
 {
     return PaperDao.Search(search);
 }