コード例 #1
0
    public void LoadCustomItem(string customLoc)
    {
        _custom = true;

        epicCMSCustomControl ctl = (epicCMSCustomControl)Page.LoadControl("~/Admin_Custom/" + customLoc);

        PlaceHolder1.Controls.Add(ctl);

        if (ctl.CompareData())
        {
            if ((int)UserContext.GetContextItemAsInt("userlevel") > 2)
            {
                Label1.Visible = false;
            }
            else
            {
                lbApprove.Visible = false;
                lbReject.Visible  = false;
            }
        }
        else
        {
            lbApprove.Visible = false;
            lbReject.Visible  = false;
        }
    }
コード例 #2
0
    protected void lbReject_Click(object sender, EventArgs e)
    {
        if (_custom)
        {
            epicCMSCustomControl ctl = (epicCMSCustomControl)PlaceHolder1.Controls[0];
            ctl.RejectData();
        }
        else
        {
            switch (_itemTypeTitle)
            {
            case "epicCMSRichTextControl":
                admin_controls_cmsTextEditControl txt = (admin_controls_cmsTextEditControl)PlaceHolder1.Controls[0];
                txt.RejectChange();
                break;

            case "epicCMSImageControl":
                admin_controls_cmsSelectImage img = (admin_controls_cmsSelectImage)PlaceHolder1.Controls[0];
                img.RejectChange();
                break;

            case "epicCMSPDFControl":
                admin_controls_cmsSelectPdf pdf = (admin_controls_cmsSelectPdf)PlaceHolder1.Controls[0];
                pdf.RejectChange();
                break;

            case "epicCMSImageTextControl":
                admin_controls_cmsTextImageEditControl te = (admin_controls_cmsTextImageEditControl)PlaceHolder1.Controls[0];
                break;

            case "epicCMSTextControl":
                admin_controls_cmsBasicTextEditControl bte = (admin_controls_cmsBasicTextEditControl)PlaceHolder1.Controls[0];
                bte.RejectChange();
                break;
            }
        }
        Response.Redirect(Request.RawUrl);
    }
コード例 #3
0
    public void SaveItem()
    {
        if (_custom)
        {
            epicCMSCustomControl ctl = (epicCMSCustomControl)PlaceHolder1.Controls[0];
            ctl.SaveData();
        }
        else
        {
            switch (_itemTypeTitle)
            {
            case "epicCMSRichTextControl":
                admin_controls_cmsTextEditControl txt = (admin_controls_cmsTextEditControl)PlaceHolder1.Controls[0];
                txt.SaveValue();
                break;

            case "epicCMSTextControl":
                admin_controls_cmsBasicTextEditControl txt2 = (admin_controls_cmsBasicTextEditControl)PlaceHolder1.Controls[0];
                txt2.SaveValue();
                break;

            case "epicCMSImageControl":
                admin_controls_cmsSelectImage img = (admin_controls_cmsSelectImage)PlaceHolder1.Controls[0];
                img.SaveValue();
                break;

            case "epicCMSPDFControl":
                admin_controls_cmsSelectPdf pdf = (admin_controls_cmsSelectPdf)PlaceHolder1.Controls[0];
                pdf.SaveValue();
                break;

            case "epicCMSImageTextControl":
                admin_controls_cmsTextImageEditControl te = (admin_controls_cmsTextImageEditControl)PlaceHolder1.Controls[0];
                te.SaveValue();
                break;
            }
        }
    }