Exemple #1
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (IsPostBack)
            {
                return;
            }

            var builder = new StringBuilder();

            var siteIdList = AuthRequest.AdminPermissions.SiteIdList;

            foreach (var siteId in siteIdList)
            {
                var loadingUrl = PageUtils.GetLoadingUrl(PageMain.GetRedirectUrl(siteId));
                var siteInfo   = SiteManager.GetSiteInfo(siteId);
                builder.Append($@"
<div class=""col-sm-6 col-lg-3"">
    <div class=""widget-simple text-center card-box"">
        <h3 class=""text-success counter"">
            <a href=""{loadingUrl}"" target=""_top"">
                {siteInfo.SiteName}
            </a>
        </h3>
        <p class=""text-muted"">{siteInfo.SiteDir}</p>
    </div>
</div>");
            }

            LtlHtml.Text = builder.ToString();
        }
Exemple #2
0
        public override void Submit_OnClick(object sender, EventArgs e)
        {
            if (!Page.IsPostBack || !Page.IsValid)
            {
                return;
            }

            var isRetainFiles = TranslateUtils.ToBool(RblRetainFiles.SelectedValue);

            if (isRetainFiles == false)
            {
                DirectoryUtility.DeleteSiteFiles(SiteInfo);
                SuccessMessage("成功删除站点以及相关文件!");
            }
            else
            {
                SuccessMessage("成功删除站点,相关文件未被删除!");
            }

            if (AuthRequest.AdminInfo.SiteId != SiteId)
            {
                AddWaitAndRedirectScript(PageSite.GetRedirectUrl());
            }
            else
            {
                AddScript(
                    $@"setTimeout(""window.top.location.href='{PageMain.GetRedirectUrl()}'"", 1500);");
            }

            AuthRequest.AddAdminLog("删除站点", $"站点:{SiteInfo.SiteName}");

            DataProvider.SiteDao.Delete(SiteId);
        }
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            if (!IsPostBack)
            {
                var builder = new StringBuilder();

                var publishmentSystemIdList = ProductPermissionsManager.Current.PublishmentSystemIdList;
                foreach (var publishmentSystemId in publishmentSystemIdList)
                {
                    var loadingUrl            = PageUtils.GetLoadingUrl(PageMain.GetRedirectUrl(publishmentSystemId, string.Empty));
                    var publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId);
                    builder.Append($@"
<span class=""icon-span"">
    <a href=""{loadingUrl}"" target=""_top"">
      {EPublishmentSystemTypeUtils.GetIconHtml(publishmentSystemInfo.PublishmentSystemType, "icon-5")}
      <h5>
        {publishmentSystemInfo.PublishmentSystemName}
        <br>
        <small>{publishmentSystemInfo.PublishmentSystemDir}</small>
      </h5>
    </a>
  </span>");
                }

                ltlHtml.Text = builder.ToString();
            }
        }
Exemple #4
0
        public MainWindow()
        {
            InitializeComponent();
            PageMain pageMain = new PageMain();

            Content = pageMain;
        }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string   id       = Request["id"];
        PageMain pageMain = new PageMain();

        fullname.InnerHtml  = pageMain.GetFullName(Request);
        container.InnerHtml = Ext.GetHtml(Request, id);
    }
