Example #1
0
        public ActionResult Search(string certificateNumber)
        {
            var s = _certificateService.GetAllCertificates();

            try
            {
                var certificate = _certificateService.GetCertificateByNumber(certificateNumber.ToString());
                return(View(certificate));
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Error", "Home", new { @errorText = ex.Message }));
            }
        }
Example #2
0
 public IEnumerable <CertificateShortInfo> GetAllCertificates()
 {
     return(certificateService.GetAllCertificates(User.Identity.GetUserId()).Select(ToClientDto));
 }