本文整理汇总了C#中Zippy类的典型用法代码示例。如果您正苦于以下问题:C# Zippy类的具体用法?C# Zippy怎么用?C# Zippy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Zippy类属于命名空间,在下文中一共展示了Zippy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetCustomer
public static Z01Beetle.Entity.Z01Customer GetCustomer(this Z10Order order, Zippy.Data.IDalProvider db)
{
Z01Beetle.Entity.Z01Customer rtn = db.FindUnique<Z01Beetle.Entity.Z01Customer>("[email protected]", db.CreateParameter("CustomerID", order.CustomerID));
if (rtn == null)
rtn = new Z01Beetle.Entity.Z01Customer();
return rtn;
}
开发者ID:honj51,项目名称:EAP,代码行数:7,代码来源:Z10OrderHelper.cs
示例2: GetRoles
/// <summary>
/// 获取角色
/// </summary>
/// <param name="db"></param>
/// <param name="tenantID"></param>
/// <returns></returns>
public static List<Role> GetRoles(Zippy.Data.IDalProvider db, Guid tenantID)
{
//if (System.Web.HttpContext.Current.Cache["Roles_" + tenantID].IsNotNullOrEmpty())
// return System.Web.HttpContext.Current.Cache["Roles_" + tenantID] as List<Role>;
List<Role> xroles = db.Take<Role>("[email protected] order by DisplayOrder", db.CreateParameter("TenantID", tenantID));
System.Web.HttpContext.Current.Cache["Roles_" + tenantID] = xroles;
return xroles;
}
开发者ID:honj51,项目名称:EAP,代码行数:15,代码来源:Helper.cs
示例3: GetDepots
public static List<Z10Cabbage.Entity.Z10Depot> GetDepots(Guid tenantID, Zippy.Data.IDalProvider db)
{
if (System.Web.HttpContext.Current.Cache["Depots"].IsNotNullOrEmpty())
return System.Web.HttpContext.Current.Cache["Depots"] as List<Z10Cabbage.Entity.Z10Depot>;
List<Z10Cabbage.Entity.Z10Depot> xdepots = db.Take<Z10Cabbage.Entity.Z10Depot>("[email protected] order by DisplayOrder", db.CreateParameter("TenantID", tenantID));
System.Web.HttpContext.Current.Cache["Depots"] = xdepots;
return xdepots;
}
开发者ID:honj51,项目名称:EAP,代码行数:9,代码来源:Helper.cs
示例4: GetCurrencies
/// <summary>
/// 获取货币
/// </summary>
/// <param name="db"></param>
/// <returns></returns>
public static List<Currency> GetCurrencies(Zippy.Data.IDalProvider db)
{
//if (System.Web.HttpContext.Current.Cache["Currencies"].IsNotNullOrEmpty())
// return System.Web.HttpContext.Current.Cache["Currencies"] as List<Currency>;
List<EAP.Bus.Entity.Currency> xcurrencies = db.Take<EAP.Bus.Entity.Currency>("1=1 order by DisplayOrder");
System.Web.HttpContext.Current.Cache["Currencies"] = xcurrencies;
return xcurrencies;
}
开发者ID:honj51,项目名称:EAP,代码行数:14,代码来源:Helper.cs
示例5: Delete
public static int Delete(Zippy.Data.IDalProvider db, Z10Order xOrder)
{
//db.Delete<Z10OrderItem>("Orde[email protected]", db.CreateParameter("OrderID", _OrderID));
//db.Delete<Z10Order>(_OrderID);
xOrder.DeleteFlag = (int)EAP.Logic.DeleteFlags.Deleted;
var result = db.Update<Z10Order>(xOrder);
return result;
}
开发者ID:honj51,项目名称:EAP,代码行数:10,代码来源:Z10OrderHelper.cs
示例6: PaperTemplateSelectOptions
/// <summary>
/// 合同条款下拉列表
/// </summary>
/// <param name="tenantID"></param>
/// <param name="db"></param>
/// <returns></returns>
public static string PaperTemplateSelectOptions(Guid tenantID, Zippy.Data.IDalProvider db)
{
StringBuilder sb = new StringBuilder();
List<Z01PaperTemplate> xobjs = db.Take<Z01PaperTemplate>("[email protected] order by DisplayOrder", db.CreateParameter("TenantID", tenantID));
foreach (var xobj in xobjs)
{
sb.AppendLine("<option value='" + xobj.TemplateID + "'>" + xobj.Title + "</option>");
}
return sb.ToString();
}
开发者ID:honj51,项目名称:EAP,代码行数:17,代码来源:HtmlHelper.cs
示例7: DepotSelectOptions
/// <summary>
/// 仓库的下拉列表项
/// </summary>
/// <returns></returns>
public static string DepotSelectOptions(Guid tenantID, Zippy.Data.IDalProvider db)
{
StringBuilder sb = new StringBuilder();
List<Z10Cabbage.Entity.Z10Depot> xdepots = Helper.GetDepots(tenantID, db);
foreach (Z10Cabbage.Entity.Z10Depot depot in xdepots)
{
sb.Append("<option value='" + depot.DepotID + "'>" + depot.Title + "</option>");
}
return sb.ToString();
}
开发者ID:honj51,项目名称:EAP,代码行数:15,代码来源:HtmlHelper.cs
示例8: LoadFromDB
/// <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>("O[email protected] and [email protected]",
db.CreateParameter("OrderID", orderID),
db.CreateParameter("TenantID", tenantID));
order.Items = db.Take<Z10OrderItem>("[email protected] and [email protected]",
db.CreateParameter("OrderID", orderID),
db.CreateParameter("TenantID", tenantID));
return order;
}
开发者ID:honj51,项目名称:EAP,代码行数:18,代码来源:Order.cs
示例9: CurrencySelectOptions
/// <summary>
/// 币种的下拉列表项
/// </summary>
/// <returns></returns>
public static string CurrencySelectOptions(Zippy.Data.IDalProvider db)
{
StringBuilder sb = new StringBuilder();
List<EAP.Bus.Entity.Currency> xcurrencies = Helper.GetCurrencies(db);
foreach (EAP.Bus.Entity.Currency xcurrency in xcurrencies)
{
sb.AppendLine("<option value='" + xcurrency.ID + "'>" + xcurrency.Title + "(" + xcurrency.ID + ")</option>");
}
return sb.ToString();
}
开发者ID:honj51,项目名称:EAP,代码行数:15,代码来源:HtmlHelper.cs
示例10: GetParentIDEntitiesHtmlOption
/// <summary>
/// 表示 [父分类] 被选实体集合的 option html
/// </summary>
public static string GetParentIDEntitiesHtmlOption(Zippy.Data.IDalProvider db, System.Int64? selectedValue)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
List<Permission> objs = db.Take<Permission>("ParentID=0");
foreach (var obj in objs)
{
if (selectedValue == obj.PermissionID)
sb.AppendLine("<option value='" + obj.PermissionID + "' selected='selected'>" + obj.Title + "</option>");
else
sb.AppendLine("<option value='" + obj.PermissionID + "'>" + obj.Title + "</option>");
}
return sb.ToString();
}
开发者ID:honj51,项目名称:EAP,代码行数:16,代码来源:PermissionHelper.cs
示例11: GetTitleIDEntitiesHtmlOption
/// <summary>
/// 表示 [父分类] 被选实体集合的 option html
/// </summary>
public static string GetTitleIDEntitiesHtmlOption(Zippy.Data.IDalProvider db, Guid tenantID, System.Int64? selectedValue)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
List<Z01Title> objs = db.Take<Z01Title>("[email protected]", db.CreateParameter("TenantID", tenantID));
foreach (var obj in objs)
{
if (selectedValue == obj.TitleID)
sb.AppendLine("<option value='" + obj.TitleID + "' selected='selected'>" + obj.Title + "</option>");
else
sb.AppendLine("<option value='" + obj.TitleID + "'>" + obj.Title + "</option>");
}
return sb.ToString();
}
开发者ID:honj51,项目名称:EAP,代码行数:16,代码来源:Z01UserInfoHelper.cs
示例12: GetParentIDEntitiesHtmlOption
/// <summary>
/// 表示 [父分类] 被选实体集合的 option html
/// </summary>
public static string GetParentIDEntitiesHtmlOption(Zippy.Data.IDalProvider db, Guid tenantID, long? selectedValue, long removeID)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
List<Z01CustomerCategory> objs = db.Take<Z01CustomerCategory>("[email protected]", db.CreateParameter("TenantID", tenantID));
List<Z01CustomerCategory> newObjs = new List<Z01CustomerCategory>();
ReGroup(objs, newObjs, 0, "├", removeID);
foreach (var obj in newObjs)
{
if (selectedValue == obj.CategoryID)
sb.AppendLine("<option value='" + obj.CategoryID + "' selected='selected'>" + obj.Title + "</option>");
else
sb.AppendLine("<option value='" + obj.CategoryID + "'>" + obj.Title + "</option>");
}
return sb.ToString();
}
开发者ID:honj51,项目名称:EAP,代码行数:18,代码来源:Z01CustomerCategoryHelper.cs
示例13: GetPermissions
/// <summary>
/// 获取所有权限
/// </summary>
/// <param name="db"></param>
/// <param name="tenantID"></param>
/// <returns></returns>
public static List<Permission> GetPermissions(Zippy.Data.IDalProvider db, Guid? tenantID)
{
//if (System.Web.HttpContext.Current.Cache["Permissions_" + tenantID].IsNotNullOrEmpty())
// return System.Web.HttpContext.Current.Cache["Permissions_" + tenantID] as List<Permission>;
List<Permission> xobjs = db.Take<Permission>();
//按照父子关系顺序重建
List<Permission> newRecords = new List<Permission>();
IEnumerable<Permission> rootRecords = xobjs.Where(s => (s.ParentID ?? 0) == 0).OrderBy(s => s.DisplayOrder);
foreach (Permission per in rootRecords)
{
newRecords.Add(per);
newRecords.AddRange(xobjs.Where(s => s.ParentID == per.PermissionID).OrderBy(s => s.DisplayOrder));
}
System.Web.HttpContext.Current.Cache["Permissions_" + tenantID] = newRecords;
return newRecords;
}
开发者ID:honj51,项目名称:EAP,代码行数:24,代码来源:Helper.cs
示例14: ToJsonMenu
/// <summary>
/// j将当前用户的url都显示出来
/// </summary>
/// <param name="user"></param>
/// <param name="tenantID"></param>
/// <param name="db"></param>
/// <returns></returns>
public static string ToJsonMenu(Zippy.SaaS.Entity.User user, Guid? tenantID, Zippy.Data.IDalProvider db)
{
System.Text.StringBuilder menus = new StringBuilder();
menus.AppendLine("{");
List<Permission> xobjs = GetPermissions(db, tenantID);
List<EAP.Logic.Bus.View.V_UserPermission> mePers = null;
if (!user.UserType.BitIs(Zippy.SaaS.UserTypes.SystemAdministrator))
{
mePers = db.Take<EAP.Logic.Bus.View.V_UserPermission>("[email protected]", db.CreateParameter("UserID", user.UserID));
}
var rootRecords = xobjs.Where(s => (s.ParentID ?? 0) == 0 && s.PermissionStatus == 1).OrderBy(s => s.DisplayOrder);
foreach (Permission per in rootRecords)
{
if (mePers == null || (mePers != null && mePers.Exists(s => s.PermissionID == per.PermissionID)))
{
if (per.PermissionStatus == 1)
menus.AppendLine("'" + per.PermissionID + "' : [['" + per.PermissionID + "','" + per.Title + "','" + per.Icon + "'],{");
var subRecords = xobjs.Where(s => s.ParentID == per.PermissionID).OrderBy(s => s.DisplayOrder);
foreach (Permission subper in subRecords)
{
if (mePers == null || (mePers != null && mePers.Exists(s => s.PermissionID == subper.PermissionID)))
{
if (subper.PermissionStatus == 1)
menus.AppendLine("'" + subper.PermissionID + "' : ['" + subper.Title + "','" + subper.Url + "','" + subper.Icon + "'],");
}
}
//if (menus.ToString().EndsWith(",")) menus.Remove(menus.Length - 1, 1);
menus.AppendLine("}],");
}
}
//if (menus.ToString().EndsWith(",\n")) menus.Remove(menus.Length - 1, 1);
menus.AppendLine("}");
return menus.ToString().Replace(",\r\n}", "\r\n}");
}
开发者ID:honj51,项目名称:EAP,代码行数:47,代码来源:Helper.cs
示例15: Take
public static List<DataSource> Take(Zippy.Data.IDalProvider db,int count)
{
return db.Take<DataSource>(count, true);
}
开发者ID:honj51,项目名称:EAP,代码行数:4,代码来源:DataSourceHelper.cs
示例16: Create
public static DataSource Create(Zippy.Data.IDalProvider db, Guid _DataSourceID)
{
DataSource rtn = db.FindUnique<DataSource>(_DataSourceID);
return rtn;
}
开发者ID:honj51,项目名称:EAP,代码行数:5,代码来源:DataSourceHelper.cs
示例17: Query
public static PaginatedList<Z01UserInfo> Query(Zippy.Data.IDalProvider db, Guid tenantID, int PageSize, int PageIndex, Hashtable paras, int? orderCol)
{
PaginatedList<Z01UserInfo> rtn = new PaginatedList<Z01UserInfo>();
List<System.Data.Common.DbParameter> dbParams = new List<System.Data.Common.DbParameter>();
string where = " [TenantID][email protected]";
dbParams.Add(db.CreateParameter("TenantID", tenantID));
#region 开始查询
if (paras != null)
{
object qName = paras["qName"];
if (qName.IsNotNullOrEmpty())
{
where += " and [Name] like @Name";
dbParams.Add(db.CreateParameter("Name", "%" + qName + "%"));
}
object qNickname = paras["qNickname"];
if (qNickname.IsNotNullOrEmpty())
{
where += " and [Nickname] like @Nickname";
dbParams.Add(db.CreateParameter("Nickname", "%" + qNickname + "%"));
}
object qEmail = paras["qEmail"];
if (qEmail.IsNotNullOrEmpty())
{
where += " and [Email] like @Email";
dbParams.Add(db.CreateParameter("Email", "%" + qEmail + "%"));
}
object qUserStatus = paras["qUserStatus"];
if (qUserStatus.IsNotNullOrEmpty())
{
Int32 intqUserStatus = (Int32)qUserStatus;
if (intqUserStatus > 0)
{
where += " and [UserStatus] = @UserStatus";
dbParams.Add(db.CreateParameter("UserStatus", qUserStatus));
}
}
object qCreateDateStart = paras["qCreateDateStart"];
if (qCreateDateStart != null && qCreateDateStart.ToString()!="")
{
where += " and [CreateDate] >= @CreateDateStart";
dbParams.Add(db.CreateParameter("CreateDateStart", qCreateDateStart));
}
object qCreateDateEnd = paras["qCreateDateEnd"];
if (qCreateDateEnd != null && qCreateDateEnd.ToString()!="")
{
where += " and [CreateDate] < @CreateDateEnd";
dbParams.Add(db.CreateParameter("CreateDateEnd", ((DateTime)qCreateDateEnd).AddDays(1)));
}
}
#endregion
string orderBy = "[CreateDate] desc";
if (orderCol == 0)
{
orderBy = "[CreateDate] desc";
}
else if (orderCol == 1)
{
orderBy = "[UserID]";
}
else if (orderCol == 2)
{
orderBy = "[UserID] desc";
}
else if (orderCol == 3)
{
orderBy = "[Name]";
}
else if (orderCol == 4)
{
orderBy = "[Name] desc";
}
else if (orderCol == 5)
{
orderBy = "[Nickname]";
}
else if (orderCol == 6)
{
orderBy = "[Nickname] desc";
}
else if (orderCol == 7)
{
orderBy = "[Email]";
}
else if (orderCol == 8)
{
orderBy = "[Email] desc";
}
else if (orderCol == 9)
{
orderBy = "[Tel1]";
}
else if (orderCol == 10)
{
orderBy = "[Tel1] desc";
}
else if (orderCol == 11)
//.........这里部分代码省略.........
开发者ID:honj51,项目名称:EAP,代码行数:101,代码来源:Z01UserInfoHelper.cs
示例18: Insert
public static int Insert(Zippy.Data.IDalProvider db, Z01UserInfo entity)
{
int rtn = db.Insert(entity);
return rtn;
}
开发者ID:honj51,项目名称:EAP,代码行数:5,代码来源:Z01UserInfoHelper.cs
示例19: GetTitleIDEntity
/// <summary>
/// 表示 [头衔/职务] 对应的实体
/// </summary>
public static Z01Title GetTitleIDEntity(Zippy.Data.IDalProvider db, Z01UserInfo entity)
{
return db.FindUnique<Z01Title>("[email protected]", db.CreateParameter("TitleID", entity.TitleID));
}
开发者ID:honj51,项目名称:EAP,代码行数:7,代码来源:Z01UserInfoHelper.cs
示例20: Update
public static int Update(Zippy.Data.IDalProvider db, Z01UserInfo entity)
{
return db.Update(entity);
}
开发者ID:honj51,项目名称:EAP,代码行数:4,代码来源:Z01UserInfoHelper.cs
注:本文中的Zippy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论