Пример #1
0
 //
 // GET: /Application/
 public async Task<ActionResult> Applicant(int id = -1)
 {
     AESManagement.AESDataService.ApplicantApp model = new AESManagement.AESDataService.ApplicantApp();
     if (id != -1)
     {
         using (DataServiceClient client = new DataServiceClient())
         {
             if (Session["_Locked"] != null)
             {
                 await client.unlockAppAsync((int)Session["_Locked"]);
             }
             await client.lockAppAsync(id);
             model = await client.getApplicationAsync(id);
             Session["_Locked"] = id;
         }
         return View(model);
     }
     else
         return View(model);
 }
Пример #2
0
        //
        // GET: /Application/
        public async Task <ActionResult> Applicant(int id = -1)
        {
            AESManagement.AESDataService.ApplicantApp model = new AESManagement.AESDataService.ApplicantApp();
            if (id != -1)
            {
                using (DataServiceClient client = new DataServiceClient())
                {
                    if (Session["_Locked"] != null)
                    {
                        await client.unlockAppAsync((int)Session["_Locked"]);
                    }
                    await client.lockAppAsync(id);

                    model = await client.getApplicationAsync(id);

                    Session["_Locked"] = id;
                }
                return(View(model));
            }
            else
            {
                return(View(model));
            }
        }