示例#1
0
        public void UserRoleEczaneGrupRegister(User user, string ezaneGln, string eczaneMail,
                                               string eczaneAdi, int eczaneGrupId)
        {
            UserRole   userRole   = new UserRole();
            EczaneUser eczaneUser = new EczaneUser();
            EczaneGrup eczaneGrup = new EczaneGrup();
            Eczane     eczane     = new Eczane();

            eczane.Adi        = eczaneAdi;
            eczane.EczaneGln  = ezaneGln;
            eczane.Email      = eczaneMail;
            eczaneGrup.GrupId = eczaneGrupId;

            eczaneGrup.BaslangicTarihi = DateTime.Now;

            _userDal.Insert(user);
            var myuser = GetByEmail(eczaneMail);

            userRole.UserId = myuser.Id;
            userRole.RoleId = 3;
            _userRoleDal.Insert(userRole);
            _eczaneDal.Insert(eczane);
            var myeczane = _eczaneDal.Get(x => x.EczaneGln == ezaneGln);

            eczaneUser.EczaneId = myeczane.Id;
            eczaneUser.UserId   = myuser.Id;
            _eczaneUserDal.Insert(eczaneUser);
            eczaneGrup.EczaneId = myeczane.Id;
            _eczaneGrupDal.Insert(eczaneGrup);
        }
示例#2
0
 public void Insert(Eczane eczane)
 {
     eczane.Adi = eczane.Adi.Trim().ToUpper(new CultureInfo("tr-TR"));
     _eczaneDal.Insert(eczane);
 }
示例#3
0
 public void Insert(Eczane eczane)
 {
     _eczaneDal.Insert(eczane);
 }