protected void Add_Click(object sender, EventArgs e)
    {
        TextBox         name        = (TextBox)DetailsView_Degree.FindControl("name");
        DropDownList    country     = (DropDownList)DetailsView_Degree.FindControl("Countrydp");
        DropDownList    confirmed   = (DropDownList)DetailsView_Degree.FindControl("confirmed");
        DropDownList    type        = (DropDownList)DetailsView_Degree.FindControl("type");
        DropDownList    equivalency = (DropDownList)DetailsView_Degree.FindControl("equivalency");
        CKEditorControl des         = (CKEditorControl)DetailsView_Degree.FindControl("destxt");
        bool            result      = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_DegreePlanAdd(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), type.SelectedValue.ToString(), Convert.ToInt32(equivalency.SelectedValue.ToString()), des.Text, Session["Admin_Customer"].ToString());
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_DegreePlanAdd(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), type.SelectedValue.ToString(), Convert.ToInt32(equivalency.SelectedValue.ToString()), des.Text, Session["Admin_Customer"].ToString());
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/EducationProgram/Browse_DegreePlan.aspx?search=&t1=0&t2=0");
        }
    }
    protected void Add_Click(object sender, EventArgs e)
    {
        bool            result     = false;
        TextBox         countrytxt = (TextBox)DetailsView_Country.FindControl("Countrytxt");
        CKEditorControl des        = (CKEditorControl)DetailsView_Country.FindControl("countrydesc");

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_CountryAdd(countrytxt.Text, des.Text, Session["Admin_Customer"].ToString());
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }


        if (result == true)
        {
            Response.Redirect("~/secure/Country/Browse_Country.aspx?search=");
        }
    }
示例#3
0
    protected void Add_Click(object sender, EventArgs e)
    {
        TextBox         name           = (TextBox)DetailsView_source.FindControl("name");
        CKEditorControl institutiondes = (CKEditorControl)DetailsView_source.FindControl("destxt");
        DropDownList    countrydp      = (DropDownList)DetailsView_source.FindControl("countrydp");
        bool            result         = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_SourceAdd(name.Text, institutiondes.Text, Convert.ToInt32(countrydp.SelectedValue.ToString()), Session["Admin_Customer"].ToString());
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/Source/Browse_Source.aspx?search=&t1=0");
        }
    }
示例#4
0
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         name           = (TextBox)DetailsView_Gradescale.FindControl("name");
        CKEditorControl institutiondes = (CKEditorControl)DetailsView_Gradescale.FindControl("destxt");
        DropDownList    countrydp      = (DropDownList)DetailsView_Gradescale.FindControl("countrydp");
        bool            result         = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_gradescaleUpdate(name.Text, Convert.ToInt32(countrydp.SelectedValue.ToString()), institutiondes.Text, Convert.ToInt32(Session["grade_id"].ToString()), Session["Admin_Customer"].ToString(), Session["grade_role"].ToString());
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_gradescaleUpdate(name.Text, Convert.ToInt32(countrydp.SelectedValue.ToString()), institutiondes.Text, Convert.ToInt32(Session["grade_id"].ToString()), Session["Customer_id"].ToString(), Session["grade_role"].ToString());
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/Gradescale/Browse_Gradescale.aspx?search=" + Request.QueryString["search"].ToString() + "&t1=" + Request.QueryString["t1"].ToString());
        }
    }
