1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System;
- using System.Collections.Generic;
- using InABox.Core;
- using InABox.Integration.Logikal;
- using Newtonsoft.Json;
- namespace PRSDesktop.Integrations.Logikal
- {
- public class LogikalProject : LogikalItem, ILogikalProject
- {
- [NullEditor]
- public Guid ID { get; set; }
- [EditorSequence(1)]
- [TextBoxEditor]
- [Caption("Projects")]
- public string? Title { get; set; }
- [EditorSequence(2)]
- [TextBoxEditor(Width = 150)]
- [Caption("Manager")]
- public string? PersonInCharge { get; set; }
- [EditorSequence(3)]
- [DateTimeEditor(Width = 100, Format = "dd MMM yy")]
- public DateTime LastUpdated { get; set; }
- [TextBoxEditor(Width = 100)]
- public string? JobNumber { get; set; }
- [TextBoxEditor(Width = 100)]
- public string? OfferNumber { get; set; }
- [NullEditor]
- public string? Path { get; set; }
- [NullEditor]
- public DateTime Created { get; set; }
- public String GetReference()
- {
- return $"Logikal:{ID}";
- }
-
- public static bool ParseReference(string? reference, out Guid id)
- {
- id = Guid.Empty;
- if (reference?.StartsWith("Logikal:") != true)
- return false;
- var comps = reference.Split(':');
- if (comps.Length < 2)
- return false;
- if (!Guid.TryParse(comps[1], out id))
- return false;
- return true;
- }
-
- public override void ValidateQuery(string sql, List<string> errors)
- {
-
- }
- }
- }
|