예제 #1
0
 /// <summary>
 /// Deep copies the current GreyFoxSetting to another instance of GreyFoxSetting.
 /// </summary>
 /// <param name="GreyFoxSetting">The GreyFoxSetting to copy to.</param>
 /// <param name="isolation">Placeholders are used to isolate the GreyFoxSetting from its children.</param>
 public void CopyTo(GreyFoxSetting greyFoxSetting, bool isolation)
 {
     greyFoxSetting.iD            = iD;
     greyFoxSetting.isPlaceHolder = isPlaceHolder;
     greyFoxSetting.isSynced      = isSynced;
     greyFoxSetting.name          = name;
     greyFoxSetting.settingValue  = settingValue;
     if (parent != null)
     {
         if (isolation)
         {
             greyFoxSetting.parent = parent.NewPlaceHolder();
         }
         else
         {
             greyFoxSetting.parent = parent.Copy(false);
         }
     }
     if (modifyRole != null)
     {
         if (isolation)
         {
             greyFoxSetting.modifyRole = modifyRole.NewPlaceHolder();
         }
         else
         {
             greyFoxSetting.modifyRole = modifyRole.Copy(false);
         }
     }
     greyFoxSetting.isSystemSetting = isSystemSetting;
 }
예제 #2
0
        protected void ok_Click(object sender, EventArgs e)
        {
            if (greyFoxSettingID == 0)
            {
                obj = new GreyFoxSetting();
            }
            else
            {
                obj = new GreyFoxSetting(greyFoxSettingID);
            }

            obj.Name            = tbName.Text;
            obj.SettingValue    = tbSettingValue.Text;
            obj.IsSystemSetting = cbIsSystemSetting.Checked;

            if (msParent.SelectedItem != null && msParent.SelectedItem.Value != "Null")
            {
                obj.Parent = GreyFoxSetting.NewPlaceHolder(
                    int.Parse(msParent.SelectedItem.Value));
            }
            else
            {
                obj.Parent = null;
            }

            if (msModifyRole.SelectedItem != null && msModifyRole.SelectedItem.Value != "Null")
            {
                obj.ModifyRole = GreyFoxRole.NewPlaceHolder(
                    int.Parse(msModifyRole.SelectedItem.Value));
            }
            else
            {
                obj.ModifyRole = null;
            }

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

            if (resetOnAdd)
            {
                tbName.Text                = string.Empty;
                tbSettingValue.Text        = string.Empty;
                cbIsSystemSetting.Checked  = false;
                msParent.SelectedIndex     = 0;
                msModifyRole.SelectedIndex = 0;
            }

            OnUpdated(EventArgs.Empty);
        }
예제 #3
0
        /// <summary>
        /// Fills the {0} from a OleIDataReader.
        /// </summary>
        public static void FillFromReader(DbContentRating dbContentRating, IDataReader r, int idOffset, int dataOffset)
        {
            dbContentRating.iD            = r.GetInt32(idOffset);
            dbContentRating.isSynced      = true;
            dbContentRating.isPlaceHolder = false;

            dbContentRating.createDate  = r.GetDateTime(0 + dataOffset);
            dbContentRating.modifyDate  = r.GetDateTime(1 + dataOffset);
            dbContentRating.name        = r.GetString(2 + dataOffset);
            dbContentRating.description = r.GetString(3 + dataOffset);
            dbContentRating.iconUrl     = r.GetString(4 + dataOffset);
            if (!r.IsDBNull(5 + dataOffset) && r.GetInt32(5 + dataOffset) > 0)
            {
                dbContentRating.requiredRole = GreyFoxRole.NewPlaceHolder(r.GetInt32(5 + dataOffset));
            }
        }
예제 #4
0
        /// <summary>
        /// Fills the {0} from a OleIDataReader.
        /// </summary>
        public static void FillFromReader(GreyFoxSetting greyFoxSetting, IDataReader r, int idOffset, int dataOffset)
        {
            greyFoxSetting.iD            = r.GetInt32(idOffset);
            greyFoxSetting.isSynced      = true;
            greyFoxSetting.isPlaceHolder = false;

            greyFoxSetting.name         = r.GetString(0 + dataOffset);
            greyFoxSetting.settingValue = r.GetString(1 + dataOffset);
            if (!r.IsDBNull(2 + dataOffset) && r.GetInt32(2 + dataOffset) > 0)
            {
                greyFoxSetting.parent = GreyFoxSetting.NewPlaceHolder(r.GetInt32(2 + dataOffset));
            }
            if (!r.IsDBNull(3 + dataOffset) && r.GetInt32(3 + dataOffset) > 0)
            {
                greyFoxSetting.modifyRole = GreyFoxRole.NewPlaceHolder(r.GetInt32(3 + dataOffset));
            }
            greyFoxSetting.isSystemSetting = r.GetBoolean(4 + dataOffset);
        }
