Example #1
0
 public string GetDownloadApiUrl(bool isInner, string filePath)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(_settingsManager.ApiHost, Constants.ApiPrefix, Constants.ApiStlPrefix, Constants.RouteStlActionsDownload), new NameValueCollection
     {
         { "filePath", _settingsManager.Encrypt(filePath) }
     }));
 }
Example #2
0
 public static string GetUrl(string apiUrl, string filePath)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(apiUrl, Route), new NameValueCollection
     {
         { "filePath", TranslateUtils.EncryptStringBySecretKey(filePath) }
     }));
 }
Example #3
0
        public string GetEditStyleHtml(int tableMetadataId, string attributeName)
        {
            var tableStyle       = EAuxiliaryTableTypeUtils.GetTableStyle(_tableType);
            var styleInfo        = TableStyleManager.GetTableStyleInfo(tableStyle, _tableName, attributeName, null);
            var showPopWinString = ModalTableStyleAdd.GetOpenWindowString(0, _tableName, attributeName, tableStyle, _redirectUrl);

            var editText = "设置";

            if (styleInfo.TableStyleId != 0)//数据库中有样式
            {
                editText = "修改";
            }
            string retval = $"<a href=\"javascript:void 0;\" onClick=\"{showPopWinString}\">{editText}</a>";

            if (styleInfo.TableStyleId == 0)
            {
                return(retval);
            }

            var attributes = new NameValueCollection
            {
                { "DeleteStyle", true.ToString() },
                { "TableMetadataID", tableMetadataId.ToString() },
                { "AttributeName", attributeName }
            };
            var deleteUrl = PageUtils.AddQueryString(_redirectUrl, attributes);

            retval +=
                $@"&nbsp;&nbsp;<a href=""{deleteUrl}"" onClick=""javascript:return confirm('此操作将删除对应显示样式,确认吗?');"">删除</a>";
            return(retval);
        }
Example #4
0
 public static string GetLoginUrl(string homeUrl, string returnUrl)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(homeUrl, "#/login"), new NameValueCollection
     {
         { "returnUrl", returnUrl }
     }));
 }
Example #5
0
        private void RptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            var tableMetadataId = SqlUtils.EvalInt(e.Item.DataItem, nameof(TableMetadataInfo.Id));
            var attributeName   = SqlUtils.EvalString(e.Item.DataItem, nameof(TableMetadataInfo.AttributeName));
            var dataType        = SqlUtils.EvalString(e.Item.DataItem, nameof(TableMetadataInfo.DataType));
            var isSystem        = SqlUtils.EvalString(e.Item.DataItem, nameof(TableMetadataInfo.IsSystem));

            var ltlAttributeName = (Literal)e.Item.FindControl("ltlAttributeName");
            var ltlDataType      = (Literal)e.Item.FindControl("ltlDataType");
            var hlUp             = (HyperLink)e.Item.FindControl("hlUp");
            var hlDown           = (HyperLink)e.Item.FindControl("hlDown");
            var ltlEditUrl       = (Literal)e.Item.FindControl("ltlEditUrl");
            var ltlDeleteUrl     = (Literal)e.Item.FindControl("ltlDeleteUrl");

            ltlAttributeName.Text = attributeName;

            ltlDataType.Text = DataTypeUtils.GetText(DataTypeUtils.GetEnumType(dataType));

            if (TranslateUtils.ToBool(isSystem))
            {
                hlUp.Visible = hlDown.Visible = false;
                return;
            }

            hlUp.NavigateUrl = PageUtils.GetSettingsUrl(nameof(PageSiteTableMetadata),
                                                        new NameValueCollection
            {
                { "SiteId", SiteId.ToString() },
                { "SetTaxis", "True" },
                { "Direction", "UP" },
                { "TableMetadataId", tableMetadataId.ToString() },
                { "ENName", _tableName }
            });

            hlDown.NavigateUrl = PageUtils.GetSettingsUrl(nameof(PageSiteTableMetadata),
                                                          new NameValueCollection
            {
                { "SiteId", SiteId.ToString() },
                { "SetTaxis", "True" },
                { "Direction", "DOWN" },
                { "TableMetadataId", tableMetadataId.ToString() },
                { "ENName", _tableName }
            });

            ltlEditUrl.Text =
                $@"<a href=""javascript:;"" onclick=""{ModalTableMetadataAdd.GetOpenWindowStringToEdit(_tableName, tableMetadataId)}"">修改字段</a>";

            ltlDeleteUrl.Text =
                $@"<a href=""{PageUtils.AddQueryString(_redirectUrl, new NameValueCollection
                {
                    {"Delete", true.ToString()},
                    {"TableMetadataID", tableMetadataId.ToString()}
                })}"" onClick=""javascript:return confirm('此操作将删除辅助字段“{attributeName}”,确认吗?');"">删除字段</a>";
        }
