static void AddGoodsInfo()
        {
            GoodsInfo goodsInfo = new GoodsInfo();

            goodsInfo.UnitId       = 1;
            goodsInfo.SortId       = 1;
            goodsInfo.WholeSalerId = 1;
            goodsInfo.GoodsName    = "食品";
            goodsInfo.PurPrice     = (decimal)455.343;
            goodsInfo.PayPrice     = (decimal)455.343;
            goodsInfo.Total        = 50;
            goodsInfo.SalesCount   = 0;
            goodsInfo.SurplusCount = 50;
            goodsInfo.GoodsType    = "测试";
            goodsInfo.CreateTime   = DateTime.Now;
            goodsInfo.LastTime     = DateTime.Now + new TimeSpan(50, 5, 5, 1);
            GoodsInfoDal GoodsInfoDal = new GoodsInfoDal();

            bool d = GoodsInfoDal.Add(goodsInfo);

            if (d)
            {
                Console.WriteLine("成功");
            }
            else
            {
                Console.WriteLine("失败");
            }
        }
Exemple #2
0
 public int Add(GoodsInfo goods)
 {
     goods.GoodCreateTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
     return(Gdal.Add(goods));
 }