Ejemplo n.º 1
0
 protected void DataPortal_Create(int criteria)
 {
     LoadProperty(IdProperty, criteria);
     LoadProperty(NameProperty, "New Customer for Id: " + criteria.ToString());
     LoadProperty(DateCreatedProperty, new SmartDate(DateTime.Today));
     LoadProperty(DateTimeOffsetNotNullProperty, DateTimeOffset.Now);
     LoadProperty(ContactsProperty, CustomerContactList.GetCustomerContactList(0));
 }
Ejemplo n.º 2
0
        protected void DataPortal_Fetch(int criteria)
        {
            LoadProperty(IdProperty, criteria);
            LoadProperty(NameProperty, "Customer Name for Id: " + criteria.ToString());
            LoadProperty(DateCreatedProperty, new SmartDate(new DateTime(2000 + criteria, 1, 1)));
            LoadProperty(ContactsProperty, CustomerContactList.GetCustomerContactList(criteria));
            LoadProperty(DateTimeOffsetNotNullProperty, DateTimeOffset.Now);
            LoadProperty(TypeProperty, CustomeType.Inactive);

            if (criteria == customerIDThrowsException)
            {
                throw new ApplicationException("Test for Silverlight DataSource Error!");
            }
        }