Пример #1
0
 public static void Delete(Event Event)
 {
     Delete (Event.Id);
 }
Пример #2
0
        public static Event FromData(Data data)
        {
            Event result = new Event ();

            if (data.ContainsKey ("id"))
                result._id = data.Get<Guid>("id");
            else
                throw new Exception (string.Format (SorentoLib.Strings.Exception.JSONFrom, typeof (Event), "ID"));

            if (data.ContainsKey ("createtimestamp"))
                result._createtimestamp = data.Get<int>("createtimestamp");

            if (data.ContainsKey ("updatetimestamp"))
                result._updatetimestamp = data.Get<int>("updatetimestamp");

            if (data.ContainsKey ("sort"))
                result._sort = data.Get<double>("sort");

            if (data.ContainsKey ("name"))
                result._name = data.Get<string>("name");

            if (data.ContainsKey ("ownerid"))
                result._ownerid = data.Get<Guid>("ownerid");

            if (data.ContainsKey ("data"))
                result._data = data.Get<Data>("data");

            return result;
        }
Пример #3
0
 public static void Update(Guid Id, string EventId, Data EventData)
 {
     if (EventId != string.Empty)
     {
         Event e = new Event (Id, EventId, EventData);
         e.Save ();
     }
 }