static void EditGoodsInfo() { 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 = 500; goodsInfo.SalesCount = 0; goodsInfo.SurplusCount = 500; goodsInfo.GoodsType = " gfg "; goodsInfo.CreateTime = DateTime.Now; goodsInfo.LastTime = DateTime.Now + new TimeSpan(50, 5, 5, 1); goodsInfo.Id = 2; GoodsInfoDal GoodsInfoDal = new GoodsInfoDal(); bool d = GoodsInfoDal.Edit(goodsInfo); if (d) { Console.WriteLine("成功"); } else { Console.WriteLine("失败"); } }