public string GetReasonById(string data)
        {
            var id = JsonConvert.DeserializeObject <Guid>(data);

            if (id != Guid.Empty)
            {
                var r      = ReasonManager.GetReason(id);
                var reason = new EditReason
                {
                    NAME = r.TEXT,
                    ID   = r.ID
                };
                return(JsonConvert.SerializeObject(reason));
            }

            return(JsonConvert.SerializeObject(new REASON()));
        }
Exemplo n.º 2
0
 private async void TSB_EditReason_Click(object sender, EventArgs e)
 {
     await EditReason?.Invoke();
 }