示例#5
0
        /// <summary>
        /// Creates the control(s) neccessary for prompting user for a new value
        /// </summary>
        /// <param name="configurationValues">The configuration values.</param>
        /// <returns>
        /// The control
        /// </returns>
        public override Control EditControl(Dictionary <string, ConfigurationValue> configurationValues)
        {
            CKEditorControl editor = new CKEditorControl();

            editor.Toolbar = "RockCustomConfigLight";
            return(editor);
        }
    protected void Add_Click(object sender, EventArgs e)
    {
        TextBox         name           = (TextBox)DetailsView_Equivalency.FindControl("name");
        CKEditorControl institutiondes = (CKEditorControl)DetailsView_Equivalency.FindControl("destxt");
        bool            result         = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_EquivalencyAdd(name.Text, institutiondes.Text, Session["Admin_Customer"].ToString());
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/UsEquivalency/Browse_Us_Equivalency.aspx?search=");
        }
    }
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         name        = (TextBox)DetailsView_Major.FindControl("name");
        DropDownList    country     = (DropDownList)DetailsView_Major.FindControl("Countrydp");
        DropDownList    confirmed   = (DropDownList)DetailsView_Major.FindControl("confirmed");
        DropDownList    equivalency = (DropDownList)DetailsView_Major.FindControl("equivalency");
        CKEditorControl des         = (CKEditorControl)DetailsView_Major.FindControl("destxt");
        bool            result      = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_MajorUpdate(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), Convert.ToInt32(Session["Major_id"].ToString()), Convert.ToInt32(equivalency.SelectedValue.ToString()), Session["Admin_Customer"].ToString(), des.Text, Session["major_role"].ToString());
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_MajorUpdate(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), Convert.ToInt32(Session["Major_id"].ToString()), Convert.ToInt32(equivalency.SelectedValue.ToString()), Session["Customer_id"].ToString(), des.Text, Session["major_role"].ToString());
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/Major/Browse_Major.aspx?search=" + Request.QueryString["search"].ToString() + "&t1=" + Request.QueryString["t1"].ToString() + "&t2=" + Request.QueryString["t2"].ToString());
        }
    }
        public void LoadControlsPlantilla()
        {
            txtSubTitulo    = (TextBox)this.FindControl("txtSubTitulo");
            txtSubTitulo2   = (TextBox)this.FindControl("txtSubTitulo2");
            fckDescripcion  = (CKEditorControl)this.FindControl("fckDescripcion");
            fckDescripcion2 = (CKEditorControl)this.FindControl("fckDescripcion2");
            fckResumen      = (CKEditorControl)this.FindControl("fckResumen");
            txtImagen       = (TextBox)this.FindControl("txtImagen");
            txtImagen2      = (TextBox)this.FindControl("txtImagen2");
            txtImagen3      = (TextBox)this.FindControl("txtImagen3");
            txtVideo        = (TextBox)this.FindControl("txtVideo");
            txtVideo2       = (TextBox)this.FindControl("txtVideo2");
            txtVideo3       = (TextBox)this.FindControl("txtVideo3");
            txtDocumento    = (TextBox)this.FindControl("txtDocumento");
            txtDocumento2   = (TextBox)this.FindControl("txtDocumento2");
            txtDocumento3   = (TextBox)this.FindControl("txtDocumento3");
            txtFecha        = (TextBox)this.FindControl("txtFecha");
            txtFecha2       = (TextBox)this.FindControl("txtFecha2");

            drpTipoEnlace     = (DropDownList)this.FindControl("drpTipoEnlace");
            drpArticuloEnlace = (DropDownList)this.FindControl("drpArticuloEnlace");
            drpMenuWebEnlace  = (DropDownList)this.FindControl("drpMenuWebEnlace");

            txtURLEnlace   = (TextBox)this.FindControl("txtURLEnlace");
            txtURLEstatica = (TextBox)this.FindControl("txtURLEstatica");
            drpEstilo      = (DropDownList)this.FindControl("drpEstilo");
            repParametro   = (Repeater)this.FindControl("repParametro");

            chkEnPortada = (CheckBox)this.FindControl("chkEnPortada");
        }
    protected void Swap_Click(object sender, EventArgs e)
    {
        CKEditorControl    countrydes = (CKEditorControl)DetailsView_institution.FindControl("destxt");
        HtmlGenericControl masterdesc = (HtmlGenericControl)DetailsView_institution.FindControl("masterdesc");

        countrydes.Text = masterdesc.InnerHtml;
    }
示例#10
0
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         name     = (TextBox)DetailsView_service.FindControl("name");
        TextBox         cost     = (TextBox)DetailsView_service.FindControl("Cost");
        CKEditorControl des      = (CKEditorControl)DetailsView_service.FindControl("desc");
        DropDownList    type     = (DropDownList)DetailsView_service.FindControl("type");
        Label           clientid = (Label)DetailsView_service.FindControl("lblclientid");
        bool            result   = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_ServiceTypeUpdate(name.Text, Convert.ToInt32(cost.Text), type.SelectedValue.ToString(), Convert.ToInt32(Session["service_id"].ToString()), des.Text);
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }


        if (result == true)
        {
            Response.Redirect("~/secure/ServiceType/Browse_ServiceType.aspx?clid=" + clientid.Text);
        }
    }
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         name           = (TextBox)DetailsView_institution.FindControl("name");
        DropDownList    country        = (DropDownList)DetailsView_institution.FindControl("Countrydp");
        DropDownList    confirmed      = (DropDownList)DetailsView_institution.FindControl("confirmed");
        DropDownList    type           = (DropDownList)DetailsView_institution.FindControl("type");
        CKEditorControl institutiondes = (CKEditorControl)DetailsView_institution.FindControl("destxt");
        DropDownList    mill           = (DropDownList)DetailsView_institution.FindControl("degmill");
        bool            result         = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_InstitutionUpdate(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), type.SelectedValue.ToString(), Convert.ToInt32(Session["institution_id"].ToString()), Session["Admin_Customer"].ToString(), institutiondes.Text, Session["institution_role"].ToString(), Convert.ToInt32(mill.SelectedValue.ToString()));
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_InstitutionUpdate(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), type.SelectedValue.ToString(), Convert.ToInt32(Session["institution_id"].ToString()), Session["Customer_id"].ToString(), institutiondes.Text, Session["institution_role"].ToString(), Convert.ToInt32(mill.SelectedValue.ToString()));
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/Institution/Browse_Institution.aspx?search=" + Request.QueryString["search"].ToString() + "&t1=" + Request.QueryString["t1"].ToString() + "&t2=" + Request.QueryString["t2"].ToString() + "&t3=" + Request.QueryString["t3"].ToString() + "&t4=" + Request.QueryString["t4"].ToString());
        }
    }
    protected void Add_Click(object sender, EventArgs e)
    {
        TextBox         name         = (TextBox)DetailsView_Delivery.FindControl("name");
        CKEditorControl des          = (CKEditorControl)DetailsView_Delivery.FindControl("desc");
        TextBox         cost         = (TextBox)DetailsView_Delivery.FindControl("Cost");
        DropDownList    type         = (DropDownList)DetailsView_Delivery.FindControl("type");
        DropDownList    dpsubclients = (DropDownList)DetailsView_Delivery.FindControl("dpsubclients");
        bool            result       = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_DeliveryTypeAdd(name.Text, Convert.ToInt32(cost.Text), type.SelectedValue.ToString(), dpsubclients.SelectedValue.ToString(), des.Text);
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/DeliveryType/Browse_DeliveryType.aspx?clid=" + dpsubclients.SelectedValue.ToString());
        }
    }
        private void Form1_Load(object sender, EventArgs e)
        {
            var tabCtrl = new TabControl()
            {
                Dock = DockStyle.Fill
            };

            var curDir      = Directory.GetCurrentDirectory();
            var ckEditorUri = new Uri(String.Format("file:///{0}/Resources/CkEditor/index.html", curDir));

            for (int i = 0; i < 8; i++)
            {
                var tabPg        = new TabPage($"Tab {i}");
                var ckEditorCtrl = new CKEditorControl(ckEditorUri)
                {
                    Dock = DockStyle.Fill
                };

                tabPg.Controls.Add(ckEditorCtrl);

                int indx = i;
                ckEditorCtrl.DocumentCompleted += (sss, ee) => {
                    ckEditorCtrl.SetContent($"Tab {indx} Content");
                };

                tabCtrl.Controls.Add(tabPg);
            }

            Controls.Add(tabCtrl);
        }
