Esempio n. 1
0
 public StudentUser(string id)
 {
     if (IsDigitsOnly(id))
     {
         using (PortalIdRepository pdb = new PortalIdRepository())
         {
             PortalId = pdb.GetByEmplid(AddLeadingZeros(id));
         }
     }
     else
     {
         using (PortalIdRepository pdb = new PortalIdRepository())
         {
             PortalId = pdb.GetByUserId(id);
         }
     }
     if (PortalId == null)   // Couldn't find student
     {
         PortalId = new PortalId();
         acadPlan = new AcadPlan();
         address = new Address();
         name = new Name();
         acadProg = new AcadProg();
     }
 }
Esempio n. 2
0
 public StudentUser(string id)
 {
     if (IsDigitsOnly(id))
     {
         using (PortalIdRepository pdb = new PortalIdRepository())
         {
             PortalId = pdb.GetByEmplid(AddLeadingZeros(id));
         }
     }
     else
     {
         using (PortalIdRepository pdb = new PortalIdRepository())
         {
             PortalId = pdb.GetByUserId(id);
         }
     }
     if (PortalId == null)   // Couldn't find student
     {
         PortalId = new PortalId();
         acadPlan = new AcadPlan();
         address  = new Address();
         name     = new Name();
         acadProg = new AcadProg();
     }
 }