コード例 #1
0
 //
 // GET: /PersonalInfo/
 public async Task<ActionResult> Index()
 {
     var model = new PersonalInfoModel();
     if (((string)Session["Status"]).CompareTo("LoggedIn") == 0 && Convert.ToInt32(Session["ApplicantID"]) > 0)
     {
         using (var client = new DataServiceClient())
         {
             client.Open();
             var personalInfo = await client.getPersonalInfoAsync(Convert.ToInt32(Session["ApplicantId"]));
             var auth = await client.getApplicantAuthInfoAsync(Convert.ToInt32(Session["ApplicantId"]));
             model.city = personalInfo.city;
             model.name_alt = personalInfo.alias;
             model.name_first = personalInfo.firstName;
             model.name_last = personalInfo.lastName;
             model.name_middle = personalInfo.middleName;
             model.email = personalInfo.email;
             model.phone_num = personalInfo.Phone;
             model.ssn = personalInfo.socialNum;
             model.password = auth.password;
             model.passVerification = auth.password;
             model.state = personalInfo.state;
             model.street = personalInfo.street;
             model.zip = personalInfo.zip;
             client.Close();
         }
     }
     return View(model);
 }