示例#14
0
        private CKEditorControl GerarCKEditorDinamicamente(string idBotao)
        {
            var editor = new CKEditorControl()
            {
                ID       = idBotao,
                BasePath = "/js/ckeditor/"
            };

            return(editor);
        }
示例#15
0
    protected void lstAllReplies_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        divSuccess.Style.Add("display", "none");
        PopUpShare.Style.Add("display", "none");
        divSuccess.Style.Add("display", "none");
        DataTable   dtAns                 = new DataTable();
        LinkButton  lnkClose              = (LinkButton)e.Item.FindControl("lnkClose");
        HiddenField hdnintAddedBy         = (HiddenField)e.Item.FindControl("hdnintAddedBy");
        HiddenField hdnQAReplyLikeShareId = (HiddenField)e.Item.FindControl("hdnQAReplyLikeShareId");
        Label       lblReplyComment       = e.Item.FindControl("lblReplyComment") as Label;

        ViewState["QAReplyLikeShareId "] = hdnQAReplyLikeShareId.Value;
        if (e.CommandName == "View More")
        {
            GetAllReplies();
            divSuccess.Style.Add("display", "none");
        }
        else
        if (e.CommandName == "View Close")
        {
            GetAllReplies();
            divSuccess.Style.Add("display", "none");
        }
        else
        if (e.CommandName == "Edit Ans")
        {
            ViewState["Edit"] = hdnQAReplyLikeShareId.Value;
            objDOQAPosting.intQAReplyLikeShareId = Convert.ToInt32(hdnQAReplyLikeShareId.Value);
            dtAns = objDAQAPosting.GetDataTable(objDOQAPosting, DA_Scrl_UserQAPosting.QuetionAns.GetCommentByID);
            if (dtAns.Rows.Count > 0)
            {
                CKEditorControl.InnerText = Convert.ToString(dtAns.Rows[0]["strComment"]);
                CKEditorControl.Focus();
                ClientScript.RegisterStartupScript(this.GetType(), "hash", "location.hash = '#editqa';", true);
            }
        }
        else
        if (e.CommandName == "Delete Ans")
        {
            ViewState["lblReplyComment"] = lblReplyComment.Text;
            divDeletesucess.Style.Add("display", "block");
        }
        else
        if (e.CommandName == "Details")
        {
            Response.Redirect("Home.aspx?RegId=" + hdnintAddedBy.Value);
        }
    }
示例#16
0
    protected void lstParentQADetails_ItemCommand(object sender, ListViewCommandEventArgs e)
    {
        HiddenField hdnPostQuestionID = (HiddenField)e.Item.FindControl("hdnPostQuestionID");
        LinkButton  btnLike           = (LinkButton)e.Item.FindControl("btnLike");

        divDeletesucess.Style.Add("display", "none");
        divSuccess.Style.Add("display", "none");
        PopUpShare.Style.Add("display", "none");

        objDOQAPosting.intPostQuestionId = Convert.ToInt32(hdnPostQuestionID.Value);
        if (e.CommandName == "LikeForum")
        {
            string ip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
            if (ip == null)
            {
                ip = Request.ServerVariables["REMOTE_ADDR"];
            }
            objDOQAPosting.strIPAddress      = ip;
            objDOQAPosting.strRepLiShStatus  = "LI";
            objDOQAPosting.intAddedBy        = Convert.ToInt32(ViewState["UserID"]);
            objDOQAPosting.intPostQuestionId = Convert.ToInt32(hdnPostQuestionID.Value);
            objDAQAPosting.AddEditDel_Scrl_UserQueAnsPostingTbl(objDOQAPosting, DA_Scrl_UserQAPosting.QuetionAns.LikeQAInsert);
            PopUpShare.Style.Add("display", "none");
        }
        if (e.CommandName == "QADetails")
        {
            Response.Redirect("Question-Details-SendContact.aspx?PostQAId=" + hdnPostQuestionID.Value);
        }
        if (e.CommandName == "ShareForum")
        {
            divSuccess.Style.Add("display", "none");
            clearsharepopup();
            string path = Request.Url.AbsoluteUri;
            txtLink.Text = path;
            PopUpShare.Style.Add("display", "block");
            ViewState["PostQuestionID"] = Convert.ToInt32(hdnPostQuestionID.Value);
        }
        if (e.CommandName == "ReplyPost")
        {
            PopUpShare.Style.Add("display", "none");
            CKEditorControl.Focus();
            pnlComment.Style.Add("display", "block");
            divSuccess.Style.Add("display", "none");
        }
        BindQADetails();
    }