Example #6
0
 public static string GetUrl(string apiUrl, int siteId, string fileUrl)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(apiUrl, Route), new NameValueCollection
     {
         { "siteId", siteId.ToString() },
         { "fileUrl", TranslateUtils.EncryptStringBySecretKey(fileUrl) }
     }));
 }
Example #7
0
 public string GetDownloadApiUrl(int siteId, string fileUrl)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(_settingsManager.ApiHost, Constants.ApiPrefix, Constants.ApiStlPrefix, Constants.RouteStlActionsDownload), new NameValueCollection
     {
         { "siteId", siteId.ToString() },
         { "fileUrl", _settingsManager.Encrypt(fileUrl) }
     }));
 }
Example #8
0
        public static string GetCouponHoldUrl(PublishmentSystemInfo publishmentSystemInfo, int keywordID, int actID, int snID, string keyword)
        {
            var attributes = new NameValueCollection();

            attributes.Add("snID", snID.ToString());
            attributes.Add("keyword", keyword);
            return(PageUtils.AddQueryString(GetCouponUrl(publishmentSystemInfo), attributes));
        }
        public void Page_Load(object sender, EventArgs e)
        {
            collectID     = TranslateUtils.ToInt(Request.QueryString["collectID"]);
            returnUrl     = StringUtils.ValueFromUrl(Request.QueryString["returnUrl"]);
            collectItemID = TranslateUtils.ToInt(Request.QueryString["collectItemID"]);
            if (IsForbidden)
            {
                return;
            }

            if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
            {
                var list = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (list.Count > 0)
                {
                    try
                    {
                        DataProviderWX.CollectItemDAO.Delete(PublishmentSystemID, list);
                        SuccessMessage("征集参赛选项删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "征集参赛选项删除失败!");
                    }
                }
            }

            if (collectItemID > 0)
            {
                try
                {
                    DataProviderWX.CollectItemDAO.Audit(PublishmentSystemID, collectItemID);
                    SuccessMessage("征集参赛选项审核成功!");
                }
                catch (Exception ex)
                {
                    FailMessage(ex, "征集参赛选项审核失败!");
                }
            }

            spContents.ControlToPaginate = rptContents;
            spContents.ItemsPerPage      = 30;
            spContents.ConnectionString  = BaiRongDataProvider.ConnectionString;
            spContents.SelectCommand     = DataProviderWX.CollectItemDAO.GetSelectString(PublishmentSystemID, collectID);
            spContents.SortField         = CollectItemAttribute.ID;
            spContents.SortMode          = SortMode.ASC;
            rptContents.ItemDataBound   += new RepeaterItemEventHandler(rptContents_ItemDataBound);

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.WeiXin.LeftMenu.ID_Function, AppManager.WeiXin.LeftMenu.Function.ID_Collect, "参赛记录", AppManager.WeiXin.Permission.WebSite.Collect);
                spContents.DataBind();

                var urlDelete = PageUtils.AddQueryString(GetRedirectUrl(PublishmentSystemID, collectID, returnUrl), "Delete", "True");
                btnDelete.Attributes.Add("onclick", JsUtils.GetRedirectStringWithCheckBoxValueAndAlert(urlDelete, "IDCollection", "IDCollection", "请选择需要删除的征集活动参赛选项", "此操作将删除所选征集活动参赛选项,确认吗?"));
                btnReturn.Attributes.Add("onclick", $"location.href='{returnUrl}';return false");
            }
        }
Example #10
0
 public static string GetUrl(string apiUrl, int publishmentSystemId, int channelId, int contentId)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(apiUrl, Route), new NameValueCollection
     {
         { "publishmentSystemId", publishmentSystemId.ToString() },
         { "channelId", channelId.ToString() },
         { "contentId", contentId.ToString() }
     }));
 }
Example #11
0
        public static string GetVoteUrl(PublishmentSystemInfo publishmentSystemInfo, VoteInfo voteInfo, string wxOpenID)
        {
            var attributes = new NameValueCollection();

            attributes.Add("voteID", voteInfo.Id.ToString());
            attributes.Add("publishmentSystemID", voteInfo.PublishmentSystemId.ToString());
            attributes.Add("wxOpenID", wxOpenID);
            return(PageUtils.AddQueryString(GetVoteUrl(publishmentSystemInfo, voteInfo), attributes));
        }
Example #12
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }
            lotteryType = ELotteryTypeUtils.GetEnumType(Request.QueryString["lotteryType"]);
            lotteryID   = TranslateUtils.ToInt(Request.QueryString["lotteryID"]);
            awardID     = TranslateUtils.ToInt(Request.QueryString["awardID"]);
            returnUrl   = StringUtils.ValueFromUrl(Request.QueryString["returnUrl"]);

            if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
            {
                var list = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (list.Count > 0)
                {
                    try
                    {
                        DataProviderWX.LotteryWinnerDAO.Delete(PublishmentSystemID, list);
                        SuccessMessage("删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "删除失败!");
                    }
                }
            }

            spContents.ControlToPaginate = rptContents;
            spContents.ItemsPerPage      = 30;
            spContents.ConnectionString  = BaiRongDataProvider.ConnectionString;
            spContents.SelectCommand     = DataProviderWX.LotteryWinnerDAO.GetSelectString(PublishmentSystemID, lotteryType, lotteryID, awardID);
            spContents.SortField         = LotteryWinnerAttribute.ID;
            spContents.SortMode          = SortMode.DESC;
            rptContents.ItemDataBound   += new RepeaterItemEventHandler(rptContents_ItemDataBound);

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.CMS.LeftMenu.ID_Configration, "获奖名单查看", string.Empty);

                spContents.DataBind();

                var totalNum = 0;
                var wonNum   = 0;
                DataProviderWX.LotteryAwardDAO.GetCount(PublishmentSystemID, lotteryType, lotteryID, out totalNum, out wonNum);
                InfoMessage($"总奖品数:{totalNum},已中奖人数:{wonNum},剩余奖品数:{totalNum - wonNum}");

                var urlDelete = PageUtils.AddQueryString(GetRedirectUrl(PublishmentSystemID, lotteryType, lotteryID, awardID, returnUrl), "Delete", "True");
                btnDelete.Attributes.Add("onclick", JsUtils.GetRedirectStringWithCheckBoxValueAndAlert(urlDelete, "IDCollection", "IDCollection", "请选择需要删除的获奖项", "此操作将删除所选获奖项,确认吗?"));

                btnSetting.Attributes.Add("onclick", Modal.WinnerSetting.GetOpenWindowString(PublishmentSystemID));

                btnExport.Attributes.Add("onclick", Modal.Export.GetOpenWindowStringByLottery(PublishmentSystemID, lotteryType, lotteryID));

                btnReturn.Attributes.Add("onclick", $"location.href='{returnUrl}';return false");
            }
        }
Example #13
0
        public string GetDownloadApiUrl(string filePath)
        {
            var apiUrl = PageUtils.GetLocalApiUrl(Constants.ApiStlPrefix, Constants.RouteStlActionsDownload);

            return(PageUtils.AddQueryString(apiUrl, new NameValueCollection
            {
                { "filePath", _settingsManager.Encrypt(filePath) }
            }));
        }
Example #14
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            isEntity.Value = Request.QueryString["isEntity"];
            cardID         = TranslateUtils.ToInt(Request.QueryString["cardID"]);

            if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
            {
                var list = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (list.Count > 0)
                {
                    try
                    {
                        DataProviderWX.CardSNDAO.Delete(PublishmentSystemID, list);

                        SuccessMessage("会员卡删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "会员卡删除失败!");
                    }
                }
            }

            spContents.ControlToPaginate = rptContents;
            spContents.ItemsPerPage      = 20;
            spContents.ConnectionString  = BaiRongDataProvider.ConnectionString;
            spContents.SelectCommand     = DataProviderWX.CardSNDAO.GetSelectString(PublishmentSystemID, TranslateUtils.ToInt(Request.QueryString["cardID"]), Request.QueryString["cardSN"], Request.QueryString["userName"], Request.QueryString["mobile"]);
            spContents.SortField         = CardSNAttribute.AddDate;
            spContents.SortMode          = SortMode.DESC;
            rptContents.ItemDataBound   += new RepeaterItemEventHandler(rptContents_ItemDataBound);

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.WeiXin.LeftMenu.ID_Function, AppManager.WeiXin.LeftMenu.Function.ID_Card, "会员卡管理", AppManager.WeiXin.Permission.WebSite.Card);
                spContents.DataBind();

                tbCardSN.Text   = Request.QueryString["cardSN"];
                tbUserName.Text = Request.QueryString["userName"];
                tbMobile.Text   = Request.QueryString["mobile"];

                var urlAdd = BackgroundCardSNAdd.GetRedirectUrl(PublishmentSystemID, cardID);
                btnAdd.Attributes.Add("onclick", $"location.href='{urlAdd}';return false");

                btnStatus.Attributes.Add("onclick", Modal.CardSNSetting.GetOpenWindowString(PublishmentSystemID, cardID, TranslateUtils.ToBool(isEntity.Value)));
                btnExport.Attributes.Add("onclick", Modal.ExportCardSN.GetOpenWindowString(PublishmentSystemID, cardID));
                var urlDelete = PageUtils.AddQueryString(GetRedirectUrl(PublishmentSystemID, cardID, tbCardSN.Text, tbUserName.Text, tbMobile.Text, TranslateUtils.ToBool(isEntity.Value)), "Delete", "True");
                btnDelete.Attributes.Add("onclick", JsUtils.GetRedirectStringWithCheckBoxValueAndAlert(urlDelete, "IDCollection", "IDCollection", "请选择需要删除的会员卡", "此操作将删除所选会员卡,确认吗?"));

                btnReturn.Attributes.Add("onclick",
                                         $@"location.href=""{BackgroundCard.GetRedirectUrl(PublishmentSystemID)}"";return false;");
            }
        }
Example #15
0
        public static string GetConferenceUrl(PublishmentSystemInfo publishmentSystemInfo, ConferenceInfo conferenceInfo, string wxOpenID)
        {
            var attributes = new NameValueCollection();

            attributes.Add("publishmentSystemID", conferenceInfo.PublishmentSystemID.ToString());
            attributes.Add("conferenceID", conferenceInfo.ID.ToString());
            attributes.Add("wxOpenID", wxOpenID);
            return(PageUtils.AddQueryString(GetConferenceUrl(publishmentSystemInfo), attributes));
        }
Example #16
0
        public static string GetCouponHoldUrl(PublishmentSystemInfo publishmentSystemInfo, int actID)
        {
            var attributes = new NameValueCollection();

            attributes.Add("actID", actID.ToString());
            attributes.Add("PublishmentSystemID", publishmentSystemInfo.PublishmentSystemId.ToString());

            return(PageUtils.AddQueryString(GetCouponUrl(publishmentSystemInfo), attributes));
        }
 public static string GetUrl(string apiUrl, int siteId, string type)
 {
     apiUrl = PageUtils.Combine(apiUrl, Route);
     apiUrl = apiUrl.Replace("{siteId}", siteId.ToString());
     return(PageUtils.AddQueryString(apiUrl, new NameValueCollection
     {
         { "type", type }
     }));
 }
Example #18
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            IsEntity.Value = Request.QueryString["isEntity"];
            CardId         = TranslateUtils.ToInt(Request.QueryString["cardID"]);

            if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
            {
                var list = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (list.Count > 0)
                {
                    try
                    {
                        DataProviderWx.CardSnDao.Delete(PublishmentSystemId, list);

                        SuccessMessage("会员卡删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "会员卡删除失败!");
                    }
                }
            }

            SpContents.ControlToPaginate = RptContents;
            SpContents.ItemsPerPage      = 20;
            SpContents.SelectCommand     = DataProviderWx.CardSnDao.GetSelectString(PublishmentSystemId, TranslateUtils.ToInt(Request.QueryString["cardID"]), Request.QueryString["cardSN"], Request.QueryString["userName"], Request.QueryString["mobile"]);
            SpContents.SortField         = CardSnAttribute.AddDate;
            SpContents.SortMode          = SortMode.DESC;
            RptContents.ItemDataBound   += rptContents_ItemDataBound;

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.WeiXin.LeftMenu.IdFunction, AppManager.WeiXin.LeftMenu.Function.IdCard, "会员卡管理", AppManager.WeiXin.Permission.WebSite.Card);
                SpContents.DataBind();

                TbCardSn.Text   = Request.QueryString["cardSN"];
                TbUserName.Text = Request.QueryString["userName"];
                TbMobile.Text   = Request.QueryString["mobile"];

                var urlAdd = PageCardSnAdd.GetRedirectUrl(PublishmentSystemId, CardId);
                BtnAdd.Attributes.Add("onclick", $"location.href='{urlAdd}';return false");

                BtnStatus.Attributes.Add("onclick", ModalCardSnSetting.GetOpenWindowString(PublishmentSystemId, CardId, TranslateUtils.ToBool(IsEntity.Value)));
                BtnExport.Attributes.Add("onclick", ModalExportCardSn.GetOpenWindowString(PublishmentSystemId, CardId));
                var urlDelete = PageUtils.AddQueryString(GetRedirectUrl(PublishmentSystemId, CardId, TbCardSn.Text, TbUserName.Text, TbMobile.Text, TranslateUtils.ToBool(IsEntity.Value)), "Delete", "True");
                BtnDelete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(urlDelete, "IDCollection", "IDCollection", "请选择需要删除的会员卡", "此操作将删除所选会员卡,确认吗?"));

                BtnReturn.Attributes.Add("onclick",
                                         $@"location.href=""{PageCard.GetRedirectUrl(PublishmentSystemId)}"";return false;");
            }
        }
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
            {
                var list = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (list.Count > 0)
                {
                    try
                    {
                        DataProviderWX.CardCashLogDAO.Delete(PublishmentSystemID, list);

                        SuccessMessage("充值记录删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "充值记录删除失败!");
                    }
                }
            }

            spContents.ControlToPaginate = rptContents;
            spContents.ItemsPerPage      = 20;
            spContents.ConnectionString  = BaiRongDataProvider.ConnectionString;
            spContents.SelectCommand     = DataProviderWX.CardCashLogDAO.GetSelectString(PublishmentSystemID, ECashType.Recharge, TranslateUtils.ToInt(Request.QueryString["cardID"]), Request.QueryString["cardSN"], Request.QueryString["userName"], Request.QueryString["mobile"]);
            spContents.SortField         = CardCashLogAttribute.AddDate;
            spContents.SortMode          = SortMode.DESC;
            rptContents.ItemDataBound   += new RepeaterItemEventHandler(rptContents_ItemDataBound);

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.WeiXin.LeftMenu.ID_Function, AppManager.WeiXin.LeftMenu.Function.ID_Card, "会员卡充值管理", AppManager.WeiXin.Permission.WebSite.Card);
                var cardInfoList = DataProviderWX.CardDAO.GetCardInfoList(PublishmentSystemID);
                foreach (var cardInfo in cardInfoList)
                {
                    ddlCard.Items.Add(new ListItem(cardInfo.CardTitle, cardInfo.ID.ToString()));
                }

                spContents.DataBind();

                ddlCard.SelectedValue = Request.QueryString["cardID"];
                tbCardSN.Text         = Request.QueryString["cardSN"];
                tbUserName.Text       = Request.QueryString["userName"];
                tbMobile.Text         = Request.QueryString["mobile"];

                var urlDelete = PageUtils.AddQueryString(GetRedirectUrl(PublishmentSystemID, tbCardSN.Text, tbUserName.Text, tbMobile.Text), "Delete", "True");
                btnDelete.Attributes.Add("onclick", JsUtils.GetRedirectStringWithCheckBoxValueAndAlert(urlDelete, "IDCollection", "IDCollection", "请选择需要删除的充值记录", "此操作将删除所选充值记录,确认吗?"));

                btnReturn.Attributes.Add("onclick",
                                         $@"location.href=""{BackgroundNavTransaction.GetRedirectUrl(PublishmentSystemID)}"";return false;");
            }
        }
