Exemplo n.º 1
0
        public void UpdatePostInfo(string info)
        {
            var cmd = new DataCommand("mySql", "UpdatePostInfos");

            cmd.SetParameters("@Id", $"{info}");
            cmd.ExeSqlCmd();
        }
Exemplo n.º 2
0
        public void UpdateTbOrdersSend(string orderId)
        {
            var cmd = new DataCommand <MySqlContext>("mySql", "UpdateTbOrdersSend");

            cmd.SetParameters("@orderId", orderId);
            cmd.ExeSqlCmd();
        }
Exemplo n.º 3
0
        public void UpdateCartGoInfo(Tb_CartGo cartGo, string oldId)
        {
            var cmd = new DataCommand("mySql", "UpdateCartGoInfo");

            cmd.SetParameters("@userId", cartGo.UserId);
            cmd.SetParameters("@Oldid", oldId);
            cmd.ExeSqlCmd();
        }
Exemplo n.º 4
0
        public void SubmitOrder(string userSsid, string orderId)
        {
            var cmd = new DataCommand("mySql", "SubmitOrder");

            cmd.SetParameters("@ssid", userSsid);
            cmd.SetParameters("@orderId", orderId);
            cmd.ExeSqlCmd();
        }
Exemplo n.º 5
0
        public void RmUserCartgo(string userSsid, string code)
        {
            var cmd = new DataCommand("mySql", "RmUserCartgo");

            cmd.SetParameters("@ssid", userSsid);
            cmd.SetParameters("@code", code);
            cmd.ExeSqlCmd();
        }
Exemplo n.º 6
0
        public void UpdateUserInfo(Tb_UserInfo userInfo)
        {
            var cmd = new DataCommand("mySql", "InsertUserInfo");

            cmd.SetParameters("@UserId", $"{userInfo.UserId}");
            cmd.SetParameters("@Address", userInfo.Address);
            cmd.SetParameters("@Phone", userInfo.Phone1);
            cmd.ExeSqlCmd();
        }
Exemplo n.º 7
0
        public void AddBuyCnt(string userSsid, string code, string cnt)
        {
            var cmd = new DataCommand("mySql", "AddBuyCnt");

            cmd.SetParameters("@ssid", userSsid);
            cmd.SetParameters("@code", code);
            cmd.SetParameters("@cnt", $"{cnt}");
            cmd.ExeSqlCmd();
        }
Exemplo n.º 8
0
        public void InsertGoodsInfo(Tb_GoodsInfo goodsInfo)
        {
            var cmd = new DataCommand("mySql", "InsertGoodsInfo");

            cmd.SetParameters("@GoodsId", $"{goodsInfo.GoodsId}");
            cmd.SetParameters("@SalePrice", goodsInfo.SalePrice);
            cmd.SetParameters("@Discount", $"{goodsInfo.Discount}");
            cmd.ExeSqlCmd();
        }
Exemplo n.º 9
0
        public void AddStockToCart(Tb_CartGo cartGo)
        {
            var cmd    = new DataCommand();
            var findIt = cmd.Search <Tb_CartGo>(x => x.StockCode.Equals(cartGo.StockCode) && x.UserId.Equals(cartGo.UserId) && x.IsPay != 1);

            if (findIt != null)
            {
                findIt.BuyCnt  += cartGo.BuyCnt;
                findIt.CurPrice = cartGo.CurPrice;
                DataCommand.Update(findIt);
                return;
            }
            cmd = new DataCommand("mySql", "InsertGoodsCartGo");
            cmd.SetParameters("@UserId", cartGo.UserId);
            cmd.SetParameters("@StockCode", cartGo.StockCode);
            cmd.SetParameters("@BuyCnt", $"{cartGo.BuyCnt}");
            cmd.SetParameters("@CurPrice", $"{cartGo.CurPrice}");
            cmd.SetParameters("@TempUser", $"{cartGo.TempUser}");
            cmd.SetParameters("@CreateTime", cartGo.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"));
            cmd.ExeSqlCmd();
        }