示例#17
0
    public void action()
    {
        RadioButtonList rbtn       = (RadioButtonList)DetailsView_Splash.FindControl("Rbt");
        CKEditorControl Appmsg     = (CKEditorControl)DetailsView_Splash.FindControl("Appinst");
        CKEditorControl browsermsg = (CKEditorControl)DetailsView_Splash.FindControl("brinst");
        //CKEditorControl Clientmsg = (CKEditorControl)DetailsView_Splash.FindControl("clinst");
        CKEditorControl Offlineappmsg = (CKEditorControl)DetailsView_Splash.FindControl("offinst");
        Label           clientid      = (Label)DetailsView_Splash.FindControl("lblclientid");
        RadioButtonList onlineapp     = (RadioButtonList)DetailsView_Splash.FindControl("onlineapp");
        int             offlineapp    = 0;

        if (rbtn.SelectedValue == "True")
        {
            offlineapp = 1;
        }
        bool result = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Splashpage_Update(browsermsg.Text, Appmsg.Text, " ", offlineapp, Offlineappmsg.Text, clientid.Text, Convert.ToInt32(onlineapp.SelectedValue.ToString()));
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/SplashPage/Browse_Splashpage.aspx?clid=" + clientid.Text);
        }
    }
示例#18
0
        private void SetPageControls()
        {
            _lblquestionID = new Label();
            _defineQuestionsPrivateObject.SetField("lblquestionID", BindingFlags.Instance | BindingFlags.NonPublic, _lblquestionID);
            _lblQno = new Label();
            _defineQuestionsPrivateObject.SetField("lblQno", BindingFlags.Instance | BindingFlags.NonPublic, _lblQno);
            _lblRQNo = new Label();
            _defineQuestionsPrivateObject.SetField("lblRQNo", BindingFlags.Instance | BindingFlags.NonPublic, _lblRQNo);
            _lblpageID = new Label();
            _defineQuestionsPrivateObject.SetField("lblpageID", BindingFlags.Instance | BindingFlags.NonPublic, _lblpageID);
            _lblQPageno = new Label();
            _defineQuestionsPrivateObject.SetField("lblQPageno", BindingFlags.Instance | BindingFlags.NonPublic, _lblQPageno);
            _lblReorderTitle = new Label();
            _defineQuestionsPrivateObject.SetField("lblReorderTitle", BindingFlags.Instance | BindingFlags.NonPublic, _lblReorderTitle);
            _txtMaxChars = new TextBox();
            _defineQuestionsPrivateObject.SetField("txtMaxChars", BindingFlags.Instance | BindingFlags.NonPublic, _txtMaxChars);
            _txtOptions = new TextBox();
            _defineQuestionsPrivateObject.SetField("txtOptions", BindingFlags.Instance | BindingFlags.NonPublic, _txtOptions);
            _rbQuestionFormat = new RadioButtonList();
            _rbQuestionFormat.Items.Add(new ListItem("grid", "grid"));
            _rbQuestionFormat.Items.Add(new ListItem("textbox", "textbox"));
            _rbQuestionFormat.Items.Add(new ListItem("radio", "radio"));
            _defineQuestionsPrivateObject.SetField("rbQuestionFormat", BindingFlags.Instance | BindingFlags.NonPublic, _rbQuestionFormat);
            _rbRequired = new RadioButtonList();
            _rbRequired.Items.Add(new ListItem("0", "0"));
            _rbRequired.Items.Add(new ListItem("1", "1"));
            _defineQuestionsPrivateObject.SetField("rbRequired", BindingFlags.Instance | BindingFlags.NonPublic, _rbRequired);
            _rbAddTextbox = new RadioButtonList();
            _rbAddTextbox.Items.Add(new ListItem("0", "0"));
            _rbAddTextbox.Items.Add(new ListItem("1", "1"));
            _defineQuestionsPrivateObject.SetField("rbAddTextbox", BindingFlags.Instance | BindingFlags.NonPublic, _rbAddTextbox);
            _rbGridRequired = new RadioButtonList();
            _rbGridRequired.Items.Add(new ListItem("0", "0"));
            _rbGridRequired.Items.Add(new ListItem("1", "1"));
            _defineQuestionsPrivateObject.SetField("rbGridRequired", BindingFlags.Instance | BindingFlags.NonPublic, _rbGridRequired);
            _rbGridType = new RadioButtonList();
            _rbGridType.Items.Add(new ListItem("", ""));
            _defineQuestionsPrivateObject.SetField("rbGridType", BindingFlags.Instance | BindingFlags.NonPublic, _rbGridType);
            _plQposition = new PlaceHolder();
            _defineQuestionsPrivateObject.SetField("plQposition", BindingFlags.Instance | BindingFlags.NonPublic, _plQposition);
            _plQuestionno = new PlaceHolder();
            _defineQuestionsPrivateObject.SetField("plQuestionno", BindingFlags.Instance | BindingFlags.NonPublic, _plQuestionno);
            _plPReorder = new PlaceHolder();
            _defineQuestionsPrivateObject.SetField("plPReorder", BindingFlags.Instance | BindingFlags.NonPublic, _plPReorder);
            _plQReorder = new PlaceHolder();
            _defineQuestionsPrivateObject.SetField("plQReorder", BindingFlags.Instance | BindingFlags.NonPublic, _plQReorder);
            _drpQPage = new DropDownList();
            _drpQPage.Items.Add(new ListItem("0", "0"));
            _drpQPage.Items.Add(new ListItem("1", "1"));
            _defineQuestionsPrivateObject.SetField("drpQPage", BindingFlags.Instance | BindingFlags.NonPublic, _drpQPage);
            _drpRToQuestion = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpRToQuestion", BindingFlags.Instance | BindingFlags.NonPublic, _drpRToQuestion);
            _txtQuestion = new CKEditorControl();
            _defineQuestionsPrivateObject.SetField("txtQuestion", BindingFlags.Instance | BindingFlags.NonPublic, _txtQuestion);
            _gvResponseOption = new GridView();
            _defineQuestionsPrivateObject.SetField("gvResponseOption", BindingFlags.Instance | BindingFlags.NonPublic, _gvResponseOption);
            _txtGridRow = new TextBox();
            _defineQuestionsPrivateObject.SetField("txtGridRow", BindingFlags.Instance | BindingFlags.NonPublic, _txtGridRow);
            _drpPages = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpPages", BindingFlags.Instance | BindingFlags.NonPublic, _drpPages);
            _repPages = new Repeater();
            _defineQuestionsPrivateObject.SetField("repPages", BindingFlags.Instance | BindingFlags.NonPublic, _repPages);
            ShimClientScriptManager.AllInstances.RegisterStartupScriptTypeStringString = (csm, t, s1, s2) => _itemCommandRegisteredStartupScript = true;
            var uiPage = new System.Web.UI.Page();

            _defineQuestionsInstance.Page = uiPage;
            _drpQPosition = new DropDownList();
            _drpQPosition.Items.Add(new ListItem("1", "1"));
            _defineQuestionsPrivateObject.SetField("drpQPosition", BindingFlags.Instance | BindingFlags.NonPublic, _drpQPosition);
            _drpQuestion = new DropDownList();
            _drpQuestion.Items.Add(new ListItem("1", "1"));
            _defineQuestionsPrivateObject.SetField("drpQuestion", BindingFlags.Instance | BindingFlags.NonPublic, _drpQuestion);
            _drpPosition = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpPosition", BindingFlags.Instance | BindingFlags.NonPublic, _drpPosition);
            _drpRPPosition = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpRPPosition", BindingFlags.Instance | BindingFlags.NonPublic, _drpRPPosition);
            _drpRToPage = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpRToPage", BindingFlags.Instance | BindingFlags.NonPublic, _drpRToPage);
            _drpRQPosition = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpRQPosition", BindingFlags.Instance | BindingFlags.NonPublic, _drpRQPosition);
            _plbranch = new PlaceHolder();
            _defineQuestionsPrivateObject.SetField("plbranch", BindingFlags.Instance | BindingFlags.NonPublic, _plbranch);
            _drpBQuestion = new DropDownList();
            _defineQuestionsPrivateObject.SetField("drpBQuestion", BindingFlags.Instance | BindingFlags.NonPublic, _drpBQuestion);
        }
