Esempio n. 1
0
        public static int GetFeedBacksCount(string beginDate, string endDate, int status)
        {
            string sqlWhere = "1=1";

            if (status != -1)
            {
                sqlWhere += " and status=" + status;
            }

            if (!string.IsNullOrEmpty(beginDate))
            {
                sqlWhere += " and createtime>='" + beginDate + "'";
            }

            if (!string.IsNullOrEmpty(endDate))
            {
                sqlWhere += " and createtime<='" + DateTime.Parse(endDate).AddDays(1).ToString("yyyy-MM-dd") + "'";
            }

            int result = Convert.ToInt32(CommonBusiness.Select("FeedBack", "count(1)", sqlWhere));

            return(result);
        }
Esempio n. 2
0
        public static bool CheckEmail(string loginname, string email)
        {
            var result = CommonBusiness.Select("M_Users", "count(1)", " LoginName='" + loginname + "' and email='" + email + "' ");

            return(Convert.ToInt32(result) > 0);
        }