Ejemplo n.º 1
0
 public ActionResult SearchByName(AESManagement.Models.searchModel searchModel)
 {
     int appId = -1;
     if (searchModel.firstname != null && searchModel.lastname != null)
     {
         try
         {
             using (DataServiceClient client = new DataServiceClient())
             {
                 if (Session["_Locked"] != null)
                     client.unlockApp((int)Session["_Locked"]);
                 
                 var result = client.getApplicationsWithName(searchModel.firstname, searchModel.lastname);
                 if (result.Count() > 0)
                 {
                     appId = result.First();
                     client.lockApp(appId);
                     Session["_Locked"] = appId;
                 }
             }
         }
         catch (Exception)
         { }
     }
     return Redirect("Applicant/" + appId.ToString());
 }
Ejemplo n.º 2
0
        public ActionResult UpdateNotes(AESManagement.Models.NoteModel noteModel)
        {
                using (DataServiceClient client = new DataServiceClient())
                {
                    client.unlockApp(noteModel.appId);
                    client.updateNotes(noteModel.appId, noteModel.note);
                }

                return RedirectToAction("Applicant", "Application", -1);
        }