public int Add(Orders t)
        {
            t.CreateDate = DateTime.Now;
            t.State      = 0;
            var result = bll.Add(t);

            if (result > 0)
            {
                var good = goodsBLL.QueryById(t.GId);
                good.Num -= t.Nums;
                var g = goodsBLL.Update(good);
            }
            return(result);
        }
Exemple #2
0
        public int Post([FromBody] Orders parameter)
        {
            OrdersBLL bll = new OrdersBLL();

            return(bll.Add(parameter));
        }