예제 #5
0
        protected void ok_Click(object sender, EventArgs e)
        {
            if (dbContentRatingID == 0)
            {
                obj = new DbContentRating();
            }
            else
            {
                obj = new DbContentRating(dbContentRatingID);
            }

            obj.Name        = tbName.Text;
            obj.Description = tbDescription.Text;
            obj.IconUrl     = tbIconUrl.Text;

            if (msRequiredRole.SelectedItem != null && msRequiredRole.SelectedItem.Value != "Null")
            {
                obj.RequiredRole = GreyFoxRole.NewPlaceHolder(
                    int.Parse(msRequiredRole.SelectedItem.Value));
            }
            else
            {
                obj.RequiredRole = null;
            }

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

            if (resetOnAdd)
            {
                tbName.Text                  = string.Empty;
                tbDescription.Text           = string.Empty;
                tbIconUrl.Text               = string.Empty;
                msRequiredRole.SelectedIndex = 0;
            }

            OnUpdated(EventArgs.Empty);
        }
예제 #6
0
        /// <summary>
        /// Fills the {0} from a OleDbDataReader.
        /// </summary>
        public static void FillFromReader(GreyFoxSetting greyFoxSetting, OleDbDataReader r, int idOffset, int dataOffset)
        {
            greyFoxSetting.iD            = r.GetInt32(idOffset);
            greyFoxSetting.isSynced      = true;
            greyFoxSetting.isPlaceHolder = false;

            //
            // Parse Children From Database
            //
            if (!r.IsDBNull(0 + dataOffset) && r.GetInt32(0 + dataOffset) > 0)
            {
                greyFoxSetting.modifyRole = GreyFoxRole.NewPlaceHolder(r.GetInt32(0 + dataOffset));
            }

            //
            // Parse Fields From Database
            //
            greyFoxSetting.name  = r.GetString(1 + dataOffset);
            greyFoxSetting.value = r.GetString(2 + dataOffset);
        }
예제 #7
0
        /// <summary>
        /// Deep copies the current GreyFoxSetting to another instance of GreyFoxSetting.
        /// </summary>
        /// <param name="GreyFoxSetting">The GreyFoxSetting to copy to.</param>
        /// <param name="isolation">Placeholders are used to isolate the GreyFoxSetting from its children.</param>
        public void CopyTo(GreyFoxSetting greyFoxSetting, bool isolation)
        {
            greyFoxSetting.iD            = iD;
            greyFoxSetting.isPlaceHolder = isPlaceHolder;
            greyFoxSetting.isSynced      = isSynced;
            greyFoxSetting.name          = name;
            greyFoxSetting.value         = value;

            if (modifyRole != null)
            {
                if (isolation)
                {
                    greyFoxSetting.modifyRole = modifyRole.NewPlaceHolder();
                }
                else
                {
                    greyFoxSetting.modifyRole = modifyRole.Copy(false);
                }
            }
        }
예제 #8
0
        /// <summary>
        /// Deep copies the current DbContentRating to another instance of DbContentRating.
        /// </summary>
        /// <param name="DbContentRating">The DbContentRating to copy to.</param>
        /// <param name="isolation">Placeholders are used to isolate the DbContentRating from its children.</param>
        public void CopyTo(DbContentRating dbContentRating, bool isolation)
        {
            dbContentRating.iD            = iD;
            dbContentRating.isPlaceHolder = isPlaceHolder;
            dbContentRating.isSynced      = isSynced;
            dbContentRating.createDate    = createDate;
            dbContentRating.modifyDate    = modifyDate;
            dbContentRating.name          = name;
            dbContentRating.description   = description;
            dbContentRating.iconUrl       = iconUrl;

            if (requiredRole != null)
            {
                if (isolation)
                {
                    dbContentRating.requiredRole = requiredRole.NewPlaceHolder();
                }
                else
                {
                    dbContentRating.requiredRole = requiredRole.Copy(false);
                }
            }
        }
