protected void btOk_Click(object sender, EventArgs e)
        {
            GreyFoxUserPreference greyFoxUserPreference = new GreyFoxUserPreference(greyFoxUserPreferenceID);

            greyFoxUserPreference.Delete();

            greyFoxUserPreferenceID = 0;

            OnDeleted(EventArgs.Empty);
        }
 protected override void OnPreRender(EventArgs e)
 {
     if (greyFoxUserPreferenceID != 0)
     {
         greyFoxUserPreference = new GreyFoxUserPreference(greyFoxUserPreferenceID);
         text = "Delete - " + greyFoxUserPreference.ToString();
     }
     else
     {
         text = "Delete ";
     }
     EnsureWindowScripts();
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 4
0
        protected void ok_Click(object sender, EventArgs e)
        {
            if (greyFoxUserPreferenceID == 0)
            {
                obj = new GreyFoxUserPreference();
            }
            else
            {
                obj = new GreyFoxUserPreference(greyFoxUserPreferenceID);
            }

            obj.Name  = tbName.Text;
            obj.Value = tbValue.Text;

            if (msUser.SelectedItem != null && msUser.SelectedItem.Value != "Null")
            {
                obj.User = GreyFoxUser.NewPlaceHolder(
                    int.Parse(msUser.SelectedItem.Value));
            }
            else
            {
                obj.User = null;
            }

            if (editOnAdd)
            {
                greyFoxUserPreferenceID = obj.Save();
            }
            else
            {
                obj.Save();
            }

            if (resetOnAdd)
            {
                tbName.Text          = string.Empty;
                tbValue.Text         = string.Empty;
                msUser.SelectedIndex = 0;
            }

            OnUpdated(EventArgs.Empty);
        }
Exemplo n.º 5
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;
                }
            }
        }