internal UserCommentsEntity GetUserCommentsById(int commentId) { UserCommentsEntity results = new UserCommentsEntity(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "dnb.GetUserCommentsById"; sproc.StoredProceduresParameter.Add(GetParam("@CommentId", commentId.ToString(), SQLServerDatatype.IntDataType)); DataTable dt; dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, ""); if (dt != null && dt.Rows.Count > 0) { UserCommentsAdapter ta = new UserCommentsAdapter(); foreach (DataRow rw in dt.Rows) { results = ta.AdaptItem(rw); } } } catch (Exception) { throw; } return(results); }
internal List <UserCommentsEntity> GetUserCommentsByType(string CommentType) { List <UserCommentsEntity> results = new List <UserCommentsEntity>(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "dnb.GetUserCommentsByType"; sproc.StoredProceduresParameter.Add(GetParam("@CommentType", CommentType, SQLServerDatatype.VarcharDataType)); DataTable dt = new DataTable(); dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "", DBIntent.Read.ToString()); if (dt != null && dt.Rows.Count > 0) { results = new UserCommentsAdapter().Adapt(dt); } return(results); } catch (Exception) { throw; } }
internal List <UserCommentsEntity> GetAllUserCommentsListPaging() { List <UserCommentsEntity> results = new List <UserCommentsEntity>(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "dnb.GetUserCommentsListPaging"; string outParam = ""; DataTable dt; dt = sql.ExecuteDataTableWithOutputParam(CommandType.StoredProcedure, sproc, out outParam, ""); if (dt != null && dt.Rows.Count > 0) { results = new UserCommentsAdapter().Adapt(dt); } } catch (Exception) { throw; } return(results); }