Beispiel #1
0
        protected override void OnPreRender(EventArgs e)
        {
            if (greyFoxRoleID != 0)
            {
                greyFoxRole = new GreyFoxRole(greyFoxRoleID);

                #region Bind General Folder

                //
                // Set Field Entries
                //

                ltName.Text        = greyFoxRole.Name.ToString();
                ltDescription.Text = greyFoxRole.Description.ToString();
                ltIsDisabled.Text  = greyFoxRole.IsDisabled.ToString();


                #endregion

                #region Bind _system Folder

                //
                // Set Field Entries
                //



                #endregion

                text = "View  - " + greyFoxRole.ToString();
            }
        }
        protected override void RenderContent(HtmlTextWriter output)
        {
            if (greyFoxRoleID == 0)
            {
                output.WriteFullBeginTag("tr");
                output.WriteBeginTag("td");
                output.WriteAttribute("class", "row1");
                output.WriteAttribute("colspan", "2");
                output.Write(HtmlTextWriter.TagRightChar);

                output.Write("The GreyFoxRole 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(greyFoxRole.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 (greyFoxRoleID != 0)
     {
         greyFoxRole = new GreyFoxRole(greyFoxRoleID);
         text        = "Delete - " + greyFoxRole.ToString();
     }
     else
     {
         text = "Delete ";
     }
     EnsureWindowScripts();
 }
Beispiel #4
0
        protected override void OnPreRender(EventArgs e)
        {
            if (loadFlag)
            {
                if (greyFoxRoleID > 0)
                {
                    obj  = new GreyFoxRole(greyFoxRoleID);
                    text = "Edit  - " + obj.ToString();
                }
                else if (greyFoxRoleID <= 0)
                {
                    obj  = new GreyFoxRole();
                    text = "Add ";
                }

                //
                // Set Field Entries
                //
                tbName.Text          = obj.Name;
                tbDescription.Text   = obj.Description;
                cbIsDisabled.Checked = obj.IsDisabled;
            }
        }