Пример #1
0
 public List<FeedBack> GetAllFeedBack()
 {
     List<FeedBack> list = new List<FeedBack>();
     using (SqlCommand cmd = GetCommand("getAllFeedBack", CommandType.StoredProcedure))
     {
         FeedBack feedBack = new FeedBack();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(feedBack.FeedBackIDatareader(dr));
                 }
             }
         }
         feedBack = null;
     }
     return list;
 }
Пример #2
0
 public List<FeedBack> GetFeedBackByID(string id)
 {
     List<FeedBack> list = new List<FeedBack>();
     using (SqlCommand cmd = GetCommand("getFeedBackByID", CommandType.StoredProcedure))
     {
         AddParameter(cmd, "@ID", Convert.ToInt32(id));
         FeedBack feedBack = new FeedBack();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(feedBack.FeedBackIDatareader(dr));
                 }
             }
         }
         feedBack = null;
     }
     return list;
 }
Пример #3
0
 public List<FeedBack> SearchFeedBackByName(string name)
 {
     List<FeedBack> list = new List<FeedBack>();
     using (SqlCommand cmd = GetCommand("SearchFeedBackByName", CommandType.StoredProcedure))
     {
         AddParameter(cmd, "@FullName", name);
         FeedBack feedBack = new FeedBack();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(feedBack.FeedBackIDatareader(dr));
                 }
             }
         }
         feedBack = null;
     }
     return list;
 }