public static Z01Beetle.Entity.Z01Customer GetCustomer(this Z10Order order, Zippy.Data.IDalProvider db) { Z01Beetle.Entity.Z01Customer rtn = db.FindUnique<Z01Beetle.Entity.Z01Customer>("CustomerID=@CustomerID", db.CreateParameter("CustomerID", order.CustomerID)); if (rtn == null) rtn = new Z01Beetle.Entity.Z01Customer(); return rtn; }
/// <summary> /// 从数据库中载入订单 /// </summary> /// <param name="orderID"></param> /// <param name="tenantID"></param> /// <param name="db"></param> /// <returns></returns> public static Order LoadFromDB(long orderID, Guid tenantID, Zippy.Data.IDalProvider db) { Order order = new Order(); order.Z10Order = db.FindUnique<Z10Order>("OrderID=@OrderID and TenantID=@TenantID", db.CreateParameter("OrderID", orderID), db.CreateParameter("TenantID", tenantID)); order.Items = db.Take<Z10OrderItem>("OrderID=@OrderID and TenantID=@TenantID", db.CreateParameter("OrderID", orderID), db.CreateParameter("TenantID", tenantID)); return order; }
/// <summary> /// 表示 [分类] 对应的实体 /// </summary> public static Z01ProductCategory GetCategoryIDEntity(Zippy.Data.IDalProvider db, Z01ProductInCategory entity) { return db.FindUnique<Z01ProductCategory>("CategoryID=@CategoryID", db.CreateParameter("CategoryID", entity.CategoryID)); }
/// <summary> /// 表示 [头衔/职务] 对应的实体 /// </summary> public static Z01Title GetTitleIDEntity(Zippy.Data.IDalProvider db, Z01UserInfo entity) { return db.FindUnique<Z01Title>("TitleID=@TitleID", db.CreateParameter("TitleID", entity.TitleID)); }
/// <summary> /// 表示 [父权限] 对应的实体 /// </summary> public static Permission GetParentIDEntity(Zippy.Data.IDalProvider db, Permission entity) { return db.FindUnique<Permission>("PermissionID=@PermissionID", db.CreateParameter("PermissionID", entity.ParentID)); }
public static Z01FinancialCategory Create(Zippy.Data.IDalProvider db, Int64 _CategoryID) { Z01FinancialCategory rtn = db.FindUnique<Z01FinancialCategory>(_CategoryID); return rtn; }
public static Z01Unit Create(Zippy.Data.IDalProvider db, Int32 _UnitID) { Z01Unit rtn = db.FindUnique<Z01Unit>(_UnitID); return rtn; }
public static Z10Order Create(Zippy.Data.IDalProvider db, Int64 _OrderID) { Z10Order rtn = db.FindUnique<Z10Order>(_OrderID); return rtn; }
public static Application Create(Zippy.Data.IDalProvider db, Guid _ApplicationID) { Application rtn = db.FindUnique<Application>(_ApplicationID); return rtn; }
public static Z01PaperTemplate Create(Zippy.Data.IDalProvider db, Int64 _TemplateID) { Z01PaperTemplate rtn = db.FindUnique<Z01PaperTemplate>(_TemplateID); return rtn; }
public static Z10DepotFlow Create(Zippy.Data.IDalProvider db, Int64 _FlowID) { Z10DepotFlow rtn = db.FindUnique<Z10DepotFlow>(_FlowID); return rtn; }
public static Tenant Create(Zippy.Data.IDalProvider db, Guid _TenantID) { Tenant rtn = db.FindUnique<Tenant>(_TenantID); return rtn; }
/// <summary> /// 表示 [产品] 对应的实体 /// </summary> public static Z01Product GetProductIDEntity(Zippy.Data.IDalProvider db, Z01CustomerInCategory entity) { return db.FindUnique<Z01Product>("CustomerID=@CustomerID", db.CreateParameter("CustomerID", entity.CustomerID)); }
public static Z01CustomerInCategory Create(Zippy.Data.IDalProvider db, Int64 _CICID) { Z01CustomerInCategory rtn = db.FindUnique<Z01CustomerInCategory>(_CICID); return rtn; }
public static Group Create(Zippy.Data.IDalProvider db, Guid _GroupID) { Group rtn = db.FindUnique<Group>(_GroupID); return rtn; }
/// <summary> /// 表示 [租户编号] 对应的实体 /// </summary> public static Tenant GetTenantIDEntity(Zippy.Data.IDalProvider db, TenantIdentity entity) { return db.FindUnique<Tenant>("TenantID=@TenantID", db.CreateParameter("TenantID", entity.TenantID)); }
public static TextResource Create(Zippy.Data.IDalProvider db, Int64 _ResourceID) { TextResource rtn = db.FindUnique<TextResource>(_ResourceID); return rtn; }
public static Z01Title Create(Zippy.Data.IDalProvider db, Int64 _TitleID) { Z01Title rtn = db.FindUnique<Z01Title>(_TitleID); return rtn; }
public static EAP.Bus.Entity.Currency GetCurrency(this Z10Order order, Zippy.Data.IDalProvider db) { return db.FindUnique<EAP.Bus.Entity.Currency>("ID=@ID", db.CreateParameter("ID",order.Currency)); }
public static Z30Communication Create(Zippy.Data.IDalProvider db, Int64 _CommunicationID) { Z30Communication rtn = db.FindUnique<Z30Communication>(_CommunicationID); return rtn; }
public static Z10Cabbage.Entity.Z10OrderItem GetTop1OrderItem(this Z10Order order, Zippy.Data.IDalProvider db) { return db.FindUnique<Z10Cabbage.Entity.Z10OrderItem>("OrderID=@OrderID", db.CreateParameter("OrderID", order.OrderID)); }
public static Industry Create(Zippy.Data.IDalProvider db, Guid _IndustryID) { Industry rtn = db.FindUnique<Industry>(_IndustryID); return rtn; }
public static Z01Bank Create(Zippy.Data.IDalProvider db, Int64 _BankID) { Z01Bank rtn = db.FindUnique<Z01Bank>(_BankID); return rtn; }
/// <summary> /// 表示 [父行业] 对应的实体 /// </summary> public static Industry GetParentIDEntity(Zippy.Data.IDalProvider db, Industry entity) { return db.FindUnique<Industry>("IndustryID=@IndustryID", db.CreateParameter("IndustryID", entity.ParentID)); }
public static Permission Create(Zippy.Data.IDalProvider db, Int64 _PermissionID) { Permission rtn = db.FindUnique<Permission>(_PermissionID); return rtn; }
public static User Create(Zippy.Data.IDalProvider db, Guid _UserID) { User rtn = db.FindUnique<User>(_UserID); return rtn; }
public static Z01UserInfo Create(Zippy.Data.IDalProvider db, Guid _UserID) { Z01UserInfo rtn = db.FindUnique<Z01UserInfo>(_UserID); return rtn; }
/// <summary> /// 表示 [分组] 对应的实体 /// </summary> public static Group GetGroupIDEntity(Zippy.Data.IDalProvider db, User entity) { return db.FindUnique<Group>("GroupID=@GroupID", db.CreateParameter("GroupID", entity.GroupID)); }
public static DataSource Create(Zippy.Data.IDalProvider db, Guid _DataSourceID) { DataSource rtn = db.FindUnique<DataSource>(_DataSourceID); return rtn; }
public static TenantIdentity Create(Zippy.Data.IDalProvider db, Int64 _IdentityID) { TenantIdentity rtn = db.FindUnique<TenantIdentity>(_IdentityID); return rtn; }