1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using Comal.Classes;
- using InABox.Clients;
- using InABox.Core;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace PRSClasses
- {
- public class DFLayoutAddTaskFieldProperties : DFLayoutFieldProperties<int?>
- {
- public KanbanTypeLink TaskType { get; set; }
- public DFLayoutAddTaskFieldProperties()
- {
- TaskType = new KanbanTypeLink();
- }
- protected override void LoadProperties()
- {
- base.LoadProperties();
- TaskType.ID = GetProperty("TaskType", Guid.Empty);
- }
- protected override void SaveProperties()
- {
- base.SaveProperties();
- SetProperty("TaskType", TaskType.ID);
- }
- public override string FormatValue(object value)
- {
- return string.Format("{0}", value);
- }
- public override object? ParseValue(object value)
- {
- if (value is int)
- return value;
- if (int.TryParse(value as string, out var result))
- return result;
- return null;
- }
- }
- }
|