Exemplo n.º 1
0
        public void TestOneToMany()
        {
            PhoneEntity[] mPhones = new PhoneEntity[5];
            PhoneEntity[] tPhones = new PhoneEntity[5];
            for (int index = 0; index < 5; index++)
            {
                mPhones[index] = new PhoneEntity('M', "158-" + index);
                tPhones[index] = new PhoneEntity('T', "020-" + index);
            }
            PhoneDao phoneDao = new PhoneDao();

            phoneDao.save(mPhones);
            phoneDao.save(tPhones);

            CatEntity           cat    = new CatEntity("lisi", 'F', 100.0f);
            IList <PhoneEntity> phones = new List <PhoneEntity>();

            phones.Add(mPhones[0]);
            phones.Add(tPhones[0]);
            cat.Phones = phones;
            CatDao catDao = new CatDao();

            catDao.save(cat);

            CatEntity getCat = catDao.getByName("lisi");
        }
Exemplo n.º 2
0
 public LoginManage(UserContext userContext, PhoneContext phoneContext, BrandContext brandContext, BrandTypeContext brandTypeContext, BrandTypeProductNoContext brandTypeProductNoContext, TypeYearContext typeYearContext, DeleteReasonContext deleteReasonContext)
 {
     _userContext          = userContext;
     userIQ                = _userContext.Users;
     phoneDao              = new PhoneDao(phoneContext);
     brandDao              = new BrandDao(brandContext);
     brandTypeDao          = new BrandTypeDao(brandTypeContext);
     brandTypeProductNoDao = new BrandTypeProductNoDao(brandTypeProductNoContext);
     typeYearDao           = new TypeYearDao(typeYearContext);
     deleteReasonDao       = new DeleteReasonDao(deleteReasonContext);
 }
 public ReplacePhoneCheckManage(PhoneContext phoneContext)
 {
     phoneDao = new PhoneDao(phoneContext);
 }
Exemplo n.º 4
0
 public BaseController()
 {
     _customerDao = new CustomerDao();
     _cityDao     = new CityDao();
     _phoneDao    = new PhoneDao();
 }
Exemplo n.º 5
0
 public AddPhoneCheckManage(PhoneContext phoneContext)
 {
     phoneDao = new PhoneDao(phoneContext);
 }
Exemplo n.º 6
0
 public ChoosePageManage(PhoneContext phoneContext)
 {
     phoneDao = new PhoneDao(phoneContext);
 }