• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CY类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CY的典型用法代码示例。如果您正苦于以下问题:C# CY类的具体用法?C# CY怎么用?C# CY使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CY类属于命名空间,在下文中一共展示了CY类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetCommentCountByMiniBlogId

        public int GetCommentCountByMiniBlogId(CY.UME.Core.Business.MiniBlog miniBlog)
        {
            int count = 0;

            if (miniBlog == null)
            {
                return count;
            }

            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@MiniBlogId", SqlDbType.BigInt, miniBlog.Id);
            SqlDataReader reader = sql.ExecuteSPReader("USP_MiniBlogComment_SelectCount_By_MiniBlogId");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) count = reader.GetInt32(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }

            return count;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:28,代码来源:MiniBlogCommentProvider.cs


示例2: GetAllGrade

        //��ѯ�����꼶
        public IList<Core.Business.Grade> GetAllGrade(CY.UME.Core.PagingInfo pagingInfo)
        {
            IList<Core.Business.Grade> gradelist = new List<Core.Business.Grade>();
            SqlServerUtility sql = new SqlServerUtility(SqlConnectionString);

            sql.AddParameter("@PageNumber", SqlDbType.Int, pagingInfo.CurrentPage);
            sql.AddParameter("@PageSize", SqlDbType.Int, pagingInfo.PageSize);

            sql.AddParameter("@Tables", SqlDbType.NVarChar, "Grade");
            sql.AddParameter("@PK", SqlDbType.NVarChar, "Id");
            sql.AddParameter("@Sort", SqlDbType.NVarChar, "Id DESC");
            sql.AddParameter("@Fields", SqlDbType.NVarChar, "[Id], [Year]");
            //sql.AddParameter("@Filter", SqlDbType.NVarChar, "");

            SqlDataReader reader = sql.ExecuteSPReader("Paging_RowCount");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Grade grade = new Core.Business.Grade();

                    if (!reader.IsDBNull(0)) grade.Id = reader.GetInt32(0);
                    if (!reader.IsDBNull(1)) grade.Year = reader.GetInt32(1);

                    grade.MarkOld();
                    gradelist.Add(grade);
                }
                reader.Close();
            }
            return gradelist;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:33,代码来源:GradeProvider.cs


示例3: ConstructorUnit

 /// <summary>
 ///  构建 Unit
 /// </summary>
 protected string ConstructorUnit(CY.CSTS.Core.Business.UnitSearchJson json, CY.CSTS.Core.Business.PagingInfo pageinfo)
 {
     StringBuilder sbResult = new StringBuilder();
     try
     {
         if (json == null || pageinfo == null)
         {
             throw new Exception("error");
         }
         sbResult.Append("[");
         IEnumerable<CY.CSTS.Core.Business.UnitInfo> units = CY.CSTS.Core.Business.UnitInfo.SelectUnitinfoBySearchConditionPageInfo(json, pageinfo);
         if (units != null)
         {
             foreach (CY.CSTS.Core.Business.UnitInfo unit in units)
             {
                 sbResult.Append("{");
                 sbResult.Append(string.Format("id:'{0}'", CY.Utility.Common.StringUtility.HTMLEncode(unit.Id.ToString())));
                 sbResult.Append(string.Format(",name:'{0}'", CY.Utility.Common.StringUtility.HTMLEncode(unit.UnitName)));
                 sbResult.Append("},");
             }
             if (units.Count() > 0)
             {
                 sbResult.Remove(sbResult.Length - 1, 1);
             }
         }
         sbResult.Append("]");
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return sbResult.ToString();
 }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:36,代码来源:GetUnitList.ashx.cs


示例4: GetAccountRequestList

        /// <summary>
        /// ��ø��û������ĺ�������
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        public IList<CY.UME.Core.Business.Friendship> GetAccountRequestList(CY.UME.Core.Business.Account account)
        {
            string sqlstr = "AccountId=" + account.Id;
            IList<Core.Business.Friendship> friendshiplist = new List<Core.Business.Friendship>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            string sqlwhere = "SELECT  * FROM [dbo].[Friendship] where ";
            sqlwhere += sqlstr + " ORDER BY [Id] desc";
            SqlDataReader reader = sql.ExecuteSqlReader(sqlwhere);

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Friendship friendship = new Core.Business.Friendship();

                    if (!reader.IsDBNull(0)) friendship.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) friendship.AccountId = reader.GetInt64(1);
                    if (!reader.IsDBNull(2)) friendship.FriendId = reader.GetInt64(2);
                    if (!reader.IsDBNull(3)) friendship.GroupId = reader.GetInt64(3);
                    if (!reader.IsDBNull(4)) friendship.IsChecked = reader.GetBoolean(4);
                    if (!reader.IsDBNull(5)) friendship.Remark = reader.GetString(5);
                    if (!reader.IsDBNull(6)) friendship.CommunicateNum = reader.GetInt32(6);
                    if (!reader.IsDBNull(7)) friendship.DateCreated = reader.GetDateTime(7);

                    friendship.MarkOld();
                    friendshiplist.Add(friendship);
                }
                reader.Close();
            }
            return friendshiplist;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:37,代码来源:FriendshipProvider.cs