Exemple #6
0
 protected override void SetCurrentPage()
 {
     //Create whatever other page currently selected
     switch (Page)
     {
     case 1:
     {
         CurrentPage = new PageMain(this);
         break;
     }
     }
 }
        public void CreateMainPageMenu(HotelMenuPower hotelMenu, int index)
        {
            PageMain           page   = this.UIElement as PageMain;
            MainPageMenuButton button = new MainPageMenuButton();

            button.Text = hotelMenu.Name;
            var color_argb = ColorHelp.GetARGByStr(hotelMenu.color);

            button.BackGround = new SolidColorBrush(Color.FromArgb(color_argb[0], color_argb[1], color_argb[2], color_argb[3]));
            button.Src        = hotelMenu.img;
            switch (hotelMenu.id)
            {
            case 1:
                button.Click((s, e) =>
                {
                    VM_PageTest vM_PageTest = new VM_PageTest();
                    VM_FatherWindow.CreateMenu(hotelMenu.Name, (vM_PageTest.UIElement as Page), true);
                });
                break;

            case 2:
                button.Click((s, e) =>
                {
                    VM_PageTest2 vM_PageTest2 = new VM_PageTest2();
                    VM_FatherWindow.CreateMenu(hotelMenu.Name, (vM_PageTest2.UIElement as Page), true);
                });
                break;

            case 3:
                button.Click((s, e) =>
                {
                    VM_PageTest vM_PageTest1 = new VM_PageTest();
                    VM_FatherWindow.CreateMenu(hotelMenu.Name, (vM_PageTest1.UIElement as Page), true);
                });
                break;

            default:
                break;
            }
            if (index >= 4)
            {
                page.MainPage_MenuPanel2.Children.Add(button);
            }
            else
            {
                page.MainPage_MenuPanel.Children.Add(button);
            }
        }
        public override void Submit_OnClick(object sender, EventArgs e)
        {
            if (Page.IsPostBack && Page.IsValid)
            {
                try
                {
                    var psInfo = PublishmentSystemManager.GetPublishmentSystemInfo(_nodeId);

                    var isRetainFiles = false;
                    if (!_isBackgroundDelete)
                    {
                        isRetainFiles = TranslateUtils.ToBool(RetainFiles.SelectedValue);
                    }

                    //if (isRetainFiles == false)
                    //{
                    //    DirectoryUtility.DeletePublishmentSystemFiles(psInfo);
                    //    SuccessMessage("成功删除站点以及相关文件!");
                    //}
                    //else
                    //{
                    //    SuccessMessage("成功删除站点,相关文件未被删除!");
                    //}
                    SuccessMessage("成功删除站点!");
                    if (!_isBackgroundDelete)
                    {
                        AddWaitAndRedirectScript(PagePublishmentSystem.GetRedirectUrl());
                    }
                    else
                    {
                        AddScript(
                            $@"setTimeout(""window.top.location.href='{PageMain.GetRedirectUrl()}'"", 1500);");
                    }

                    DataProvider.PublishmentSystemDao.Delete(_nodeId);

                    Body.AddAdminLog("删除站点", $"站点:{psInfo.PublishmentSystemName}");
                }
                catch (Exception ex)
                {
                    FailMessage(ex, "删除系统失败!");
                }
            }
        }
Exemple #9
0
        void dgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var publishmentSystemId   = (int)e.Item.DataItem;
                var publishmentSystemInfo = PublishmentSystemManager.GetPublishmentSystemInfo(publishmentSystemId);
                if (publishmentSystemInfo != null)
                {
                    var ltlPublishmentSystemName = e.Item.FindControl("ltlPublishmentSystemName") as Literal;
                    var ltlPublishmentSystemDir  = e.Item.FindControl("ltlPublishmentSystemDir") as Literal;
                    var ltlAddDate = e.Item.FindControl("ltlAddDate") as Literal;
                    var ltlManage  = e.Item.FindControl("ltlManage") as Literal;
                    var ltlBinding = e.Item.FindControl("ltlBinding") as Literal;
                    var ltlDelete  = e.Item.FindControl("ltlDelete") as Literal;

                    ltlPublishmentSystemName.Text = publishmentSystemInfo.PublishmentSystemName;

                    ltlPublishmentSystemDir.Text = publishmentSystemInfo.PublishmentSystemDir;
                    ltlAddDate.Text = DateUtils.GetDateString(NodeManager.GetAddDate(publishmentSystemId, publishmentSystemId));

                    var manageUrl = PageMain.GetRedirectUrl(publishmentSystemId, string.Empty);
                    ltlManage.Text = $@"<a href=""{manageUrl}"" target=""top"">管理</a>";

                    var bindingUrl = PageAccountBinding.GetRedirectUrl(publishmentSystemId, GetRedirectUrl());

                    var accountInfo = WeiXinManager.GetAccountInfo(publishmentSystemId);

                    var isBinding = WeiXinManager.IsBinding(accountInfo);
                    if (isBinding)
                    {
                        ltlBinding.Text = $@"<a href=""{bindingUrl}"" class=""btn btn-success"">已绑定微信</a>";
                    }
                    else
                    {
                        ltlBinding.Text = $@"<a href=""{bindingUrl}"" class=""btn btn-danger"">未绑定微信</a>";
                    }

                    var urlDelete = PagePublishmentSystemDelete.GetRedirectUrl(publishmentSystemId);
                    ltlDelete.Text = $@"<a href=""{urlDelete}"">删除</a>";
                }
            }
        }