Example #20
0
        public NameValueCollection CreatePublishmentSystem(int publishmentSystemId, bool isUseSiteTemplate, bool isImportContents, bool isImportTableStyles, string siteTemplateDir, bool isUseTables, string userKeyPrefix, string returnUrl, string administratorName)
        {
            var cacheTotalCountKey   = userKeyPrefix + CacheTotalCount;
            var cacheCurrentCountKey = userKeyPrefix + CacheCurrentCount;
            var cacheMessageKey      = userKeyPrefix + CacheMessage;

            CacheUtils.Max(cacheTotalCountKey, "3");       //存储需要的页面总数
            CacheUtils.Max(cacheCurrentCountKey, "0");     //存储当前的页面总数
            CacheUtils.Max(cacheMessageKey, string.Empty); //存储消息

            //返回“运行结果”、“错误信息”及“执行JS脚本”的字符串数组
            NameValueCollection retval;

            try
            {
                CacheUtils.Max(cacheCurrentCountKey, "1");    //存储当前的页面总数
                CacheUtils.Max(cacheMessageKey, "正在创建站点..."); //存储消息
                var publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId);


                CacheUtils.Max(cacheCurrentCountKey, "2");    //存储当前的页面总数
                CacheUtils.Max(cacheMessageKey, "正在导入数据..."); //存储消息
                if (isUseSiteTemplate && !string.IsNullOrEmpty(siteTemplateDir))
                {
                    SiteTemplateManager.Instance.ImportSiteTemplateToEmptyPublishmentSystem(publishmentSystemId, siteTemplateDir, isUseTables, isImportContents, isImportTableStyles, administratorName);
                }

                CacheUtils.Max(cacheCurrentCountKey, "3"); //存储当前的页面总数
                CacheUtils.Max(cacheMessageKey, "创建成功!");  //存储消息
                if (!string.IsNullOrEmpty(returnUrl))
                {
                    returnUrl = PageUtils.AddQueryString(StringUtils.ValueFromUrl(returnUrl), "PublishmentSystemID", publishmentSystemId.ToString());
                    retval    = AjaxManager.GetWaitingTaskNameValueCollection(
                        $"站点 <strong>{publishmentSystemInfo.PublishmentSystemName}<strong> 创建成功!", string.Empty,
                        $"location.href='{returnUrl}';");
                }
                else
                {
                    retval = AjaxManager.GetWaitingTaskNameValueCollection(
                        $"站点 <strong>{publishmentSystemInfo.PublishmentSystemName}<strong> 创建成功!", string.Empty,
                        $"top.location.href='{PageInitialization.GetRedirectUrl()}';");
                }
            }
            catch (Exception ex)
            {
                retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
                LogUtils.AddErrorLog(ex);
            }

            CacheUtils.Remove(cacheTotalCountKey);   //取消存储需要的页面总数
            CacheUtils.Remove(cacheCurrentCountKey); //取消存储当前的页面总数
            CacheUtils.Remove(cacheMessageKey);      //取消存储消息
            CacheUtils.Clear();

            return(retval);
        }