예제 #9
0
        /// <summary>
        /// Deep copies the current DbContentCatalog to another instance of DbContentCatalog.
        /// </summary>
        /// <param name="DbContentCatalog">The DbContentCatalog to copy to.</param>
        /// <param name="isolation">Placeholders are used to isolate the DbContentCatalog from its children.</param>
        public void CopyTo(DbContentCatalog dbContentCatalog, bool isolation)
        {
            dbContentCatalog.iD                               = iD;
            dbContentCatalog.isPlaceHolder                    = isPlaceHolder;
            dbContentCatalog.isSynced                         = isSynced;
            dbContentCatalog.title                            = title;
            dbContentCatalog.description                      = description;
            dbContentCatalog.keywords                         = keywords;
            dbContentCatalog.status                           = status;
            dbContentCatalog.workflowMode                     = workflowMode;
            dbContentCatalog.commentsEnabled                  = commentsEnabled;
            dbContentCatalog.notifyOnComments                 = notifyOnComments;
            dbContentCatalog.enabled                          = enabled;
            dbContentCatalog.sortOrder                        = sortOrder;
            dbContentCatalog.icon                             = icon;
            dbContentCatalog.createDate                       = createDate;
            dbContentCatalog.modifyDate                       = modifyDate;
            dbContentCatalog.defaultTimeToPublish             = defaultTimeToPublish;
            dbContentCatalog.defaultTimeToExpire              = defaultTimeToExpire;
            dbContentCatalog.defaultTimeToArchive             = defaultTimeToArchive;
            dbContentCatalog.defaultKeywords                  = defaultKeywords;
            dbContentCatalog.defaultMenuLeftIcon              = defaultMenuLeftIcon;
            dbContentCatalog.defaultMenuRightIcon             = defaultMenuRightIcon;
            dbContentCatalog.menuLabel                        = menuLabel;
            dbContentCatalog.menuTooltip                      = menuTooltip;
            dbContentCatalog.menuEnabled                      = menuEnabled;
            dbContentCatalog.menuOrder                        = menuOrder;
            dbContentCatalog.menuLeftIcon                     = menuLeftIcon;
            dbContentCatalog.menuRightIcon                    = menuRightIcon;
            dbContentCatalog.menuBreakImage                   = menuBreakImage;
            dbContentCatalog.menuBreakCssClass                = menuBreakCssClass;
            dbContentCatalog.menuCssClass                     = menuCssClass;
            dbContentCatalog.menuCatalogCssClass              = menuCatalogCssClass;
            dbContentCatalog.menuCatalogSelectedCssClass      = menuCatalogSelectedCssClass;
            dbContentCatalog.menuCatalogChildSelectedCssClass = menuCatalogChildSelectedCssClass;
            dbContentCatalog.menuClipCssClass                 = menuClipCssClass;
            dbContentCatalog.menuClipSelectedCssClass         = menuClipSelectedCssClass;
            dbContentCatalog.menuClipChildSelectedCssClass    = menuClipChildSelectedCssClass;
            dbContentCatalog.menuClipChildExpandedCssClass    = menuClipChildExpandedCssClass;
            dbContentCatalog.menuOverrideFlags                = menuOverrideFlags;
            dbContentCatalog.menuIconFlags                    = menuIconFlags;

            if (parentCatalog != null)
            {
                if (isolation)
                {
                    dbContentCatalog.parentCatalog = parentCatalog.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.parentCatalog = parentCatalog.Copy(false);
                }
            }
            if (childCatalogs != null)
            {
                if (isolation)
                {
                    dbContentCatalog.childCatalogs = childCatalogs.Copy(true);
                }
                else
                {
                    dbContentCatalog.childCatalogs = childCatalogs.Copy(false);
                }
            }
            if (defaultClip != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultClip = defaultClip.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultClip = defaultClip.Copy(false);
                }
            }
            if (defaultStatus != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultStatus = defaultStatus.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultStatus = defaultStatus.Copy(false);
                }
            }
            if (defaultRating != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultRating = defaultRating.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultRating = defaultRating.Copy(false);
                }
            }
            if (defaultArchive != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultArchive = defaultArchive.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultArchive = defaultArchive.Copy(false);
                }
            }
            if (templates != null)
            {
                if (isolation)
                {
                    dbContentCatalog.templates = templates.Copy(true);
                }
                else
                {
                    dbContentCatalog.templates = templates.Copy(false);
                }
            }
            if (authorRole != null)
            {
                if (isolation)
                {
                    dbContentCatalog.authorRole = authorRole.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.authorRole = authorRole.Copy(false);
                }
            }
            if (editorRole != null)
            {
                if (isolation)
                {
                    dbContentCatalog.editorRole = editorRole.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.editorRole = editorRole.Copy(false);
                }
            }
            if (reviewerRole != null)
            {
                if (isolation)
                {
                    dbContentCatalog.reviewerRole = reviewerRole.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.reviewerRole = reviewerRole.Copy(false);
                }
            }
        }
