public IList <Domain.Employee> GetAllInBranch(Domain.Branch branch) { var criteria = DetachedCriteria.For <Domain.Employee>() .Add(Restrictions.Eq(@"Branch", branch)); return(_repo.FindAll(criteria)); }
protected virtual void OnFormTransactionSuccess(Domain.Branch branch, bool status) { var handler = FormTransactionSuccess; if (handler != null) { handler(this, new FormTransactionSuccessArgs <Domain.Branch>(branch, status)); } }
public Domain.Branch Save() { Domain.Branch branch = null; var session = NHibernateSessionManager.GetLocalSession(); session.DoTransactional(sess => branch = _branchRepo.Insert( new Domain.Branch( _form.BranchCode, _form.BranchName, new Address( _form.City, _form.Zipcode, _form.AddressLine ) ) ) ); return(branch); }