Beispiel #1
0
 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;
 }
Beispiel #2
0
 /// <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));
 }
Beispiel #4
0
 /// <summary>
 /// 表示 [头衔/职务] 对应的实体
 /// </summary>
 public static Z01Title GetTitleIDEntity(Zippy.Data.IDalProvider db, Z01UserInfo entity)
 {
     return db.FindUnique<Z01Title>("TitleID=@TitleID", db.CreateParameter("TitleID", entity.TitleID));
 }
Beispiel #5
0
 /// <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;
 }
Beispiel #7
0
 public static Z01Unit Create(Zippy.Data.IDalProvider db, Int32 _UnitID)
 {
     Z01Unit rtn =  db.FindUnique<Z01Unit>(_UnitID);
     return rtn;
 }
Beispiel #8
0
 public static Z10Order Create(Zippy.Data.IDalProvider db, Int64 _OrderID)
 {
     Z10Order rtn =  db.FindUnique<Z10Order>(_OrderID);
     return rtn;
 }
Beispiel #9
0
 public static Application Create(Zippy.Data.IDalProvider db, Guid _ApplicationID)
 {
     Application rtn =  db.FindUnique<Application>(_ApplicationID);
     return rtn;
 }
Beispiel #10
0
 public static Z01PaperTemplate Create(Zippy.Data.IDalProvider db, Int64 _TemplateID)
 {
     Z01PaperTemplate rtn =  db.FindUnique<Z01PaperTemplate>(_TemplateID);
     return rtn;
 }
Beispiel #11
0
 public static Z10DepotFlow Create(Zippy.Data.IDalProvider db, Int64 _FlowID)
 {
     Z10DepotFlow rtn =  db.FindUnique<Z10DepotFlow>(_FlowID);
     return rtn;
 }
Beispiel #12
0
 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;
 }
Beispiel #15
0
 public static Group Create(Zippy.Data.IDalProvider db, Guid _GroupID)
 {
     Group rtn = db.FindUnique<Group>(_GroupID);
     return rtn;
 }
Beispiel #16
0
 /// <summary>
 /// 表示 [租户编号] 对应的实体
 /// </summary>
 public static Tenant GetTenantIDEntity(Zippy.Data.IDalProvider db, TenantIdentity entity)
 {
     return db.FindUnique<Tenant>("TenantID=@TenantID", db.CreateParameter("TenantID", entity.TenantID));
 }
Beispiel #17
0
 public static TextResource Create(Zippy.Data.IDalProvider db, Int64 _ResourceID)
 {
     TextResource rtn =  db.FindUnique<TextResource>(_ResourceID);
     return rtn;
 }
Beispiel #18
0
 public static Z01Title Create(Zippy.Data.IDalProvider db, Int64 _TitleID)
 {
     Z01Title rtn =  db.FindUnique<Z01Title>(_TitleID);
     return rtn;
 }
Beispiel #19
0
 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));
 }
Beispiel #20
0
 public static Z30Communication Create(Zippy.Data.IDalProvider db, Int64 _CommunicationID)
 {
     Z30Communication rtn =  db.FindUnique<Z30Communication>(_CommunicationID);
     return rtn;
 }
Beispiel #21
0
 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));
 }
Beispiel #22
0
 public static Industry Create(Zippy.Data.IDalProvider db, Guid _IndustryID)
 {
     Industry rtn =  db.FindUnique<Industry>(_IndustryID);
     return rtn;
 }
Beispiel #23
0
 public static Z01Bank Create(Zippy.Data.IDalProvider db, Int64 _BankID)
 {
     Z01Bank rtn =  db.FindUnique<Z01Bank>(_BankID);
     return rtn;
 }
Beispiel #24
0
 /// <summary>
 /// 表示 [父行业] 对应的实体
 /// </summary>
 public static Industry GetParentIDEntity(Zippy.Data.IDalProvider db, Industry entity)
 {
     return db.FindUnique<Industry>("IndustryID=@IndustryID", db.CreateParameter("IndustryID", entity.ParentID));
 }
Beispiel #25
0
 public static Permission Create(Zippy.Data.IDalProvider db, Int64 _PermissionID)
 {
     Permission rtn = db.FindUnique<Permission>(_PermissionID);
     return rtn;
 }
Beispiel #26
0
 public static User Create(Zippy.Data.IDalProvider db, Guid _UserID)
 {
     User rtn = db.FindUnique<User>(_UserID);
     return rtn;
 }
Beispiel #27
0
 public static Z01UserInfo Create(Zippy.Data.IDalProvider db, Guid _UserID)
 {
     Z01UserInfo rtn =  db.FindUnique<Z01UserInfo>(_UserID);
     return rtn;
 }
Beispiel #28
0
 /// <summary>
 /// 表示 [分组] 对应的实体
 /// </summary>
 public static Group GetGroupIDEntity(Zippy.Data.IDalProvider db, User entity)
 {
     return db.FindUnique<Group>("GroupID=@GroupID", db.CreateParameter("GroupID", entity.GroupID));
 }
Beispiel #29
0
 public static DataSource Create(Zippy.Data.IDalProvider db, Guid _DataSourceID)
 {
     DataSource rtn =  db.FindUnique<DataSource>(_DataSourceID);
     return rtn;
 }
Beispiel #30
0
 public static TenantIdentity Create(Zippy.Data.IDalProvider db, Int64 _IdentityID)
 {
     TenantIdentity rtn =  db.FindUnique<TenantIdentity>(_IdentityID);
     return rtn;
 }