예제 #1
0
파일: AddressDal.cs 프로젝트: Gqqq/shop
        /// <summary>
        /// 查询默认地址ID
        /// </summary>
        /// <returns></returns>
        public int SelectAddByType()
        {
            string sql = "select id from address where type=0";

            return(Convert.ToInt32(SqlHelper.ExScalar(sql)));
        }
예제 #2
0
파일: SystemDal.cs 프로젝트: Gqqq/shop
        public object SelectUserInfo(string uname, string pwd)
        {
            string sql = $"select count(*) from Users where username='******' and password='******'";

            return(SqlHelper.ExScalar(sql));
        }
예제 #3
0
파일: SystemDal.cs 프로젝트: Gqqq/shop
        public object SelectUserLevel(string uname)
        {
            string sql = $"select UserLevel from Users where username='******'";

            return(SqlHelper.ExScalar(sql));
        }
예제 #4
0
파일: ShoppingDal.cs 프로젝트: Gqqq/shop
        /// <summary>
        /// 检查商品ID是否存在
        /// </summary>
        /// <param name="id"></param>
        /// <param name="username"></param>
        /// <returns></returns>
        public object SelectCommByid(string id, string username)
        {
            string sql = $"select count(*) from Shoppingcart where Pid={id} and UserName='******'";

            return(SqlHelper.ExScalar(sql));
        }