Beispiel #1
0
        public async Task<IHttpActionResult> GetWTs(Guid id)
        {
            try
            {
                List<WTModel> list = new List<WTModel>();

                using (WillTestament repo = new WillTestament())
                {
                    list = await repo.GetWTForms(id);
                }

                return Ok(list);
            }
            catch (Exception ex)
            {
                Helper.ErrorLogging.LogError(ex);
                return InternalServerError(ex);
            }
        }
Beispiel #2
0
        public async Task<IHttpActionResult> DownloadWT(WTModel model)
        {
            try
            {
                if (!ModelState.IsValid)
                    return BadRequest(ModelState);

                using (WillTestament repo = new WillTestament())
                {
                    await repo.DownloadWTForm(model);
                }

                return Ok();
            }
            catch (Exception ex)
            {
                Helper.ErrorLogging.LogError(ex);
                return InternalServerError(ex);
            }
        }