Exemplo n.º 1
0
 public static AddressBusiness GetInstance()
 {
     if (instance == null)
     {
         lock (padlock)
         {
             instance = new AddressBusiness();
         }
     }
     return(instance);
 }
Exemplo n.º 2
0
 public StudentBusiness()
 {
     addressBusiness = AddressBusiness.GetInstance();
     xmlSerializer   = new XmlSerializer(typeof(List <Student>));
     if (studentInfos == null || studentInfos.Count == 0)
     {
         studentInfos = GetAllStudentInfos();
     }
     //students = new List<NewStudent>();
     //students.Add(new NewStudent { Id = 1, Name = "Nguyen Van A", Birthday = DateTime.Now, Gender = 1, AddressId = 78 });
     //SaveStudents();
 }