예제 #10
0
 /// <summary>
 /// Deep copies the current DojoMemberTypeTemplate to another instance of DojoMemberTypeTemplate.
 /// </summary>
 /// <param name="DojoMemberTypeTemplate">The DojoMemberTypeTemplate to copy to.</param>
 /// <param name="isolation">Placeholders are used to isolate the DojoMemberTypeTemplate from its children.</param>
 public void CopyTo(DojoMemberTypeTemplate dojoMemberTypeTemplate, bool isolation)
 {
     dojoMemberTypeTemplate.iD            = iD;
     dojoMemberTypeTemplate.isPlaceHolder = isPlaceHolder;
     dojoMemberTypeTemplate.isSynced      = isSynced;
     dojoMemberTypeTemplate.createDate    = createDate;
     dojoMemberTypeTemplate.modifyDate    = modifyDate;
     dojoMemberTypeTemplate.name          = name;
     dojoMemberTypeTemplate.description   = description;
     dojoMemberTypeTemplate.orderNum      = orderNum;
     if (memberType != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.memberType = memberType.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.memberType = memberType.Copy(false);
         }
     }
     dojoMemberTypeTemplate.memberTypeTreeHash = memberTypeTreeHash;
     if (parent != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.parent = parent.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.parent = parent.Copy(false);
         }
     }
     if (root != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.root = root.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.root = root.Copy(false);
         }
     }
     if (initialRank != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.initialRank = initialRank.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.initialRank = initialRank.Copy(false);
         }
     }
     if (initialRole != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.initialRole = initialRole.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.initialRole = initialRole.Copy(false);
         }
     }
     dojoMemberTypeTemplate.initialEmailFrom   = initialEmailFrom;
     dojoMemberTypeTemplate.initialEmailBody   = initialEmailBody;
     dojoMemberTypeTemplate.allowGuestPurchase = allowGuestPurchase;
     dojoMemberTypeTemplate.allowPurchase      = allowPurchase;
     dojoMemberTypeTemplate.allowRenewal       = allowRenewal;
     dojoMemberTypeTemplate.allowAutoRenewal   = allowAutoRenewal;
     dojoMemberTypeTemplate.ageYearsMax        = ageYearsMax;
     dojoMemberTypeTemplate.ageYearsMin        = ageYearsMin;
     dojoMemberTypeTemplate.memberForMin       = memberForMin;
     dojoMemberTypeTemplate.memberForMax       = memberForMax;
     if (rankMin != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.rankMin = rankMin.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.rankMin = rankMin.Copy(false);
         }
     }
     if (rankMax != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.rankMax = rankMax.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.rankMax = rankMax.Copy(false);
         }
     }
     if (membershipTemplate1 != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.membershipTemplate1 = membershipTemplate1.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.membershipTemplate1 = membershipTemplate1.Copy(false);
         }
     }
     if (membershipTemplate2 != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.membershipTemplate2 = membershipTemplate2.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.membershipTemplate2 = membershipTemplate2.Copy(false);
         }
     }
     if (membershipTemplate3 != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.membershipTemplate3 = membershipTemplate3.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.membershipTemplate3 = membershipTemplate3.Copy(false);
         }
     }
     if (membershipTemplate4 != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.membershipTemplate4 = membershipTemplate4.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.membershipTemplate4 = membershipTemplate4.Copy(false);
         }
     }
     if (membershipTemplate5 != null)
     {
         if (isolation)
         {
             dojoMemberTypeTemplate.membershipTemplate5 = membershipTemplate5.NewPlaceHolder();
         }
         else
         {
             dojoMemberTypeTemplate.membershipTemplate5 = membershipTemplate5.Copy(false);
         }
     }
 }
예제 #11
0
        protected void ok_Click(object sender, EventArgs e)
        {
            if (greyFoxUserID == 0)
            {
                obj = new GreyFoxUser();
            }
            else
            {
                obj = new GreyFoxUser(greyFoxUserID);
            }

            obj.UserName      = tbUserName.Text;
            obj.IsDisabled    = cbIsDisabled.Checked;
            obj.LoginDate     = DateTime.Parse(tbLoginDate.Text);
            obj.LoginCount    = int.Parse(tbLoginCount.Text);
            obj.LoginPassword = tbLoginPassword.Text;
            obj.ActivationID  = tbActivationID.Text;

            if (msContact.SelectedItem != null && msContact.SelectedItem.Value != "Null")
            {
                obj.Contact = GreyFoxContact.NewPlaceHolder("sysGlobal_Contacts",
                                                            int.Parse(msContact.SelectedItem.Value));
            }
            else
            {
                obj.Contact = null;
            }

            if (msRoles.IsChanged)
            {
                obj.Roles = new GreyFoxRoleCollection();
                foreach (ListItem i in msRoles.Items)
                {
                    if (i.Selected)
                    {
                        obj.Roles.Add(GreyFoxRole.NewPlaceHolder(int.Parse(i.Value)));
                    }
                }
            }

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

            if (resetOnAdd)
            {
                tbUserName.Text         = string.Empty;
                cbIsDisabled.Checked    = false;
                tbLoginDate.Text        = DateTime.Now.ToString();
                tbLoginCount.Text       = string.Empty;
                tbLoginPassword.Text    = string.Empty;
                tbActivationID.Text     = string.Empty;
                msContact.SelectedIndex = 0;
            }

            OnUpdated(EventArgs.Empty);
        }