public void ButtonClicked(int id, int button) { try { using (var manager = new TrackActivityManager()) { manager.SetButtonClicked(id, button); } } catch (Exception ex) { //-----------------------------------------------------------------------------adderror to db--------------------------------------------------------------------------------------------- } }
public void OpenMail(int id) { try { using (var manager = new TrackActivityManager()) { manager.OpenMail(id); } //HttpResponseMessage response = new HttpResponseMessage(); //Byte[] b = (GetImageByteArray()); //response.Content = new ByteArrayContent(b); //response.Content.LoadIntoBufferAsync(b.Length).Wait(); //response.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg"); //return response; } catch (Exception ex) { //-----------------------------------------------------------------------------adderror to db--------------------------------------------------------------------------------------------- } }