コード例 #1
0
 public void OpenCustomerDetail()
 {
     using (CustomersList list = (CustomersList)ModulesManager.Current.OpenModuleObjectDetail(new CustomersListObject(Session), false)) {
         list.OpenDetail(Andrew.Oid, null);
         CustomerDetailView detailView = CustomerDetailView.LastCreatedView;
         Assert.IsNotNull(detailView);
         Assert.AreEqual(Andrew.Oid, detailView.Module.CustomerEdit.VRObjectEditObject.VideoRentObject.Oid);
         detailView.Module.Dispose();
     }
 }
コード例 #2
0
 public void TryOpenCustomerDetailWithNullCurrentRecord()
 {
     using (CustomersList list = (CustomersList)ModulesManager.Current.OpenModuleObjectDetail(new CustomersListObject(Session), false)) {
         CustomerDetailView.LastCreatedView = null;
         list.CustomersEdit.CurrentRecord   = null;
         list.CommandEdit(null);
         CustomerDetailView detailView = CustomerDetailView.LastCreatedView;
         Assert.IsNull(detailView);
     }
 }
コード例 #3
0
 public void OpenCustomerDetail_SetCurrentCustomer()
 {
     using (CustomersList list = (CustomersList)ModulesManager.Current.OpenModuleObjectDetail(new CustomersListObject(Session), false)) {
         list.OpenDetail(Andrew.Oid, null);
         CustomerDetailView detailView = CustomerDetailView.LastCreatedView;
         Assert.IsNotNull(detailView);
         detailView.Module.SetAsCurrentCustomer();
         detailView.Module.Dispose();
     }
     LayoutManager.Current.Logout();
     Assert.IsTrue(LayoutManager.Current.Login(ReferenceData.AdministratorString, string.Empty, Session));
     Assert.AreEqual(Andrew.Oid, ViewModelLayoutData.GetLayoutData().CurrentCustomerOid);
 }
コード例 #4
0
 public CustomerDetailView(CustomerDetail customerDetail)
     : base(customerDetail)
 {
     LastCreatedView = this;
 }