/// <summary>
        /// 
        /// </summary>
        /// <param name="count"></param>
        /// <param name="sTime"></param>
        /// <param name="eTime"></param>
        /// <returns></returns>
        public List<HairShopComment> GetHairShopCommentsByTimeZone(int count, string sTime, string eTime)
        {
            List<HairShopComment> list = new List<HairShopComment>();

            string commText = string.Empty;
            switch (count)
            {
                case 0:
                    commText = "select * from HairShopComment where HairShopCommentCreateTime<'"+eTime+"' and HairShopCommentCreateTime>'"+sTime+"' order by HairShopCommentID desc";
                    break;
                default:
                    commText = "select top " + count.ToString() + " * from HairShopComment where HairShopCommentCreateTime<'" + eTime + "' and HairShopCommentCreateTime>'" + sTime + "' order by HairShopCommentID desc";
                    break;
            }

            using (SqlConnection conn = new SqlConnection(DataHelper2.SqlConnectionString))
            {
                {
                    using (SqlCommand comm = new SqlCommand())
                    {
                        comm.Connection = conn;
                        comm.CommandText = commText;
                        conn.Open();

                        using (SqlDataReader sdr = comm.ExecuteReader())
                        {
                            while (sdr.Read())
                            {
                                HairShopComment hairShopComment = new HairShopComment();

                                hairShopComment.CommentCreateTime = Convert.ToDateTime(sdr["HairShopCommentCreateTime"].ToString());
                                hairShopComment.CommentID = int.Parse(sdr["HairShopCommentID"].ToString());
                                hairShopComment.CommentText = sdr["HairShopCommentText"].ToString();
                                hairShopComment.HairShopID = int.Parse(sdr["HairShopID"].ToString());
                                hairShopComment.UserAddress = sdr["UserAddress"].ToString();
                                hairShopComment.UserID = int.Parse(sdr["UserID"].ToString());
                                hairShopComment.UserName = sdr["UserName"].ToString();
                                hairShopComment.IsGood = Convert.ToBoolean(sdr["IsGood"].ToString());

                                list.Add(hairShopComment);
                            }
                        }
                    }
                }
            }

            return list;
        }
        /// <summary>
        /// ͨ��USERID��ȡ�������������б�
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="count"></param>
        /// <param name="orderKey">�û�����KEY ʱ�����򣬺�����������������</param>
        /// <returns></returns>
        public List<HairShopComment> GetHairShopCommentsByUserID(int userID, int count, OrderKey ok)
        {
            List<HairShopComment> list = new List<HairShopComment>();

            string orderKey = " order by ";
            switch (ok)
            {
                case OrderKey.Good:
                    orderKey += "IsGood desc";
                    break;
                case OrderKey.ID:
                    orderKey += "HairShopID desc";
                    break;
                case OrderKey.Time:
                    orderKey += "HairShopCommentCreateTime desc";
                    break;
                default:
                    orderKey += "HairShopCommentID desc";
                    break;
            }
            string commText = string.Empty;
            switch (count)
            {
                case 0:
                    commText = "select * from HairShopComment where UserID=" + userID.ToString() + orderKey;
                    break;
                default:
                    commText = "select top " + count.ToString() + " * from HairShopComment where UserID=" + userID.ToString() + orderKey;
                    break;
            }

            using (SqlConnection conn = new SqlConnection(DataHelper2.SqlConnectionString))
            {
                {
                    using (SqlCommand comm = new SqlCommand())
                    {
                        comm.Connection = conn;
                        comm.CommandText = commText;
                        conn.Open();

                        using (SqlDataReader sdr = comm.ExecuteReader())
                        {
                            while (sdr.Read())
                            {
                                HairShopComment hairShopComment = new HairShopComment();

                                hairShopComment.CommentCreateTime = Convert.ToDateTime(sdr["HairShopCommentCreateTime"].ToString());
                                hairShopComment.CommentID = int.Parse(sdr["HairShopCommentID"].ToString());
                                hairShopComment.CommentText = sdr["HairShopCommentText"].ToString();
                                hairShopComment.HairShopID = int.Parse(sdr["HairShopID"].ToString());
                                hairShopComment.UserAddress = sdr["UserAddress"].ToString();
                                hairShopComment.UserID = int.Parse(sdr["UserID"].ToString());
                                hairShopComment.UserName = sdr["UserName"].ToString();
                                hairShopComment.IsGood = Convert.ToBoolean(sdr["IsGood"].ToString());

                                list.Add(hairShopComment);
                            }
                        }
                    }
                }
            }

            return list;
        }
        /// <summary>
        /// ���������� ��ӣ�ɾ�����޸�
        /// </summary>
        /// <param name="hairShopComment"></param>
        /// <param name="ua"></param>
        /// <returns></returns>
        public bool HairShopCommentCreateDeleteUpdate(HairShopComment hairShopComment, UserAction ua)
        {
            bool result = false;

            string commandText = string.Empty;
            switch (ua)
            {
                case UserAction.Create:
                    commandText = "insert into HairShopComment(HairShopCommentText,UserID,UserName,UserAddress,IsGood,HairShopCommentCreateTime,HairShopID) values('" + hairShopComment.CommentText + "'," + hairShopComment.UserID.ToString() + ",'" + hairShopComment.UserName + "','" + hairShopComment.UserAddress + "'," + hairShopComment.IsGood.CompareTo(false).ToString() + ",'" + hairShopComment.CommentCreateTime.ToString() + "'," + hairShopComment.HairShopID.ToString() + ")";
                    break;
                case UserAction.Delete:
                    commandText = "delete from HairShopComment where HairShopCommentID = " + hairShopComment.CommentID.ToString();
                    break;
                case UserAction.Update:
                    commandText = "update HairShopComment set HairShopCommentText ='" + hairShopComment.CommentText + "',UserID=" + hairShopComment.UserID.ToString() + ",UserName='******',UserAddress='" + hairShopComment.UserAddress + "',IsGood=" + hairShopComment.IsGood.CompareTo(false).ToString() + ",HairShopCommentCreateTime='" + hairShopComment.CommentCreateTime.ToString() + "',HairShopID=" + hairShopComment.HairShopID.ToString() + " where HairShopCommentID=" + hairShopComment.CommentID.ToString();
                    break;
            }
            using (SqlConnection conn = new SqlConnection(DataHelper2.SqlConnectionString))
            {
                using (SqlCommand comm = new SqlCommand())
                {
                    comm.CommandText = commandText;
                    comm.Connection = conn;
                    conn.Open();
                    try
                    {
                        comm.ExecuteNonQuery();
                        result = true;
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }

                }
            }

            return result;
        }