public UserGroupInfoExtend(bool isAllowVisit, bool isAllowHide, bool isAllowSignature, ETriState searchType, int searchInterval, bool isAllowRead, bool isAllowPost, bool isAllowReply, bool isAllowPoll, int maxPostPerDay, int postInterval, ETriState uploadType, ETriState downloadType, bool isAllowSetAttachmentPermissions, int maxSize, int maxSizePerDay, int maxNumPerDay, string attachmentExtensions) { var nameValueCollection = new NameValueCollection(); SetExtendedAttribute(nameValueCollection); IsAllowVisit = isAllowVisit; IsAllowHide = isAllowHide; IsAllowSignature = isAllowSignature; SearchType = ETriStateUtils.GetValue(searchType); SearchInterval = searchInterval; IsAllowRead = isAllowRead; IsAllowPost = isAllowPost; IsAllowReply = isAllowReply; IsAllowPoll = isAllowPoll; MaxPostPerDay = maxPostPerDay; PostInterval = postInterval; UploadType = ETriStateUtils.GetValue(uploadType); DownloadType = ETriStateUtils.GetValue(downloadType); IsAllowSetAttachmentPermissions = isAllowSetAttachmentPermissions; MaxSize = maxSize; MaxSizePerDay = maxSizePerDay; MaxNumPerDay = maxNumPerDay; AttachmentExtensions = attachmentExtensions; }
public string GetSelectCommend(ETriState successState, string keyword, string dateFrom, string dateTo) { var whereString = new StringBuilder("WHERE "); if (successState != ETriState.All) { whereString.AppendFormat("IsSuccess = '{0}'", ETriStateUtils.GetValue(successState)); } else { whereString.Append("1 = 1"); } if (!string.IsNullOrEmpty(keyword)) { whereString.Append(" AND "); whereString.AppendFormat("(ErrorMessage LIKE '%{0}%')", PageUtils.FilterSql(keyword)); } if (!string.IsNullOrEmpty(dateFrom)) { whereString.Append(" AND "); whereString.AppendFormat("(AddDate >= '{0}')", dateFrom); } if (!string.IsNullOrEmpty(dateTo)) { whereString.Append(" AND "); whereString.AppendFormat("(AddDate <= '{0}')", dateTo); } return("SELECT ID, CreateType, PublishmentSystemID, TaskName, TimeSpan, IsSuccess, ErrorMessage, AddDate FROM siteserver_CreateTaskLog " + whereString); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } if (!IsPostBack) { PhExport.Visible = true; ETriStateUtils.AddListItems(DdlCheckedState, "全部", "审核通过", "未审核"); ControlUtils.SelectSingleItem(DdlCheckedState, ETriStateUtils.GetValue(ETriState.All)); } }
public static string GetRedirectUrlStringToExportContent(int siteId, int channelId, string exportType, string contentIdCollection, string displayAttributes, bool isPeriods, string startDate, string endDate, ETriState checkedState) { return(PageUtils.GetCmsUrl(siteId, nameof(ModalExportMessage), new NameValueCollection { { "channelId", channelId.ToString() }, { "ExportType", exportType }, { "contentIdCollection", contentIdCollection }, { "DisplayAttributes", displayAttributes }, { "isPeriods", isPeriods.ToString() }, { "startDate", startDate }, { "endDate", endDate }, { "checkedState", ETriStateUtils.GetValue(checkedState) } })); }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } _styleId = Body.GetQueryInt("StyleID"); _tableStyle = ETableStyleUtils.GetEnumType(Body.GetQueryString("TableStyle")); var relatedIdentity = Body.GetQueryInt("RelatedIdentity"); var tagStyleInfo = DataProvider.TagStyleDao.GetTagStyleInfo(_styleId); if (_tableStyle == ETableStyle.GovInteractContent) { _mailSmsInfo = new TagStyleGovInteractApplyInfo(tagStyleInfo.SettingsXML); } if (!IsPostBack) { ltlTips2.Text = $"[{ContentAttribute.AddDate}]代表提交时间,[{GovInteractContentAttribute.QueryCode}]代表查询码,"; var styleInfoList = RelatedIdentities.GetTableStyleInfoList(PublishmentSystemInfo, _tableStyle, relatedIdentity); foreach (var styleInfo in styleInfoList) { if (styleInfo.IsVisible) { ltlTips2.Text += $@"[{styleInfo.AttributeName}]代表{styleInfo.DisplayName},"; } } ltlTips2.Text = ltlTips2.Text.TrimEnd(','); //短信 ControlUtils.SelectListItemsIgnoreCase(rblIsSMS, _mailSmsInfo.IsSMS.ToString()); rblIsSMS_SelectedIndexChanged(null, EventArgs.Empty); ControlUtils.SelectListItemsIgnoreCase(rblSMSReceiver, ETriStateUtils.GetValue(_mailSmsInfo.SMSReceiver)); rblSMSReceiver_SelectedIndexChanged(null, EventArgs.Empty); tbSMSTo.Text = _mailSmsInfo.SMSTo; foreach (var styleInfo in styleInfoList) { if (styleInfo.IsVisible) { var listItem = new ListItem(styleInfo.DisplayName + "(" + styleInfo.AttributeName + ")", styleInfo.AttributeName); if (StringUtils.EqualsIgnoreCase(styleInfo.AttributeName, _mailSmsInfo.SMSFiledName)) { listItem.Selected = true; } ddlSMSFiledName.Items.Add(listItem); } } ControlUtils.SelectListItemsIgnoreCase(rblIsSMSTemplate, _mailSmsInfo.IsSMSTemplate.ToString()); rblIsSMSTemplate_SelectedIndexChanged(null, EventArgs.Empty); tbSMSContent.Text = _mailSmsInfo.SMSContent; if (string.IsNullOrEmpty(tbSMSContent.Text)) { tbSMSContent.Text = MessageManager.GetSmsContent(styleInfoList); } } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } if (IsPostBack) { return; } VerifySystemPermissions(ConfigManager.SettingsPermissions.SiteAdd); DataProvider.TableDao.CreateAllTableCollectionInfoIfNotExists(); var hqSiteId = DataProvider.SiteDao.GetIdByIsRoot(); if (hqSiteId == 0) { ControlUtils.SelectSingleItem(RblIsRoot, true.ToString()); PhIsNotRoot.Visible = false; } else { RblIsRoot.Enabled = false; } DdlParentId.Items.Add(new ListItem("<无上级站点>", "0")); var siteIdArrayList = SiteManager.GetSiteIdList(); var mySystemInfoArrayList = new ArrayList(); var parentWithChildren = new Hashtable(); foreach (var siteId in siteIdArrayList) { var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo.IsRoot == false) { if (siteInfo.ParentId == 0) { mySystemInfoArrayList.Add(siteInfo); } else { var children = new ArrayList(); if (parentWithChildren.Contains(siteInfo.ParentId)) { children = (ArrayList)parentWithChildren[siteInfo.ParentId]; } children.Add(siteInfo); parentWithChildren[siteInfo.ParentId] = children; } } } foreach (SiteInfo siteInfo in mySystemInfoArrayList) { AddSite(DdlParentId, siteInfo, parentWithChildren, 0); } ControlUtils.SelectSingleItem(DdlParentId, "0"); ECharsetUtils.AddListItems(DdlCharset); ControlUtils.SelectSingleItem(DdlCharset, ECharsetUtils.GetValue(ECharset.utf_8)); var tableList = DataProvider.TableDao.GetTableCollectionInfoListCreatedInDb(); foreach (var tableInfo in tableList) { if (tableInfo.DisplayName.StartsWith("插件内容表:")) { continue; } var li = new ListItem($"{tableInfo.DisplayName}({tableInfo.TableName})", tableInfo.TableName); DdlTableName.Items.Add(li); } RblIsCheckContentUseLevel.Items.Add(new ListItem("默认审核机制", false.ToString())); RblIsCheckContentUseLevel.Items.Add(new ListItem("多级审核机制", true.ToString())); ControlUtils.SelectSingleItem(RblIsCheckContentUseLevel, false.ToString()); if (SiteTemplateManager.Instance.IsSiteTemplateExists) { RblSource.Items.Add(new ListItem("创建空站点(不使用站点模板)", ETriStateUtils.GetValue(ETriState.True))); RblSource.Items.Add(new ListItem("使用本地站点模板创建站点", ETriStateUtils.GetValue(ETriState.False))); RblSource.Items.Add(new ListItem("使用在线站点模板创建站点", ETriStateUtils.GetValue(ETriState.All))); } else { RblSource.Items.Add(new ListItem("创建空站点(不使用站点模板)", ETriStateUtils.GetValue(ETriState.True))); RblSource.Items.Add(new ListItem("使用在线站点模板创建站点", ETriStateUtils.GetValue(ETriState.All))); } ControlUtils.SelectSingleItem(RblSource, ETriStateUtils.GetValue(ETriState.True)); var siteTemplateDir = AuthRequest.GetQueryString("siteTemplateDir"); var onlineTemplateName = AuthRequest.GetQueryString("onlineTemplateName"); if (!string.IsNullOrEmpty(siteTemplateDir)) { HihSiteTemplateDir.Value = siteTemplateDir; ControlUtils.SelectSingleItem(RblSource, ETriStateUtils.GetValue(ETriState.False)); BtnNext_Click(null, EventArgs.Empty); } else if (!string.IsNullOrEmpty(onlineTemplateName)) { HihOnlineTemplateName.Value = onlineTemplateName; ControlUtils.SelectSingleItem(RblSource, ETriStateUtils.GetValue(ETriState.All)); BtnNext_Click(null, EventArgs.Empty); } }
public static int GetCountOfContentAdd(string tableName, int siteId, int channelId, EScopeType scope, DateTime begin, DateTime end, string userName, ETriState checkedState) { var cacheKey = StlCacheUtils.GetCacheKey(nameof(Content), nameof(GetCountOfContentAdd), siteId.ToString(), channelId.ToString(), EScopeTypeUtils.GetValue(scope), DateUtils.GetDateString(begin), DateUtils.GetDateString(end), userName, ETriStateUtils.GetValue(checkedState)); var retval = StlCacheUtils.GetIntCache(cacheKey); if (retval != -1) { return(retval); } lock (LockObject) { retval = StlCacheUtils.GetIntCache(cacheKey); if (retval == -1) { retval = DataProvider.ContentDao.GetCountOfContentAdd(tableName, siteId, channelId, scope, begin, end, userName, checkedState); StlCacheUtils.SetCache(cacheKey, retval); } } return(retval); }