Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);
            Bindwrite();

            BingWW();
            Bingshoucang();
            panel_a.Visible = true;
            ViewState["id"] = Convert.ToInt32(Request.QueryString["id"]);
            Choose();
            string wriname;

            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["wri_name"] != null)
                    {
                        wriname = Request.QueryString["wri_name"].ToString();
                        WriteManager.delete(wriname);
                        BingWW();
                        Bindwrite();
                        Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                    }
                }
                catch (Exception ex)
                {
                    Response.Write("错误原因:" + ex.Message);
                }
            }
            string wkid;

            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["wk_id"] != null)
                    {
                        wkid = Request.QueryString["wk_id"].ToString();
                        Write_KeepManager.delete(wkid);
                        Bingshoucang();
                        Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                    }
                }
                catch (Exception ex)
                {
                    Response.Write("错误原因:" + ex.Message);
                }
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BindView();
            string wriname;

            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["wri_name"] != null)
                    {
                        wriname = Request.QueryString["wri_name"].ToString();
                        WriteManager.delete(wriname);
                        BindView();
                        Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                    }
                }
                catch (Exception ex)
                {
                    Response.Write("错误原因:" + ex.Message);
                }
            }
        }