public void CreateCurrentCustomerRentsDetail() { using (CurrentCustomerRentsDetail detail = (CurrentCustomerRentsDetail)ModulesManager.Current.OpenModuleObjectDetail(new CurrentCustomerRentsDetailObject(Session), false)) { CurrentCustomerRentsDetailView view = CurrentCustomerRentsDetailView.LastCreatedView; Assert.IsNotNull(view); Assert.IsNotNull(view.Module); Assert.AreEqual(detail, view.Module); } }
public void CreateCurrentCustomerRentsDetail_ChangeCurrentCustomer() { using (CurrentCustomerRentsDetail list = (CurrentCustomerRentsDetail)ModulesManager.Current.OpenModuleObjectDetail(new CurrentCustomerRentsDetailObject(Session), false)) { CurrentCustomerProvider.Current.CurrentCustomerOid = Andrew.Oid; CurrentCustomerRentsDetailView rentsListView = CurrentCustomerRentsDetailView.LastCreatedView; Assert.IsNotNull(rentsListView); Assert.IsNotNull(rentsListView.Module); Assert.AreEqual(list, rentsListView.Module); Assert.AreEqual(Andrew.Oid, list.CurrentCustomerRentsEdit.CurrentCustomer.Oid); CurrentCustomerProvider.Current.CurrentCustomerOid = Alex.Oid; if (list.CurrentCustomerRentsEdit.CurrentCustomerActiveRents != null && list.CurrentCustomerRentsEdit.CurrentCustomerActiveRents.Count != 0) { foreach (Rent item in list.CurrentCustomerRentsEdit.CurrentCustomerActiveRents) { Assert.AreEqual(CurrentCustomerProvider.Current.CurrentCustomerOid, item.Customer.Oid); } } } }
public CurrentCustomerRentsDetailView(CurrentCustomerRentsDetail customersList) : base(customersList) { LastCreatedView = this; }