Exemplo n.º 1
0
        public static string GetCommandItemRowsHtml(ETableStyle tableStyle, PublishmentSystemInfo publishmentSystemInfo, NodeInfo nodeInfo, ContentInfo contentInfo, string pageUrl, string administratorName)
        {
            var builder = new StringBuilder();

            var modelType = EContentModelTypeUtils.GetEnumType(nodeInfo.ContentModelId);

            if (modelType == EContentModelType.Photo)
            {
                var contentPhotoUploadUrl = PageContentPhotoUpload.GetRedirectUrl(publishmentSystemInfo.PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, pageUrl);
                builder.Append(
                    $@"<td class=""center"" width=""50""><a href=""{contentPhotoUploadUrl}"">图片</a><span style=""color:gray"">({contentInfo
                        .Photos})</span></td>");
            }
            else if (modelType == EContentModelType.Job)
            {
                var resumeNum = DataProvider.ResumeContentDao.GetCount(publishmentSystemInfo.PublishmentSystemId, contentInfo.Id);
                var urlResume = PageResumeContent.GetRedirectUrl(publishmentSystemInfo.PublishmentSystemId, contentInfo.Id, StringUtils.ValueToUrl(pageUrl));;
                builder.Append(
                    $@"<td class=""center"" width=""50""><a href=""{urlResume}"">简历</a><span style=""color:gray"">({resumeNum})</span></td>");
            }

            if (publishmentSystemInfo.Additional.IsCommentable && modelType != EContentModelType.Job)
            {
                if (AdminUtility.HasChannelPermissions(administratorName, publishmentSystemInfo.PublishmentSystemId, contentInfo.NodeId, AppManager.Cms.Permission.Channel.CommentCheck, AppManager.Cms.Permission.Channel.CommentDelete))
                {
                    //var urlComment = PageComment.GetRedirectUrl(publishmentSystemInfo.PublishmentSystemID, contentInfo.NodeId, contentInfo.Id, pageUrl);
                    var urlComment = PageComments.GetRedirectUrl(publishmentSystemInfo.PublishmentSystemId, contentInfo.NodeId, contentInfo.Id, pageUrl);
                    builder.Append(
                        $@"<td class=""center"" width=""50""><a href=""{urlComment}"">评论</a><span style=""color:gray"">({contentInfo
                            .Comments})</span></td>");
                }
            }

            return(builder.ToString());
        }
 public PresenterQuotLaunch(String mainConnString)
 {
     dataConnectionString = mainConnString;
     cotizacion           = new CotizacionCLE(dataConnectionString);
     pageComm             = new PageComments();
     errores = new Dictionary <string, List <String> >();
 }
Exemplo n.º 3
0
        /// <summary>
        /// Creates PageComments for records In the prefilled DataReader, And puts them into a HashTable
        /// </summary>
        /// <param name="dr">The DataReader prefilled With the PageComments records</param>
        /// <returns>The Hashtable containing PageComments objects And their ID As key.</returns>
        protected static Hashtable ConvertReaderToHashTable(SqlDataReader dr)
        {
            Hashtable result = new Hashtable();

            while (dr.Read())
            {
                PageComments myPageComments = new PageComments();

                myPageComments.m_intPageCommentID = dr.GetSqlInt32(0);
                myPageComments.m_intMemberID      = dr.GetSqlInt32(1);
                myPageComments.m_intPageID        = dr.GetSqlInt32(2);
                myPageComments.m_strComment       = dr.GetSqlString(3);
                myPageComments.m_intPoint         = dr.GetSqlInt32(4);
                myPageComments.m_intStatus        = dr.GetSqlInt32(5);

                result.Add(myPageComments.PageCommentID, myPageComments);
            }

            return(result);
        }
 public PresenterQuest(String mainConnString)
 {
     dataConnectionString = mainConnString;
     pageComm             = new PageComments();
 }