Example #1
0
 public void SaveTicket(TicketDatabase ticketDatabase)
 {
     lock (_locker)
     {
         DatabaseManager.Instance.SaveIntIdEntity(ticketDatabase);
     }
 }
        private void CreateEntity_OnClicked(object sender, EventArgs e)
        {
            var number = new Random(DateTime.Now.Millisecond).Next(1, 1000);
            var entity = new TicketDatabase()
            {
                Subject  = "Subject " + number,
                Body     = "Body " + number,
                LogsFile = Encoding.ASCII.GetBytes("ASDASDASDADAD")
            };

            DataManager.Instance.SaveTicket(entity);

            DisplayAlert("Saved", "Saved", "Ok");
        }