Example #21
0
        public static string GetStoreUrl(PublishmentSystemInfo publishmentSystemInfo, StoreInfo storeInfo, string wxOpenID)
        {
            var attributes = new NameValueCollection();

            attributes.Add("publishmentSystemID", storeInfo.PublishmentSystemId.ToString());
            attributes.Add("storeID", storeInfo.Id.ToString());
            attributes.Add("wxOpenID", wxOpenID);
            attributes.Add("parentID", "0");
            return(PageUtils.AddQueryString(GetStoreUrl(publishmentSystemInfo), attributes));
        }
Example #22
0
 public static string GetUrl(string apiUrl, int publishmentSystemId, int channelId, int contentId, string fileUrl)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(apiUrl, Route), new NameValueCollection
     {
         { "publishmentSystemId", publishmentSystemId.ToString() },
         { "channelId", channelId.ToString() },
         { "contentId", contentId.ToString() },
         { "fileUrl", TranslateUtils.EncryptStringBySecretKey(fileUrl) }
     }));
 }
Example #23
0
 public static string GetUrl(string apiUrl, int siteId, int relatedFieldId, int parentId)
 {
     apiUrl = PageUtils.Combine(apiUrl, Route);
     apiUrl = apiUrl.Replace("{siteId}", siteId.ToString());
     return(PageUtils.AddQueryString(apiUrl, new NameValueCollection
     {
         { "relatedFieldId", relatedFieldId.ToString() },
         { "parentId", parentId.ToString() }
     }));
 }
Example #24
0
        public static string GetSearchUrl(PublishmentSystemInfo publishmentSystemInfo, SearchInfo searchInfo)
        {
            var attributes = new NameValueCollection();

            attributes.Add("publishmentSystemID", searchInfo.PublishmentSystemId.ToString());
            attributes.Add("searchID", searchInfo.Id.ToString());
            var url = PageUtils.AddProtocolToUrl(SiteFilesAssets.GetUrl(publishmentSystemInfo.Additional.ApiUrl, "weixin/search/index.html"));

            return(PageUtils.AddQueryString(url, attributes));
        }
Example #25
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
            {
                var list = TranslateUtils.StringCollectionToIntList(Request.QueryString["IDCollection"]);
                if (list.Count > 0)
                {
                    try
                    {
                        DataProviderWx.CardCashLogDao.Delete(PublishmentSystemId, list);

                        SuccessMessage("消费记录删除成功!");
                    }
                    catch (Exception ex)
                    {
                        FailMessage(ex, "消费记录删除失败!");
                    }
                }
            }

            SpContents.ControlToPaginate = RptContents;
            SpContents.ItemsPerPage      = 20;
            SpContents.SelectCommand     = DataProviderWx.CardCashLogDao.GetSelectString(PublishmentSystemId, ECashType.Consume, TranslateUtils.ToInt(Request.QueryString["cardID"]), Request.QueryString["cardSN"], Request.QueryString["userName"], Request.QueryString["mobile"]);
            SpContents.SortField         = CardCashLogAttribute.AddDate;
            SpContents.SortMode          = SortMode.DESC;
            RptContents.ItemDataBound   += rptContents_ItemDataBound;

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.WeiXin.LeftMenu.IdFunction, AppManager.WeiXin.LeftMenu.Function.IdCard, "会员消费管理", AppManager.WeiXin.Permission.WebSite.Card);
                var cardInfoList = DataProviderWx.CardDao.GetCardInfoList(PublishmentSystemId);
                foreach (var cardInfo in cardInfoList)
                {
                    DdlCard.Items.Add(new ListItem(cardInfo.CardTitle, cardInfo.Id.ToString()));
                }

                SpContents.DataBind();

                DdlCard.SelectedValue = Request.QueryString["cardID"];
                TbCardSn.Text         = Request.QueryString["cardSN"];
                TbUserName.Text       = Request.QueryString["userName"];
                TbMobile.Text         = Request.QueryString["mobile"];

                var urlDelete = PageUtils.AddQueryString(GetRedirectUrl(PublishmentSystemId, 0, TbCardSn.Text, TbUserName.Text, TbMobile.Text), "Delete", "True");
                BtnDelete.Attributes.Add("onclick", PageUtils.GetRedirectStringWithCheckBoxValueAndAlert(urlDelete, "IDCollection", "IDCollection", "请选择需要删除的消费记录", "此操作将删除所选消费记录,确认吗?"));

                BtnReturn.Attributes.Add("onclick",
                                         $@"location.href=""{PageNavTransaction.GetRedirectUrl(PublishmentSystemId)}"";return false;");
            }
        }