示例#19
0
        private void AdicionarControles()
        {
            IList <Template> ListaTemplate = ListarTodos();

            //TextBox txtDescricao = null;
            CKEditorControl txtDescricao = null;

            // Para múltiplos paineis assim precisamos de multiplas sugestões
            Panel1.Controls.Add(new LiteralControl("<script type='text/javascript'>Suggestions = {};</script>"));

            for (int i = 0; i < ListaTemplate.Count; i++)
            {
                Panel1.Controls.Add(new LiteralControl("<div class='form-group'>"));
                string idTextoBox = string.Concat("txt_", ListaTemplate[i].ID);
                txtDescricao = GerarCKEditorDinamicamente(idTextoBox);
                txtDescricao.EnableViewState = true;
                txtDescricao.Text            = ListaTemplate[i].TextoTemplate;


                string helperId = string.Concat("UcHelperTooltip", ListaTemplate[i].ID);
                var    Chave    = ((enumTemplate)ListaTemplate[i].ID).ToString();

                var helper = (ucHelperTooltip)Page.LoadControl("~/UserControls/ucHelperTooltip.ascx");
                helper.ID    = helperId;
                helper.Chave = Chave;

                string idLabel = string.Concat("lbl_", ListaTemplate[i].ID);
                Label  label   = this.GerarLabelDinamicamente(idLabel, ListaTemplate[i].DescricaoTemplate);
                label.AssociatedControlID = txtDescricao.ID;

                Panel1.Controls.Add(label);
                Panel1.Controls.Add(helper);
                Panel1.Controls.Add(new Literal()
                {
                    Text = "<br />"
                });

                // Label do assunto
                Label lblAssunto = this.GerarLabelDinamicamente("", "Assunto do e-mail: ");
                Panel1.Controls.Add(lblAssunto);
                Panel1.Controls.Add(new Literal()
                {
                    Text = "<br />"
                });

                // Área de texto do Assunto
                TextBox textBox = new TextBox();
                textBox.ID       = "txt_assunto_" + ListaTemplate[i].ID;
                textBox.CssClass = "form-control";
                textBox.Text     = ListaTemplate[i].Assunto;

                Panel1.Controls.Add(textBox);
                Panel1.Controls.Add(new Literal()
                {
                    Text = "<br />"
                });

                Panel1.Controls.Add(txtDescricao);

                // Adicionar Scripts do AutoComplete

                if (ListaTemplate[i].HashTag != null)
                {
                    var HashTags = ListaTemplate[i].HashTag.Split(',');

                    var script =
                        "<script type='text/javascript'>Suggestions[{2}] = [{1}]; CKEDITOR.on('instanceReady', function (evt) {CKEDITOR.instances.ContentPlaceHolder1_ContentPlaceHolder1_{0}.execCommand('reloadSuggestionBox', {2} );});</script>";

                    string hashTagsJson = "";

                    foreach (var hash in HashTags)
                    {
                        var possuiHash = hash.Substring(0, 1) == "#";
                        // Verifica se a string começa com '#', se começa, retorna sem a '#', se não começa, retorna normalmente.
                        hashTagsJson += "{ id: '" + (possuiHash ? hash.Substring(1, hash.Length - 1) : hash) + "', label: '" + hash + "' }";

                        if (hash != HashTags.LastOrDefault())
                        {
                            hashTagsJson += ",";
                        }
                    }

                    script = script.Replace("{0}", idTextoBox);
                    script = script.Replace("{1}", hashTagsJson);
                    script = script.Replace("{2}", (i + 1).ToString());

                    // Adicionar Scripts do autocomplete
                    Panel1.Controls.Add(new LiteralControl(script));
                }

                Panel1.Controls.Add(new LiteralControl("</div>"));
            }

            Button btnSalvar = new Button();

            btnSalvar.Click   += new System.EventHandler(btnGravar_Click);
            btnSalvar.Text     = "Gravar";
            btnSalvar.CssClass = "btn btn-primary";
            Panel1.Controls.Add(btnSalvar);
            ViewState["controlsadded"] = true;
        }
