当前位置: 首页>>代码示例>>C#>>正文


C# Zippy.CreateParameter方法代码示例

本文整理汇总了C#中Zippy.CreateParameter方法的典型用法代码示例。如果您正苦于以下问题:C# Zippy.CreateParameter方法的具体用法?C# Zippy.CreateParameter怎么用?C# Zippy.CreateParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zippy的用法示例。


在下文中一共展示了Zippy.CreateParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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>("[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

示例2: 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

示例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: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: Query

 public static List<Permission> Query(Zippy.Data.IDalProvider db, long parentID)
 {
     return db.Take<Permission>(" [ParentID] = @ParentID order by DisplayOrder", db.CreateParameter("ParentID", parentID));
 }
开发者ID:honj51,项目名称:EAP,代码行数:4,代码来源:PermissionHelper.cs

示例11: GetParentIDEntity

 /// <summary>
 /// 表示 [父权限] 对应的实体
 /// </summary>
 public static Permission GetParentIDEntity(Zippy.Data.IDalProvider db, Permission entity)
 {
     return db.FindUnique<Permission>("[email protected]", db.CreateParameter("PermissionID", entity.ParentID));
 }
开发者ID:honj51,项目名称:EAP,代码行数:7,代码来源:PermissionHelper.cs

示例12: GetBankID_Z01FinancialFlows

 /// <summary>
 /// 获取 [银行 的 银行] 的 [财务流水] 集合
 /// </summary>
 public static List<Z01FinancialFlow> GetBankID_Z01FinancialFlows(Zippy.Data.IDalProvider db, Z01Bank entity)
 {
     if (entity.BankID.HasValue)
            return db.Take<Z01FinancialFlow>("[email protected]", db.CreateParameter("BankID", entity.BankID));
     return new List<Z01FinancialFlow>();
 }
开发者ID:honj51,项目名称:EAP,代码行数:9,代码来源:Z01BankHelper.cs

示例13: Query

        public static PaginatedList<Z10Order> Query(Zippy.Data.IDalProvider db, Guid tenantID, int PageSize, int PageIndex, Hashtable paras, int? orderCol)
        {
            PaginatedList<Z10Order> rtn = new PaginatedList<Z10Order>();
            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 qCustomerID = paras["qCustomerID"];
                if (qCustomerID.IsNotNullOrEmpty())
                {
                    where += " and [CustomerID] = @CustomerID";
                    dbParams.Add(db.CreateParameter("CustomerID", qCustomerID));
                }
                object qCreateDateStart = paras["qCreateDateStart"];
                if (qCreateDateStart.IsNotNullOrEmpty())
                {
                    where += " and [CreateDate] >= @CreateDateStart";
                    dbParams.Add(db.CreateParameter("CreateDateStart", qCreateDateStart));
                }
                object qCreateDateEnd = paras["qCreateDateEnd"];
                if (qCreateDateEnd.IsNotNullOrEmpty())
                {
                    where += " and [CreateDate] < @CreateDateEnd";
                    dbParams.Add(db.CreateParameter("CreateDateEnd", ((DateTime)qCreateDateEnd).AddDays(1)));
                }
                object qOrderType = paras["qOrderType"];
                if (qOrderType.IsNotNullOrEmpty())
                {
                    where += " and ([OrderType]&@OrderType)[email protected]";
                    dbParams.Add(db.CreateParameter("OrderType", qOrderType));
                }
                object qIsSnap = paras["qIsSnap"];
                if (qIsSnap.IsNotNullOrEmpty())
                {
                    where += " and [IsSnap] = @IsSnap";
                    dbParams.Add(db.CreateParameter("IsSnap",qIsSnap));
                }
                object qDeleteFlag = paras["qDeleteFlag"];
                if (qDeleteFlag.IsNotNullOrEmpty())
                {
                    where += " and [DeleteFlag] = @DeleteFlag";
                    dbParams.Add(db.CreateParameter("DeleteFlag", qDeleteFlag));
                }

            }
            #endregion

            string orderBy = "[CreateDate] desc";
            if (orderCol == 0)
            {
                orderBy =  "[CreateDate] desc";
            }
            else if (orderCol == 1)
            {
                orderBy = "[OrderID]";
            }
            else if (orderCol == 2)
            {
                orderBy = "[OrderID] desc";
            }
            else if (orderCol == 3)
            {
                orderBy = "[CustomerID]";
            }
            else if (orderCol == 4)
            {
                orderBy = "[CustomerID] desc";
            }
            else if (orderCol == 5)
            {
                orderBy = "[DateOrder]";
            }
            else if (orderCol == 6)
            {
                orderBy = "[DateOrder] desc";
            }
            else if (orderCol == 7)
            {
                orderBy = "[DateShip]";
            }
            else if (orderCol == 8)
            {
                orderBy = "[DateShip] desc";
            }
            else if (orderCol == 9)
            {
                orderBy = "[CreateDate]";
            }
            else if (orderCol == 10)
            {
                orderBy = "[CreateDate] desc";
            }
            int RecordCount = db.Count<Z10Order>(where, dbParams.ToArray());
            int PageCount =0;
            if (RecordCount % PageSize == 0)
            {
//.........这里部分代码省略.........
开发者ID:honj51,项目名称:EAP,代码行数:101,代码来源:Z10OrderHelper.cs

示例14: GetParentID_Industrys

 /// <summary>
 /// 获取 [行业 的 父行业] 的 [行业] 集合
 /// </summary>
 public static List<Industry> GetParentID_Industrys(Zippy.Data.IDalProvider db, Industry entity)
 {
     if (entity.IndustryID.HasValue)
            return db.Take<Industry>("[email protected]", db.CreateParameter("ParentID", entity.IndustryID));
     return new List<Industry>();
 }
开发者ID:honj51,项目名称:EAP,代码行数:9,代码来源:IndustryHelper.cs

示例15: GetParentIDEntity

 /// <summary>
 /// 表示 [父行业] 对应的实体
 /// </summary>
 public static Industry GetParentIDEntity(Zippy.Data.IDalProvider db, Industry entity)
 {
     return db.FindUnique<Industry>("[email protected]", db.CreateParameter("IndustryID", entity.ParentID));
 }
开发者ID:honj51,项目名称:EAP,代码行数:7,代码来源:IndustryHelper.cs


注:本文中的Zippy.CreateParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。