/// <summary> /// 创建新的 onhand 对象。 /// </summary> /// <param name="store_id">store_id 的初始值。</param> /// <param name="goodsid">goodsid 的初始值。</param> /// <param name="onhand1">onhand1 的初始值。</param> public static onhand Createonhand(int store_id, string goodsid, int onhand1) { onhand onhand = new onhand(); onhand.store_id = store_id; onhand.goodsid = goodsid; onhand.onhand1 = onhand1; return(onhand); }
static void Main(string[] args) { TestContext context = new TestContext(connString); goods_type myType = new goods_type(); myType.type_code = "T001"; myType.type_name = "测试类型1"; context.AddTogoods_type(myType); goods myGoods = new goods(); myGoods.goodsid = "G001"; myGoods.name = "测试货物1"; myGoods.goods_type = myType; context.AddTogoods(myGoods); store myStore = new store(); myStore.store_code = "S001"; myStore.store_name = "测试仓库1"; context.AddTostore(myStore); onhand myOnhand = new onhand(); myOnhand.goods = myGoods; myOnhand.store = myStore; myOnhand.onhand1 = 100; context.AddToonhand(myOnhand); context.SaveChanges(); }
/// <summary> /// 创建新的 onhand 对象。 /// </summary> /// <param name="store_id">store_id 的初始值。</param> /// <param name="goodsid">goodsid 的初始值。</param> /// <param name="onhand1">onhand1 的初始值。</param> public static onhand Createonhand(int store_id, string goodsid, int onhand1) { onhand onhand = new onhand(); onhand.store_id = store_id; onhand.goodsid = goodsid; onhand.onhand1 = onhand1; return onhand; }
/// <summary> /// 架构中不存在 onhand 的注释。 /// </summary> public void AddToonhand(onhand onhand) { base.AddObject("onhand", onhand); }