示例#1
0
        /// <summary>
        /// 追加评论
        /// </summary>
        /// <param name="feed"></param>
        /// <returns></returns>
        public static int UpdateFeedback(Feedback feed)
        {
            string str = "update Feedback set FeedFollow=@FeedFollow ,FeedFollowTime=@FeedFollowTime ";

            SqlParameter[] p = { new SqlParameter("@FeedFollow", feed.FeedFollow), new SqlParameter("@FeedFollowTime", feed.FeedFollowTime) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#2
0
        /// <summary>
        /// 品种类型
        /// </summary>
        /// <param name="ty"></param>
        /// <returns></returns>
        public static int InsertFlowerType(FlowerType ty)
        {
            string str = "insert into FlowerType values(@TypeName)";

            SqlParameter[] p = { new SqlParameter("@TypeName", ty.TypeName) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#3
0
        /// <summary>
        /// 存放商品,添加商品数量
        /// </summary>
        /// <param name="sto"></param>
        /// <returns></returns>
        public static int InsertStore(StoreF sto)
        {
            string str = "insert into StotreF values(@NewDate,@Repertory.@TypeID.@Guardian)";

            SqlParameter[] p = { new SqlParameter("@NewDate", sto.NewDate), new SqlParameter("@Repertory", sto.Repertory),
                                 new SqlParameter("@TypeID",  sto.TypeID),  new SqlParameter("@Guardian",  sto.Guardian) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#4
0
        /// <summary>
        /// 修改状态,是否下架
        /// </summary>
        /// <param name="flower"></param>
        /// <returns></returns>
        public static int UnderFlowerNew()
        {
            string sr  = "是";
            string str = "update FlowerNew set FlowerState=@FlowerState";//默认状态否

            SqlParameter[] p = { new SqlParameter("@FlowerState", sr) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#5
0
        /// <summary>
        /// 客户反馈,评价
        /// </summary>
        /// <param name="feed"></param>
        /// <returns></returns>
        public static int InsertFeedback(Feedback feed)
        {
            string str = "insert into Feedback(UserAccount,FeedDesc,FeedDay,FeedState) values(@UserAccount,@FeedDesc,@FeedDay,@FeedState)";

            SqlParameter[] p = { new SqlParameter("@UserAccount", feed.UserAccount), new SqlParameter("@FeedDesc",  feed.FeedDesc),
                                 new SqlParameter("@FeedDay",     feed.FeedDay),     new SqlParameter("@FeedState", feed.FeedState) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#6
0
        /// <summary>
        /// 新用户注册
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static int InsertUserLogin(UserLogin user)
        {
            string str = "insert into UserLogin values(@UserAccount,@USerPassword,@UserName,@UserSex)";

            SqlParameter[] p = { new SqlParameter("@UserAccount", user.UserAccount), new SqlParameter("@USerPassword", user.USerPassword),
                                 new SqlParameter("@UserName",    user.UserName),
                                 new SqlParameter("@UserSex",     user.UserSex) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#7
0
        /// <summary>
        /// 添加新商品
        /// </summary>
        /// <param name="flo"></param>
        /// <returns></returns>
        public static int InsertFlowerNew(FlowerNew flo)
        {
            string str = "Insert into FlowerNew values(@FlowerName,@FlowerMaterials,@TypeID,@FlowerColor,@FlowerSize,@FlowerPicUrl,@FlowerPrice,@FlowerNum,@FlowerLang,@FlowerDesc,@FlowerState)";

            SqlParameter[] p = { new SqlParameter("@FlowerName",  flo.FlowerName),  new SqlParameter("@FlowerMaterials", flo.FlowerMaterials), new SqlParameter("@TypeID",       flo.TypeID),
                                 new SqlParameter("@FlowerColor", flo.FlowerColor), new SqlParameter("@FlowerSize",      flo.FlowerSize),      new SqlParameter("@FlowerPicUrl", flo.FlowerPicUrl),
                                 new SqlParameter("@FlowerPrice", flo.FlowerPrice), new SqlParameter("@FlowerNum",       flo.FlowerNum),       new SqlParameter("@FlowerLang",   flo.FlowerLang),
                                 new SqlParameter("@FlowerDesc",  flo.FlowerDesc),  new SqlParameter("@FlowerState",     flo.FlowerState) };
            return(DbHelp.ExecuteNonQuary(str, p));
        }
示例#8
0
        /// <summary>
        /// 付款
        /// </summary>
        /// <param name="de"></param>
        /// <returns></returns>
        public static string UpdateDratils(Details de)
        {
            string str = "update Details set PayState=1 where  UserAccount=@UserAccount";

            SqlParameter[] p = { new SqlParameter("@UserAccount", de.PayState), };
            switch (DbHelp.ExecuteNonQuary(str, p))
            {
            case 1:
                str = "付款成功";
                break;

            default:
                str = "付款失败";
                break;
            }
            return(str);
        }
示例#9
0
        /// <summary>
        /// 添加购物车
        /// </summary>
        /// <param name="de"></param>
        /// <returns></returns>
        public static string InsertDrtails(Details de)
        {
            string str = "insert into Details values(@DetailsID,@ID,@FlowerName," +
                         "@FlowerColor,@FlowerSize,@FlowerPicUrl,@FlowerPrice,@DetailsNumber,@UserAccount,@Discount,@PayState,@PayDesc)";

            SqlParameter[] p = { new SqlParameter("@DetailsID",   de.DetailsID),   new SqlParameter("@ID",            de.ID),            new SqlParameter("@FlowerName",   de.FlowerName),
                                 new SqlParameter("@FlowerColor", de.FlowerColor), new SqlParameter("@FlowerSize",    de.FlowerSize),    new SqlParameter("@FlowerPicUrl", de.FlowerPicUrl),
                                 new SqlParameter("@FlowerPrice", de.FlowerPrice), new SqlParameter("@DetailsNumber", de.DetailsNumber), new SqlParameter("@UserAccount",  de.UserAccount),
                                 new SqlParameter("@Discount",    de.Discount),    new SqlParameter("@PayState",      de.PayState),
                                 new SqlParameter("@PayDesc",     de.PayDesc) };
            switch (DbHelp.ExecuteNonQuary(str, p))
            {
            case 1:
                str = "加入购物车";
                break;

            default:
                str = "加入购物车失败";
                break;
            }
            return(str);
        }