Beispiel #1
0
        protected override void OnSaveForm()
        {
            base.OnSaveForm();

            Item.DiskVolumeReference.Guid = new Guid(DiskVolume.SelectedValue);
            Item.DatabaseFileType         = (DatabaseFileType)Enum.Parse(typeof(DatabaseFileType), DatabaseFileType.SelectedValue);
            Item.LogicalName    = LogicalName.Text;
            Item.Filename       = Filename.Text;
            Item.AllocatedSpace = ByteSizeFormatter.Parse(AllocatedSpace.Text);
            Item.UsedSpace      = ByteSizeFormatter.Parse(UsedSpace.Text);
            Item.ReservedSpace  = ByteSizeFormatter.Parse(ReservedSpace.Text);
        }
Beispiel #2
0
        protected override void OnSaveForm()
        {
            base.OnSaveForm();

            Item.FileGroupType  = (FileGroupType)Enum.Parse(typeof(FileGroupType), fileGroupTypeList.SelectedValue);
            Item.LayoutType     = (FileGroupLayoutType)Enum.Parse(typeof(FileGroupLayoutType), LayoutType.SelectedValue);
            Item.AllocationType = (FileGroupAllocationType)Enum.Parse(typeof(FileGroupAllocationType), allocationTypeList.SelectedValue);
            Item.DiskVolumeType = (DiskVolumeType)Enum.Parse(typeof(DiskVolumeType), diskVolumeTypeList.SelectedValue);
            Item.FileGroupName  = FileGroupName.Text;
            Item.AllocatedSpace = ByteSizeFormatter.Parse(AllocatedSpace.Text);
            Item.FileCount      = int.Parse(FileCount.Text);
        }
        protected override void OnSaveForm()
        {
            base.OnSaveForm();

            Item.DiskVolumeType = Registry.DiskVolumeType.Unknown;
            foreach (ListItem li in DiskVolumeType.Items)
            {
                if (li.Selected)
                {
                    Item.DiskVolumeType |= (DiskVolumeType)Enum.Parse(typeof(DiskVolumeType), li.Value);
                }
            }
            Item.LocalPath.Value = LocalPath.Text;
            Item.UncPath.Value   = UncPath.Text;
            Item.FullSpace       = ByteSizeFormatter.Parse(FullSpace.Text);
            //item.AllocatedSpace = ByteSizeFormatter.ParseFileSize(AllocatedSpace.Text);    // read only field
            Item.ReservedSpace = ByteSizeFormatter.Parse(ReservedSpace.Text);
            Item.Speed         = (long)(double.Parse(Speed.Text) * 100000.0);
        }