Exemple #10
0
        private void ButtomIniciar_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton LinkButton = sender as HyperlinkButton;

            if (TextBlockUsuario.Text == "Usuario")
            {
                TextBlockUsuario.Text     = TextBoxUsuario.Text;
                TextBlockUsuario.FontSize = 15;
                TextBoxUsuario.Visibility = Visibility.Collapsed;
                LinkButton.Content        = "Salir";
                LinkButton.Tag            = "/Vistas/Page1.xaml";
            }
            else
            {
                LinkButton.Content        = "Iniciar";
                LinkButton.Tag            = "/Vistas/Page2.xaml";
                TextBlockUsuario.FontSize = 10;
                TextBlockUsuario.Text     = "Usuario";
                TextBoxUsuario.Visibility = Visibility.Visible;
                TextBoxUsuario.Text       = "";
            }

            PageMain.Navigate(new Uri(LinkButton.Tag.ToString(), UriKind.Relative));
        }
Exemple #11
0
        private void RptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            var siteInfo = SiteManager.GetSiteInfo((int)e.Item.DataItem);

            if (!_siteIdList.Contains(siteInfo.Id))
            {
                e.Item.Visible = false;
                return;
            }

            var ltlName   = (Literal)e.Item.FindControl("ltlName");
            var ltlDir    = (Literal)e.Item.FindControl("ltlDir");
            var ltlWebUrl = (Literal)e.Item.FindControl("ltlWebUrl");

            ltlName.Text = $@"<a href=""{PageUtils.GetLoadingUrl(PageMain.GetRedirectUrl(siteInfo.Id))}"" target=""_top"">{SiteManager.GetSiteName(siteInfo)}</a>";
            ltlDir.Text  = siteInfo.SiteDir;

            ltlWebUrl.Text = $@"<a href=""{siteInfo.Additional.WebUrl}"" target=""_blank"">{siteInfo.Additional.WebUrl}</a>";
        }
		protected override void SetCurrentPage()
		{
			//Create whatever other page currently selected
			switch (Page)
			{
				case 1:
					{		 
						CurrentPage = new PageMain(this);
						break;
					}
			}
		}
Exemple #13
0
        public override void Startup(IService service)
        {
            ContentRepository        = new ContentRepository();
            CategoryClassRepository  = new CategoryClassRepository();
            CategoryRepository       = new CategoryRepository();
            DepartmentRepository     = new DepartmentRepository();
            IdentifierRuleRepository = new IdentifierRuleRepository();
            IdentifierSeqRepository  = new IdentifierSeqRepository();

            service
            .AddContentModel(ContentRepository.TableName, ContentRepository.TableColumns, ContentRepository.InputStyles)
            .AddDatabaseTable(CategoryClassRepository.TableName, CategoryClassRepository.TableColumns)
            .AddDatabaseTable(CategoryRepository.TableName, CategoryRepository.TableColumns)
            .AddDatabaseTable(DepartmentRepository.TableName, DepartmentRepository.TableColumns)
            .AddDatabaseTable(IdentifierRuleRepository.TableName, IdentifierRuleRepository.TableColumns)
            .AddDatabaseTable(IdentifierSeqRepository.TableName, IdentifierSeqRepository.TableColumns)
            .AddSiteMenu(siteId => new Menu
            {
                Text      = "主动信息公开",
                IconClass = "ion-ios-book",
                Menus     = new List <Menu>
                {
                    new Menu
                    {
                        Text = "信息采集",
                        Href = PageMain.GetRedirectUrl(siteId, Context.UtilsApi.GetAdminUrl($"cms/pageContentAdd.aspx?siteId={siteId}"))
                    },
                    new Menu
                    {
                        Text = "信息管理",
                        Href = PageMain.GetRedirectUrl(siteId, Context.UtilsApi.GetAdminUrl($"cms/contents.cshtml?siteId={siteId}"))
                    },
                    new Menu
                    {
                        Text = "信息审核",
                        Href = PageMain.GetRedirectUrl(siteId, Context.UtilsApi.GetAdminUrl($"cms/pageContentSearch.aspx?isCheckOnly=true&siteId={siteId}"))
                    },
                    new Menu
                    {
                        Text = "分类法管理",
                        Href = PageInit.GetRedirectUrl(siteId, PageCategoryMain.GetRedirectUrl(siteId))
                    },
                    new Menu
                    {
                        Text = "索引号生成规则",
                        Href = PageInit.GetRedirectUrl(siteId, PageIdentifierRule.GetRedirectUrl(siteId))
                    },
                    new Menu
                    {
                        Text = "重新生成索引号",
                        Href = PageInit.GetRedirectUrl(siteId, PageIdentifierCreate.GetRedirectUrl(siteId))
                    },
                    new Menu
                    {
                        Text = "部门设置",
                        Href = "pages/departments.html"
                    },
                    new Menu
                    {
                        Text = "信息公开设置",
                        Href = PageInit.GetRedirectUrl(siteId, PageSettings.GetRedirectUrl(siteId))
                    },
                    new Menu
                    {
                        Text = "数据统计分析",
                        Href = PageInit.GetRedirectUrl(siteId, PageAnalysis.GetRedirectUrl(siteId))
                    }
                }
            });

            service.ContentFormSubmit += Service_ContentFormSubmited; // 页面提交处理函数
            service.ContentFormLoad   += Service_ContentFormLoad;     // // 页面加载处理函数
        }