示例5: BindData

        protected void BindData(CY.UME.Core.Business.Activities active)
        {
            CY.UME.Core.PagingInfo pageInfo = new CY.UME.Core.PagingInfo();

            pageInfo.CurrentPage = 1;
            pageInfo.PageSize = 20;

            if (active != null)
            {
                topicList = CY.UME.Core.Business.Topic.GetActiveTopicesByDateCreated(active.Id.ToString(), pageInfo);
            }

            int count = active.GetActiveTopicesNum();

            authorname.Value = "";
            minviewnum.Value = "";
            maxviewnum.Value = "";
            minreplynum.Value = "";
            maxreplynum.Value = "";
            title.Value = "";

            tm_HiddenPageSize.Value = "20";
            tm_HiddenRecordCount.Value = count.ToString();
            tm_HiddenSiteUrl.Value = SiteUrl;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:25,代码来源:TopManage.aspx.cs


示例6: TryGetAccount

        private bool TryGetAccount(long accountId, out CY.UME.Core.Business.Account account)
        {
            account = null;

            if (accountId < 1)
            {
                return false;
            }

            try
            {
                account = CY.UME.Core.Business.Account.Load(accountId);

                if (account != null)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch
            {
                return false;
            }
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:27,代码来源:CreditService.cs


示例7: Initial

        /// <summary>
        /// 
        /// </summary>
        /// <param name="json"></param>
        /// <param name="centers"></param>
        /// <param name="assists"></param>
        protected void Initial(out CY.CSTS.Core.Business.InstrumentStatisticalJson json, out IEnumerable<CY.CSTS.Core.Business.UnitInfo> centers, out IEnumerable<CY.CSTS.Core.Business.UnitInfo> assists)
        {
            try
            {

                centers = CY.CSTS.Core.Business.UnitInfo.SelectUnitInfosByUnitFlag(CY.Utility.Common.CodeInterface.UnitFlag.SubCenter);

                if (centers != null)
                {
                    centers = centers.Where(item => item.AuditingState == CY.Utility.Common.CodeInterface.UnitState.Audited);
                }
                assists = CY.CSTS.Core.Business.UnitInfo.SelectUnitInfosByUnitFlag(CY.Utility.Common.CodeInterface.UnitFlag.AssistUnit);

                if (assists != null)
                {
                    assists = assists.Where(item => item.AuditingState == CY.Utility.Common.CodeInterface.UnitState.Audited);
                }

                json = new CY.CSTS.Core.Business.InstrumentStatisticalJson();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:31,代码来源:InstrumentStatistical.aspx.cs


示例8: AddMessage

        public void AddMessage(String Content, CY.UME.Core.Business.AsynResult asynResult, String accountId)
        {
            //当传入的内容为"-1"时,表示为建立连接请求,即为了维持一个从客户端到服务器的链接而建立的链接(那个等待的链接)
            //此时该链接保存到Ilist<AsynResult> Clients中,等待再有消息发送过来时,该Clients会被遍历,并且会在该消息输出后结束该链接
            if (Content == "-1")
            {
                Clients.Add(asynResult);
            }
            else
            {
                //将当前请求的内容输出到客户端
                asynResult.Content = Content;
                asynResult.AccountId = accountId;
                asynResult.Send(null);

                //遍历说有已缓存的Clients,并将当前内容输出到客户端
                foreach (AsynResult result in Clients)
                {
                    result.Content = Content;
                    result.AccountId = accountId;
                    result.Send(null);
                }

                //清空Ilist<AsynResult> Clients
                Clients.Clear();
            }
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:27,代码来源:CometMessage.cs


示例9: BindData

        protected void BindData(CY.UME.Core.Business.Group group)
        {
            CY.UME.Core.PagingInfo pageInfo = new CY.UME.Core.PagingInfo();

            pageInfo.CurrentPage = 1;
            pageInfo.PageSize = 15;

            CY.UME.Core.Business.Album album =new CY.UME.Core.Business.Album();
            if (group != null)
            {
                album = group.GetGroupAlbum();
                picList = album.GetPictures(pageInfo);
            }

            int count = album.GetPictureCount();

            DDLGroup.SelectedValue = group.Id.ToString();

            minPubDate.Value = "";
            maxPubDate.Value = "";
            picname.Value = "";
            authorName.Value = "";

            gpm_HiddenPageSize.Value = "15";
            gpm_HiddenRecordCount.Value = count.ToString();
            gpm_HiddenSiteUrl.Value = SiteUrl;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:27,代码来源:GroupPictureManage.aspx.cs


示例10: Add

        public void Add(CY.HotelBooking.Core.Business.Web_Module m)
        {
            SqlServerUtility sqlhelper = new SqlServerUtility();
            sqlhelper.AddParameter("@Module_Code", SqlDbType.VarChar, m.Module_Code, 10);
            sqlhelper.AddParameter("@Module_Name", SqlDbType.VarChar, m.Module_Name, 20);
            sqlhelper.AddParameter("@Module_IsParent", SqlDbType.VarChar, m.Module_IsParent);

            SqlDataReader reader = sqlhelper.ExecuteSqlReader(strSQLInsert);

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0))
                {
                    int id;
                    if (int.TryParse(reader.GetValue(0).ToString(), out id))
                    {
                        m.Id = id;
                    }
                }

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
开发者ID:dalinhuang,项目名称:cyhotelbooking,代码行数:28,代码来源:Web_ModuleProvider.cs


示例11: Insert

        public void Insert(CY.HotelBooking.Core.Business.Settings setting)
        {
            SqlServerUtility db = new SqlServerUtility();

            db.AddParameter("@HotelName", SqlDbType.NVarChar, setting.HotelName);
            db.AddParameter("@Copyright", SqlDbType.NVarChar, setting.Copyright);
            db.AddParameter("@Author", SqlDbType.NVarChar, setting.SysAuthor);
            db.AddParameter("@ReadInfo",SqlDbType.Text,setting.ReadInfo);
            db.AddParameter("@Contact", SqlDbType.Text, setting.Contact);
            db.AddParameter("@Address", SqlDbType.Text, setting.Address);
            db.AddParameter("@EmailBody", SqlDbType.Text, setting.EmailBody);

            SqlDataReader reader = db.ExecuteSqlReader(SqlInsertSetting);

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0))
                {
                    int id;
                    if (int.TryParse(reader.GetValue(0).ToString(), out id))
                    {
                        setting.Id = id;
                    }
                }

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
开发者ID:dalinhuang,项目名称:cyhotelbooking,代码行数:33,代码来源:SettingsProvider.cs


示例12: BindData

        protected void BindData(CY.UME.Core.Business.Group group)
        {
            CY.UME.Core.PagingInfo pageInfo = new CY.UME.Core.PagingInfo();

            pageInfo.CurrentPage = 1;
            pageInfo.PageSize = 20;

            if (group != null)
            {
                topicList = CY.UME.Core.Business.Topic.GetGroupTopicesByDateCreated(group.Id.ToString(), pageInfo);
            }

            int count = group.GetGroupTopicesNum();

            DDLGroup.SelectedValue = group.Id.ToString();
            authorname.Value = "";
            minviewnum.Value = "";
            maxviewnum.Value = "";
            minreplynum.Value = "";
            maxreplynum.Value = "";
            title.Value = "";
            isRecommend.SelectedIndex = 0;

            tm_HiddenPageSize.Value = "20";
            tm_HiddenRecordCount.Value = count.ToString();
            tm_HiddenSiteUrl.Value = SiteUrl;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:27,代码来源:TopicManage.aspx.cs


示例13: GetAllNotice

        public List<CY.UME.Core.Business.Notice> GetAllNotice(CY.UME.Core.Business.Account account)
        {
            List<Core.Business.Notice> noticelist = new List<Core.Business.Notice>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@AccountId", SqlDbType.BigInt, account.Id);
            SqlDataReader reader = sql.ExecuteSPReader("USP_Notice_SelectAll_By_AccountId");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Notice notice = new Core.Business.Notice();

                    if (!reader.IsDBNull(0)) notice.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) notice.Content = reader.GetString(1);
                    if (!reader.IsDBNull(2)) notice.AccountId = reader.GetInt64(2);
                    if (!reader.IsDBNull(3)) notice.AuthorId = reader.GetInt64(3);
                    if (!reader.IsDBNull(4)) notice.DateCreated = reader.GetDateTime(4);
                    if (!reader.IsDBNull(5)) notice.IsReaded = reader.GetBoolean(5);
                    if (!reader.IsDBNull(6)) notice.Type = reader.GetString(6);
                    if (!reader.IsDBNull(7)) notice.InstanceId = reader.GetString(7);

                    notice.MarkOld();
                    noticelist.Add(notice);
                }
                reader.Close();
            }
            return noticelist;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:30,代码来源:NoticeProvider.cs


示例14: GetCommentCountByFavoritesId

        public int GetCommentCountByFavoritesId(CY.UME.Core.Business.Favorites favorites)
        {
            int count = 0;

            if (favorites == null)
            {
                return count;
            }

            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@FavoritesId", SqlDbType.BigInt, favorites.Id);
            SqlDataReader reader = sql.ExecuteSqlReader(SqlGetFavoritesCommentCountByInstanceId);

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) count = reader.GetInt32(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }

            return count;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:28,代码来源:FavoritesCommentProvider.cs


示例15: BuildMenu

        private string BuildMenu(CY.CSTS.Core.Business.Control.sfMenu menu)
        {
            System.Text.StringBuilder sbResult = new StringBuilder();
            try
            {
                if (menu != null)
                {

                    sbResult.Append(string.Format("<ul id='{0}' >", menu.Name));
                    if (menu.SubMenu != null && menu.SubMenu.Count() > 0)
                    {

                        foreach (sfMenu m in menu.SubMenu)
                        {
                            sbResult.Append(string.Format("<li><a href='{0}'>{1}</a>", m.Url, m.Name));
                            if (m.SubMenu != null && m.SubMenu.Count() > 0)
                            {
                                sbResult.Append(BuildMenu(m));
                            }
                            sbResult.Append("</li>");
                        }

                    }
                    sbResult.Append("</ul>");

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return sbResult.ToString();
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:33,代码来源:Menu.ascx.cs


示例16: Add

        public void Add(CY.HotelBooking.Core.Business.Web_News n)
        {
            SqlServerUtility sqlhelper = new SqlServerUtility();
            sqlhelper.AddParameter("@News_Title", SqlDbType.VarChar, n.News_Title, 100);
            sqlhelper.AddParameter("@News_Content", SqlDbType.Text, n.News_Content);
            sqlhelper.AddParameter("@News_PubDate", SqlDbType.DateTime, n.News_PubDate);
            sqlhelper.AddParameter("@Module_Code", SqlDbType.VarChar, n.Module_Code, 10);
            sqlhelper.AddParameter("@Manager_Code", SqlDbType.VarChar, n.Manager_Code, 10);

            SqlDataReader reader = sqlhelper.ExecuteSqlReader(strSQLInsert);

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0))
                {
                    int id;
                    if (int.TryParse(reader.GetValue(0).ToString(), out id))
                    {
                        n.Id = id;
                    }
                }

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
开发者ID:dalinhuang,项目名称:cyhotelbooking,代码行数:30,代码来源:Web_NewsProvider.cs


示例17: BindData

        protected void BindData(CY.UME.Core.Business.Activities active)
        {
            CY.UME.Core.PagingInfo pageInfo = new CY.UME.Core.PagingInfo();

            pageInfo.CurrentPage = 1;
            pageInfo.PageSize = 15;

            CY.UME.Core.Business.Album album = new CY.UME.Core.Business.Album();
            if (active != null)
            {
                album = active.GetActiveAlbum();
                picList = album.GetPictures(pageInfo);
            }

            int count = album.GetPictureCount();

            minPubDate.Value = "";
            maxPubDate.Value = "";
            picname.Value = "";
            authorName.Value = "";

            gpm_HiddenPageSize.Value = "15";
            gpm_HiddenRecordCount.Value = count.ToString();
            gpm_HiddenSiteUrl.Value = SiteUrl;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:25,代码来源:PictureManage.aspx.cs


示例18: Delete

        public void Delete(CY.CSTS.Core.Business.VoteAnswer voteAnswer)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Key", SqlDbType.Int, voteAnswer.Id);
            sql.ExecuteSql(SqlDeleteVoteAnswer);
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:7,代码来源:VoteAnswerProvider.cs


示例19: GetBlogTypesByAccountId

        public IList<CY.UME.Core.Business.BlogType> GetBlogTypesByAccountId(CY.UME.Core.Business.Account account)
        {
            IList<Core.Business.BlogType> blogTypelist = new List<Core.Business.BlogType>();

            if (account == null)
            {
                return blogTypelist;
            }

            SqlServerUtility sql = new SqlServerUtility(SqlConnection);

            sql.AddParameter("@AccountId", SqlDbType.BigInt, account.Id);

            SqlDataReader reader = sql.ExecuteSPReader("USP_BlogType_Select_By_AccountId");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.BlogType blogType = new Core.Business.BlogType();

                    if (!reader.IsDBNull(0)) blogType.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) blogType.DateCreated = reader.GetDateTime(1);
                    if (!reader.IsDBNull(2)) blogType.AccountId = reader.GetInt64(2);
                    if (!reader.IsDBNull(3)) blogType.Name = reader.GetString(3);

                    blogType.MarkOld();
                    blogTypelist.Add(blogType);
                }
                reader.Close();
            }
            return blogTypelist;
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:33,代码来源:BlogTypeProvider.cs


示例20: DeleteRelativeGroups

        public void DeleteRelativeGroups(CY.UME.Core.Business.Group group, CY.UME.Core.Business.Group relativeGroup)
        {
            SqlServerUtility sql = new SqlServerUtility(SqlConnection);

            sql.AddParameter("@GroupId", SqlDbType.Int, group.Id);
            sql.AddParameter("@RelativeGroupId", SqlDbType.Int, relativeGroup.Id);
            sql.ExecuteSP("USP_RelativeGroup_Delete_By_GroupId_And_RelativeGroupId");
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:8,代码来源:RelativeGroupProvider.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Core.PagingInfo类代码示例发布时间:2022-05-24
下一篇:
C# CXXConstructExpr类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap