Exemple #1
0
        public void bindData()
        {
            using (SecureData sd = new SecureData(false, UserManager.GetLoginToken(true)))
            {
                var dt     = sd.GetData("web_searchcriteria_item_list", "", 0, 0).Tables["web_searchcriteria_item_list"];
                var drNone = dt.NewRow();
                drNone["group_name"] = " -- Select One -- ";
                drNone["name"]       = "none";
                dt.Rows.InsertAt(drNone, 0);

                //foreach (DataRow dr in dt.Rows)
                //{
                //    dr["group_name"] = dr["group_name"].ToString().ToLower().Replace("_", "  ");
                //}

                bool isInternal = (Page.User.IsInRole("ALLUSERS"));
                if (isInternal)
                {
                    var drOrder = dt.NewRow();
                    drOrder["group_name"] = "order request id";
                    drOrder["name"]       = "@order_request.order_request_id";
                    dt.Rows.Add(drOrder);
                }
                ddlItem.DataSource = dt;
                ddlItem.DataBind();
            }
            //lblChoose.Text = "Choose Query " + sequence + ":";
            //btnClear.Text = "Clear Criteria " + sequence;
            lblChoose.Text = Site1.DisplayText("lblChooseN", "Choose Criterion") + " " + sequence + ":";
            btnClear1.Text = Site1.DisplayText("btnClearN", "Clear Criterion") + " " + sequence;
        }
Exemple #2
0
 public static string DescriptionText(this Page pg, string controlID, string defaultValue)
 {
     try {
         return(Site1.DescriptionText(controlID, defaultValue).ToString());
     } catch {
         return(defaultValue);
     }
 }
Exemple #3
0
 public static string DisplayText(this Page pg, string controlID, string defaultValue, params string[] substitutes)
 {
     try {
         return(Site1.DisplayText(controlID, defaultValue, substitutes).ToString());
     }
     catch {
         return(defaultValue);
     }
 }
        private void DisplayHelp(int id)
        {
            using (SecureData sd = UserManager.GetSecureData(true))
            {
                using (DataManager dm = sd.BeginProcessing(true, true))
                {
                    DataTable dt = dm.Read(@"
                            select 
                                web_help_tag, virtual_path, heading, title, help_text_html
                            from 
                                web_help
                            where 
                                web_help_id = :helpid 
                                and sys_lang_id = :syslangid
                            ", new DataParameters(
                                               ":helpid", id,
                                               ":syslangid", sd.LanguageID
                                               ));


                    if (dt.Rows.Count > 0)
                    {
                        string tag     = dt.Rows[0].ItemArray[0].ToString();
                        string vPath   = dt.Rows[0].ItemArray[1].ToString();
                        string heading = dt.Rows[0].ItemArray[2].ToString();
                        string title   = dt.Rows[0].ItemArray[3].ToString();
                        string text    = dt.Rows[0].ItemArray[4].ToString();

                        string root = Toolkit.GetSetting("WebHelpURL", "~/help/");

                        if (!string.IsNullOrEmpty(vPath))
                        {
                            Response.Redirect(vPath);
                        }
                        else if (!string.IsNullOrEmpty(tag))
                        {
                            Response.Redirect(root + tag);
                        }
                        else if (!string.IsNullOrEmpty(text))
                        {
                            lblHeading.Text = heading;
                            lblTitle.Text   = title;
                            lblHelp.Text    = text;
                        }
                        else
                        {
                            lblTitle.Text = Site1.DisplayText("noHelp", "Help content is not available now.");
                        }
                    }
                    else
                    {
                        lblTitle.Text = Site1.DisplayText("noHelp", "Help content is not available now.");
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int helpId = 0;
                if (this.Request.QueryString["id"] != null)
                {
                    helpId = Int32.Parse(Request.QueryString["id"].ToString());
                }

                string helpTag = "";
                if (this.Request.QueryString["tag"] != null)
                {
                    helpTag = Request.QueryString["tag"].ToString();
                }

                string helpHeading = "";
                if (this.Request.QueryString["heading"] != null)
                {
                    helpHeading = Request.QueryString["heading"].ToString();
                }

                if (helpId > 0)
                {
                    DisplayHelp(helpId);
                }
                else if (!string.IsNullOrEmpty(helpTag))
                {
                    DisplayHelpTag(helpTag);
                }
                else if (!string.IsNullOrEmpty(helpHeading))
                {
                    DisplayHelpHeading(helpHeading);
                }
                else
                {
                    lblTitle.Text = Site1.DisplayText("noHelp", "Help content is not available now.");
                }
            }
        }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     btnSendFeedback.Text = Site1.DisplayText("btnSendFeedback", "Send Request");
 }