protected override void RenderContent(HtmlTextWriter output)
        {
            if (greyFoxUserPreferenceID == 0)
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", "row1");
                output.WriteAttribute("colspan", "2");
                output.Write(HtmlTextWriter.TagRightChar);

                output.Write("The GreyFoxUserPreference selected does not exist.");

                output.WriteEndTag("td");
                output.WriteEndTag("tr");
                return;
            }

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", "row1");
            output.WriteAttribute("colspan", "2");
            output.Write(HtmlTextWriter.TagRightChar);

            output.Write("<strong>Warning:</strong> This action deletes the selected ." +
                         "<em>Use with caution, this option cannot be undone.</em>");

            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", "row1");
            output.WriteAttribute("nowrap", "true");
            output.WriteAttribute("valign", "top");
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write(" to delete: ");
            output.WriteEndTag("td");
            output.WriteBeginTag("td");
            output.WriteAttribute("class", "row1");
            output.WriteAttribute("width", "100%");
            output.Write(HtmlTextWriter.TagRightChar);
            output.Write(greyFoxUserPreference.ToString());
            output.WriteEndTag("td");
            output.WriteEndTag("tr");

            output.WriteFullBeginTag("tr");
            output.WriteBeginTag("td");
            output.WriteAttribute("colspan", "2");
            output.WriteAttribute("align", "right");
            output.WriteAttribute("class", "row1");
            output.Write(HtmlTextWriter.TagRightChar);
            btOk.RenderControl(output);
            output.Write("&nbsp;");
            btCancel.RenderControl(output);
            output.WriteEndTag("td");
            output.WriteEndTag("tr");
        }
 protected override void OnPreRender(EventArgs e)
 {
     if (greyFoxUserPreferenceID != 0)
     {
         greyFoxUserPreference = new GreyFoxUserPreference(greyFoxUserPreferenceID);
         text = "Delete - " + greyFoxUserPreference.ToString();
     }
     else
     {
         text = "Delete ";
     }
     EnsureWindowScripts();
 }
Пример #3
0
        protected override void OnPreRender(EventArgs e)
        {
            if (greyFoxUserPreferenceID != 0)
            {
                greyFoxUserPreference = new GreyFoxUserPreference(greyFoxUserPreferenceID);

                #region Bind _system Folder

                //
                // Set Field Entries
                //


                //
                // Set Children Selections
                //


                #endregion

                #region Bind New Folder Folder

                //
                // Set Field Entries
                //

                ltName.Text      = greyFoxUserPreference.Name.ToString();
                ltPrefValue.Text = greyFoxUserPreference.PrefValue.ToString();

                //
                // Set Children Selections
                //

                // User

                if (greyFoxUserPreference.User != null)
                {
                    ltUser.Text = greyFoxUserPreference.User.ToString();
                }
                else
                {
                    ltUser.Text = string.Empty;
                }


                #endregion

                text = "View  - " + greyFoxUserPreference.ToString();
            }
        }
Пример #4
0
        protected override void OnPreRender(EventArgs e)
        {
            if (loadFlag)
            {
                if (greyFoxUserPreferenceID > 0)
                {
                    obj  = new GreyFoxUserPreference(greyFoxUserPreferenceID);
                    text = "Edit  - " + obj.ToString();
                }
                else if (greyFoxUserPreferenceID <= 0)
                {
                    obj  = new GreyFoxUserPreference();
                    text = "Add ";
                }

                //
                // Set Field Entries
                //
                tbName.Text  = obj.Name;
                tbValue.Text = obj.Value;

                //
                // Set Children Selections
                //
                if (obj.User != null)
                {
                    foreach (ListItem item in msUser.Items)
                    {
                        item.Selected = obj.User.ID.ToString() == item.Value;
                    }
                }
                else
                {
                    msUser.SelectedIndex = 0;
                }
            }
        }