public static void GetObjectPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store)
        {
            PublicFolder           publicFolder           = store.GetDataObject("PublicFolder") as PublicFolder;
            PublicFolderStatistics publicFolderStatistics = store.GetDataObject("PublicFolderStatistics") as PublicFolderStatistics;

            if (dataTable.Rows.Count == 1)
            {
                DataRow dataRow = dataTable.Rows[0];
                if (publicFolder != null)
                {
                    dataRow["IsStorageQuotasSet"]         = (publicFolder.IssueWarningQuota == null || (publicFolder.IssueWarningQuota.Value.IsUnlimited && publicFolder.ProhibitPostQuota.Value.IsUnlimited && publicFolder.MaxItemSize.Value.IsUnlimited));
                    dataRow["IssueWarningQuota"]          = MailboxPropertiesHelper.UnlimitedByteQuantifiedSizeToString(publicFolder.IssueWarningQuota);
                    dataRow["ProhibitPostQuota"]          = MailboxPropertiesHelper.UnlimitedByteQuantifiedSizeToString(publicFolder.ProhibitPostQuota);
                    dataRow["MaxItemSize"]                = MailboxPropertiesHelper.UnlimitedByteQuantifiedSizeToString(publicFolder.MaxItemSize);
                    dataRow["IsRetainDeletedItemsForSet"] = (publicFolder.RetainDeletedItemsFor == null);
                    dataRow["RetainDeletedItemsFor"]      = ((publicFolder.RetainDeletedItemsFor != null) ? publicFolder.RetainDeletedItemsFor.Value.Days.ToString() : "5");
                    dataRow["IsAgeLimitSet"]              = (publicFolder.AgeLimit == null);
                    dataRow["AgeLimit"] = ((publicFolder.AgeLimit != null && publicFolder.AgeLimit != null) ? publicFolder.AgeLimit.Value.Days.ToString() : "5");
                }
                if (publicFolderStatistics != null)
                {
                    dataRow["TotalItemSize"]           = publicFolderStatistics.TotalItemSize.ToMB().ToString();
                    dataRow["TotalAssociatedItemSize"] = ((!publicFolderStatistics.TotalAssociatedItemSize.IsNullValue()) ? publicFolderStatistics.TotalAssociatedItemSize.ToMB() : 0UL);
                    dataRow["TotalDeletedItemSize"]    = ((!publicFolderStatistics.TotalDeletedItemSize.IsNullValue()) ? publicFolderStatistics.TotalDeletedItemSize.ToMB() : 0UL);
                }
            }
        }
示例#2
0
        public static void GetObjectPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store)
        {
            DataRow dataRow = dataTable.Rows[0];

            if (!DBNull.Value.Equals(dataRow["IssueWarningQuota"]))
            {
                Unlimited <ByteQuantifiedSize> unlimited = (Unlimited <ByteQuantifiedSize>)dataRow["IssueWarningQuota"];
                dataRow["IssueWarningQuota"] = MailboxPropertiesHelper.UnlimitedByteQuantifiedSizeToString(unlimited);
            }
            if (!DBNull.Value.Equals(dataRow["ProhibitSendQuota"]))
            {
                Unlimited <ByteQuantifiedSize> unlimited2 = (Unlimited <ByteQuantifiedSize>)dataRow["ProhibitSendQuota"];
                dataRow["ProhibitSendQuota"] = MailboxPropertiesHelper.UnlimitedByteQuantifiedSizeToString(unlimited2);
            }
            if (!DBNull.Value.Equals(dataRow["ProhibitSendReceiveQuota"]))
            {
                Unlimited <ByteQuantifiedSize> unlimited3 = (Unlimited <ByteQuantifiedSize>)dataRow["ProhibitSendReceiveQuota"];
                dataRow["ProhibitSendReceiveQuota"] = MailboxPropertiesHelper.UnlimitedByteQuantifiedSizeToString(unlimited3);
            }
            dataRow["MountStatus"] = ((DDIHelper.IsEmptyValue(dataRow["Mounted"]) || !(bool)dataRow["Mounted"]) ? Strings.StatusDismounted : Strings.StatusMounted);
            if (!DBNull.Value.Equals(dataRow["DeletedItemRetention"]))
            {
                dataRow["DeletedItemRetention"] = ((EnhancedTimeSpan)dataRow["DeletedItemRetention"]).Days.ToString();
            }
            if (!DBNull.Value.Equals(dataRow["MailboxRetention"]))
            {
                dataRow["MailboxRetention"] = ((EnhancedTimeSpan)dataRow["MailboxRetention"]).Days.ToString();
            }
            MailboxDatabase mailboxDatabase = store.GetDataObject("MailboxDatabase") as MailboxDatabase;

            if (mailboxDatabase != null)
            {
                dataRow["Servers"] = mailboxDatabase.Servers;
            }
            if (!DBNull.Value.Equals(dataRow["MaintenanceSchedule"]))
            {
                Schedule schedule = (Schedule)dataRow["MaintenanceSchedule"];
                dataRow["MaintenanceSchedule"] = new ScheduleBuilder(schedule).GetEntireState();
            }
            if (!DBNull.Value.Equals(dataRow["QuotaNotificationSchedule"]))
            {
                Schedule schedule2 = (Schedule)dataRow["QuotaNotificationSchedule"];
                dataRow["QuotaNotificationSchedule"] = new ScheduleBuilder(schedule2).GetEntireState();
            }
        }