//When Next is clicked Again on Step 1, update the information
 public void UpdateApplication(RegisterModel objRegisterModel, string oldPassword)
 {
     using (ClientApplicationRepository car = new ClientApplicationRepository())
     {
         var client = getApplicant(objRegisterModel.identityNumber);
         client.title           = objRegisterModel.title;
         client.firstName       = objRegisterModel.firstName;
         client.lastName        = objRegisterModel.lastName;
         client.province        = objRegisterModel.province;
         client.contactNumber   = objRegisterModel.contactNumber;
         client.emailAdress     = objRegisterModel.Email;
         client.physicalAddress = renderPhysicalAddressSave(objRegisterModel.streetAddress, objRegisterModel.suburb, objRegisterModel.city, objRegisterModel.postalCode.ToString());
         if (objRegisterModel.postalOffice == null)
         {
             client.postalAddress = renderPhysicalAddressSave(objRegisterModel.streetAddress, objRegisterModel.suburb, objRegisterModel.city, objRegisterModel.postalCode.ToString());
         }
         else
         {
             client.postalAddress = renderPostalAddressSave(objRegisterModel.postalOffice, objRegisterModel.town, objRegisterModel.boxpostalCode);
         }
         car.Update(client);
         DataContext dc = new DataContext();
         dc.SaveChanges();
     }
     updatePassword(objRegisterModel, oldPassword);
 }
Beispiel #2
0
 public void updateAppStatus(int appID, string stat)
 {
     using (var CArepo = new ClientApplicationRepository())
     {
         ClientApplication x = CArepo.GetById(appID);
         x.status = stat;
         CArepo.Update(x);
     }
 }
 public void AppStatusUpdate(string id)
 {
     using (var ClientArepo = new ClientApplicationRepository())
     {
         ClientApplication client = ClientArepo.Find(x => x.IDNumber == id).SingleOrDefault();
         client.status = "Proccessing";
         ClientArepo.Update(client);
     }
 }
 public void ChoosePackage(int packID, string id)
 {
     using (var CArepo = new ClientApplicationRepository())
     {
         ClientApplication client = CArepo.Find(x => x.IDNumber == id).SingleOrDefault();
         client.packageID = packID;
         CArepo.Update(client);
     }
 }