Exemple #14
0
        // 插件被激活时初始化工作
        public override void Startup(IService service)
        {
            PluginId = Id;

            service.AddContentModel(ContentDao.TableName, ContentDao.Columns) // 插件对应的内容模型表
            .AddDatabaseTable(ChannelDao.TableName, ChannelDao.Columns)       // 插件需要用到的其他表结构
            .AddDatabaseTable(LogDao.TableName, LogDao.Columns)
            .AddDatabaseTable(PermissionsDao.TableName, PermissionsDao.Columns)
            .AddDatabaseTable(RemarkDao.TableName, RemarkDao.Columns)
            .AddDatabaseTable(ReplyDao.TableName, ReplyDao.Columns)
            .AddDatabaseTable(TypeDao.TableName, TypeDao.Columns)
            .AddSiteMenu(siteId => new Menu
            {
                Text      = "互动交流",
                IconClass = "ion-chatbox-working",
                Menus     = new List <Menu>
                {
                    new Menu
                    {
                        Text = "待受理办件",
                        Href = PageMain.GetRedirectUrl(siteId, PageListAccept.GetRedirectUrl(siteId, 0))
                    },
                    new Menu
                    {
                        Text = "待办理办件",
                        Href = PageMain.GetRedirectUrl(siteId, PageListReply.GetRedirectUrl(siteId, 0))
                    },
                    new Menu
                    {
                        Text = "待审核办件",
                        Href = PageMain.GetRedirectUrl(siteId, PageListCheck.GetRedirectUrl(siteId, 0))
                    },
                    new Menu
                    {
                        Text = "所有办件",
                        Href = PageMain.GetRedirectUrl(siteId, PageListAll.GetRedirectUrl(siteId, 0))
                    },
                    new Menu
                    {
                        Text = "新增办件",
                        Href = PageMain.GetRedirectUrl(siteId, $"@/cms/pageContentAdd.aspx?siteId={siteId}")
                    },
                    new Menu
                    {
                        Text = "互动交流设置",
                        Href = PageInit.GetRedirectUrl(siteId, PageConfiguration.GetRedirectUrl(siteId))
                    },
                    new Menu
                    {
                        Text = "前台页面标签",
                        Href = PageInit.GetRedirectUrl(siteId, PageFormStyle.GetRedirectUrl(siteId))
                    },
                    new Menu
                    {
                        Text = "数据统计分析",
                        Href = PageInit.GetRedirectUrl(siteId, PageAnalysis.GetRedirectUrl(siteId))
                    }
                }
            });                                                       // 插件站点菜单

            service.ContentFormSubmit += Service_ContentFormSubmited; // 页面提交处理函数
            service.ContentFormLoad   += Service_ContentFormLoad;     // 页面加载处理函数
        }
Exemple #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PageMain pageMain = new PageMain();

        fullname.InnerHtml = pageMain.GetFullName(Request);
    }