Example #26
0
        public static string GetCollectUrl(PublishmentSystemInfo publishmentSystemInfo, CollectInfo collectInfo, string wxOpenId)
        {
            var attributes = new NameValueCollection
            {
                { "publishmentSystemID", collectInfo.PublishmentSystemId.ToString() },
                { "collectID", collectInfo.Id.ToString() },
                { "wxOpenID", wxOpenId }
            };

            return(PageUtils.AddQueryString(GetCollectUrl(publishmentSystemInfo), attributes));
        }
Example #27
0
        public static string GetAlbumUrl(PublishmentSystemInfo publishmentSystemInfo, AlbumInfo albumInfo, string wxOpenId)
        {
            var attributes = new NameValueCollection
            {
                { "publishmentSystemID", albumInfo.PublishmentSystemID.ToString() },
                { "albumID", albumInfo.ID.ToString() },
                { "wxOpenID", wxOpenId }
            };

            return(PageUtils.AddQueryString(GetAlbumUrl(publishmentSystemInfo), attributes));
        }
Example #28
0
        public static string GetIndexUrl(PublishmentSystemInfo publishmentSystemInfo, int appointmentID, string wxOpenID)
        {
            var attributes = new NameValueCollection();

            attributes.Add("publishmentSystemID", publishmentSystemInfo.PublishmentSystemId.ToString());
            attributes.Add("appointmentID", appointmentID.ToString());
            attributes.Add("wxOpenID", wxOpenID);
            var url = PageUtils.AddProtocolToUrl(SiteFilesAssets.GetUrl(publishmentSystemInfo.Additional.ApiUrl, "weixin/appointment/index.html"));

            return(PageUtils.AddQueryString(url, attributes));
        }
Example #29
0
 public string GetTriggerApiUrl(int siteId, int channelId, int contentId,
                                int fileTemplateId, bool isRedirect)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(_settingsManager.ApiHost, Constants.ApiPrefix, Constants.ApiStlPrefix, Constants.RouteStlActionsTrigger), new NameValueCollection
     {
         { "siteId", siteId.ToString() },
         { "channelId", channelId.ToString() },
         { "contentId", contentId.ToString() },
         { "fileTemplateId", fileTemplateId.ToString() },
         { "isRedirect", isRedirect.ToString() }
     }));
 }
 public static string GetUrl(string apiUrl, int siteId, int channelId, int contentId,
                             int fileTemplateId, bool isRedirect)
 {
     return(PageUtils.AddQueryString(PageUtils.Combine(apiUrl, Route), new NameValueCollection
     {
         { "siteId", siteId.ToString() },
         { "channelId", channelId.ToString() },
         { "contentId", contentId.ToString() },
         { "fileTemplateId", fileTemplateId.ToString() },
         { "isRedirect", isRedirect.ToString() }
     }));
 }