示例#20
0
 /// <summary>
 /// The initialize.
 /// </summary>
 public override void Initialize()
 {
     this.htmlEditorControl = new CKEditorControl {
         ID = this.ControlID
     };
 }
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         dlcount       = (TextBox)DetailsView_customer.FindControl("dlcopy");
        CKEditorControl msg1          = (CKEditorControl)DetailsView_customer.FindControl("dlinst");
        CKEditorControl msg2          = (CKEditorControl)DetailsView_customer.FindControl("edinst");
        CKEditorControl url           = (CKEditorControl)DetailsView_customer.FindControl("url");
        CKEditorControl toc           = (CKEditorControl)DetailsView_customer.FindControl("txt_toc");
        RadioButtonList option1       = (RadioButtonList)DetailsView_customer.FindControl("thankuoption");
        TextBox         logintxt      = (TextBox)DetailsView_customer.FindControl("logintextbox");
        TextBox         weburl        = (TextBox)DetailsView_customer.FindControl("WebUrl");
        TextBox         transkeytxt   = (TextBox)DetailsView_customer.FindControl("transkeybox");
        TextBox         mailid        = (TextBox)DetailsView_customer.FindControl("mailid");
        CheckBoxList    CheckBoxList1 = (CheckBoxList)DetailsView_customer.FindControl("CheckBoxList1");
        Label           clientid      = (Label)DetailsView_customer.FindControl("lblclientid");

        //payment section
        RadioButtonList option         = (RadioButtonList)DetailsView_customer.FindControl("searchoption");
        RadioButtonList Onlinecc       = (RadioButtonList)DetailsView_customer.FindControl("Onlinecc");
        RadioButtonList morder         = (RadioButtonList)DetailsView_customer.FindControl("morder");
        RadioButtonList pcheck         = (RadioButtonList)DetailsView_customer.FindControl("pcheck");
        CKEditorControl CreditCardinst = (CKEditorControl)DetailsView_customer.FindControl("CreditCardinst");
        CKEditorControl morderinst     = (CKEditorControl)DetailsView_customer.FindControl("morderinst");
        CKEditorControl pcheckinst     = (CKEditorControl)DetailsView_customer.FindControl("pcheckinst");

        //service section
        RadioButtonList Apptypeoption = (RadioButtonList)DetailsView_customer.FindControl("List_App_type");
        CheckBox        chk_Mail      = (CheckBox)DetailsView_customer.FindControl("chk_Mail");
        CheckBox        chk_Fax       = (CheckBox)DetailsView_customer.FindControl("chk_Fax");
        CheckBox        chk_Email     = (CheckBox)DetailsView_customer.FindControl("chk_Email");
        //purpose section
        RadioButtonList Purpose_Section   = (RadioButtonList)DetailsView_customer.FindControl("Purposeoption");
        TextBox         frm4_institution  = (TextBox)DetailsView_customer.FindControl("frm4_institution");
        TextBox         frm4_lawfirm      = (TextBox)DetailsView_customer.FindControl("frm4_lawfirm");
        TextBox         frm4_military     = (TextBox)DetailsView_customer.FindControl("frm4_military");
        TextBox         frm4_organization = (TextBox)DetailsView_customer.FindControl("frm4_organization");
        TextBox         frm4_state        = (TextBox)DetailsView_customer.FindControl("frm4_state");
        TextBox         frm4_board        = (TextBox)DetailsView_customer.FindControl("frm4_board");
        TextBox         frm4_evaluation   = (TextBox)DetailsView_customer.FindControl("frm4_evaluation");
        //talent db
        RadioButtonList tdb = (RadioButtonList)DetailsView_customer.FindControl("tdbuoption");

        //review section
        CKEditorControl splinst      = (CKEditorControl)DetailsView_customer.FindControl("splinst");
        CKEditorControl complinst    = (CKEditorControl)DetailsView_customer.FindControl("complinst");
        RadioButtonList Uploadoption = (RadioButtonList)DetailsView_customer.FindControl("Uploadoption");

        int credit = 0;

        string hashlogin    = "";
        string hashtranskey = "";
        string temp         = "";
        string siteurl      = "";
        string vartype      = "";

        if (option.SelectedIndex == 0)
        {
            temp         = logintxt.Text.Trim();
            hashlogin    = ClientAdmin.Utility.base64Encode(temp);
            credit       = 1;
            temp         = "";
            temp         = transkeytxt.Text.Trim();
            hashtranskey = ClientAdmin.Utility.base64Encode(temp);
        }
        else
        {
            credit       = 0;
            hashlogin    = "";
            hashtranskey = "";
            mailid.Text  = "";
        }
        if (option1.SelectedIndex == 0)
        {
            siteurl = weburl.Text;
        }
        else
        {
            siteurl = "";
        }

        for (int i = 0; i <= CheckBoxList1.Items.Count - 1; i++)
        {
            if (CheckBoxList1.Items[i].Selected)
            {
                vartype += CheckBoxList1.Items[i].Value + "|";
            }
        }
        vartype = vartype.TrimEnd('|');


        //purposelock

        string Lock_TargetName = "";
        string Lock_State      = "";

        if (Purpose_Section.SelectedIndex == 0)
        {
            switch (frm4_option_purpose.SelectedItem.ToString())
            {
            case "Admission to High School":
                Lock_TargetName = frm4_institution.Text;
                break;

            case "Admission to College/University":
                Lock_TargetName = frm4_institution.Text;
                break;

            case "Employment":
                Lock_TargetName = frm4_organization.Text;
                break;

            case "Immigration":
                Lock_TargetName = frm4_lawfirm.Text;
                break;

            case "Professional Licensing/Registration":
                Lock_TargetName = frm4_board.Text;
                Lock_State      = frm4_state.Text;
                break;

            case "Military":
                Lock_TargetName = frm4_military.Text;
                break;

            case "Other":
                Lock_TargetName = frm4_evaluation.Text;
                break;
            }
        }
        else
        {
            frm4_option_purpose.SelectedIndex = 0;
            Lock_TargetName = "";
            Lock_State      = "";
        }



        bool result = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_CustomerAdonsUpdate(Convert.ToInt32(dlcount.Text), msg1.Text, msg2.Text, clientid.Text, url.Text, toc.Text.ToString(), credit, hashlogin, hashtranskey, mailid.Text, option1.SelectedValue.ToString(), vartype, siteurl, chk_Mail.Checked.ToString(), chk_Fax.Checked.ToString(), chk_Email.Checked.ToString(), tdb.SelectedValue.ToString(), Purpose_Section.SelectedValue.ToString(), frm4_option_purpose.SelectedValue.ToString(), Lock_TargetName, Lock_State, splinst.Text, complinst.Text, Uploadoption.SelectedValue.ToString(), Apptypeoption.SelectedValue.ToString(), Targetoption.SelectedValue.ToString(), Convert.ToInt32(Onlinecc.SelectedValue.ToString()), Convert.ToInt32(morder.SelectedValue.ToString()), Convert.ToInt32(pcheck.SelectedValue.ToString()), CreditCardinst.Text, morderinst.Text, pcheckinst.Text);
            break;

        case "ADMIN":
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/CustomerAddons/Browse_CustomerAddons.aspx?clid=" + clientid.Text);
        }
    }
        public void LoadControlsPlantilla()
        {
            txtSubTitulo    = (TextBox)this.FindControl("txtSubTitulo");
            txtSubTitulo2   = (TextBox)this.FindControl("txtSubTitulo2");
            fckDescripcion  = (CKEditorControl)this.FindControl("fckDescripcion");
            fckDescripcion2 = (CKEditorControl)this.FindControl("fckDescripcion2");
            fckResumen      = (CKEditorControl)this.FindControl("fckResumen");
            txtImagen       = (TextBox)this.FindControl("txtImagen");
            txtImagen2      = (TextBox)this.FindControl("txtImagen2");
            txtImagen3      = (TextBox)this.FindControl("txtImagen3");
            txtVideo        = (TextBox)this.FindControl("txtVideo");
            txtVideo2       = (TextBox)this.FindControl("txtVideo2");
            txtVideo3       = (TextBox)this.FindControl("txtVideo3");
            txtDocumento    = (TextBox)this.FindControl("txtDocumento");
            txtDocumento2   = (TextBox)this.FindControl("txtDocumento2");
            txtDocumento3   = (TextBox)this.FindControl("txtDocumento3");
            txtFecha        = (TextBox)this.FindControl("txtFecha");
            txtFecha2       = (TextBox)this.FindControl("txtFecha2");

            drpTipoEnlace     = (DropDownList)this.FindControl("drpTipoEnlace");
            drpArticuloEnlace = (DropDownList)this.FindControl("drpArticuloEnlace");
            txtURLEnlace      = (TextBox)this.FindControl("txtURLEnlace");
            txtURLEstatica    = (TextBox)this.FindControl("txtURLEstatica");
            drpEstilo         = (DropDownList)this.FindControl("drpEstilo");
            repParametro      = (Repeater)this.FindControl("repParametro");

            chkEnPortada = (CheckBox)this.FindControl("chkEnPortada");

            //usuarios
            hdnUsuarioID       = (HiddenField)this.FindControl("hdnUsuarioID");
            rbtPersonaNatural  = (RadioButton)this.FindControl("rbtPersonaNatural");
            rbtPersonaJuridica = (RadioButton)this.FindControl("rbtPersonaJuridica");
            ddlDni             = (DropDownList)this.FindControl("ddlDni");
            txtDni             = (TextBox)this.FindControl("txtDni");
            txtNombre          = (TextBox)this.FindControl("txtNombre");
            txtApellido        = (TextBox)this.FindControl("txtApellido");
            drpPais            = (DropDownList)this.FindControl("drpPais");
            drpDepartamento    = (DropDownList)this.FindControl("drpDepartamento");
            txtDireccion       = (TextBox)this.FindControl("txtDireccion");
            ddlTelefono        = (DropDownList)this.FindControl("ddlTelefono");
            txtTelefono        = (TextBox)this.FindControl("txtTelefono");
            txtEmail           = (TextBox)this.FindControl("txtEmail");
            txtContrasena      = (TextBox)this.FindControl("txtContrasena");
            txtConfirmacion    = (TextBox)this.FindControl("txtConfirmacion");
            drpProvincia       = (DropDownList)this.FindControl("drpProvincia");
            drpDistrito        = (DropDownList)this.FindControl("drpDistrito");
            txtReferencia      = (TextBox)this.FindControl("txtReferencia");
            txtCiudad          = (TextBox)this.FindControl("txtCiudad");
            txtCodigoPostal    = (TextBox)this.FindControl("txtCodigoPostal");

            //Producto
            txtIdProducto          = (TextBox)this.FindControl("txtIdProducto");
            txtCodigo              = (TextBox)this.FindControl("txtCodigo");
            txtDescripcionModelo   = (TextBox)this.FindControl("txtDescripcionModelo");
            fckDescripcionProducto = (TextBox)this.FindControl("fckDescripcionProducto");
            txtImagenProducto      = (TextBox)this.FindControl("txtImagenProducto");
            txtImagen2Producto     = (TextBox)this.FindControl("txtImagenProducto2");
            txtPrecio              = (TextBox)this.FindControl("txtPrecio");
            txtNombreProducto      = (TextBox)this.FindControl("txtNombreProducto");
            txtProductoCategoria   = (TextBox)this.FindControl("txtProductoCategoria");
            txtSOS = (TextBox)this.FindControl("txtSOS");
            //direccion entrega
            txtNombreSede        = (TextBox)this.FindControl("txtNombreSede");
            txtDireccionEntrega  = (TextBox)this.FindControl("txtDireccionEntrega");
            txtTelefono01Entrega = (TextBox)this.FindControl("txtTelefono01Entrega");
            txtTelefono02Entrega = (TextBox)this.FindControl("txtTelefono02Entrega");
            txtTelefono03Entrega = (TextBox)this.FindControl("txtTelefono03Entrega");
            txtTelefono04Entrega = (TextBox)this.FindControl("txtTelefono04Entrega");
            txtLatitud           = (TextBox)this.FindControl("txtLatitud");
            txtLongitud          = (TextBox)this.FindControl("txtLongitud");
        }