|
16.07.2007, 18:40 | #1 |
Участник
|
Там есть Sample Application "C:\Program Files\Microsoft Dynamics Mobile\Mobile Framework\Sample Application"
В котором ни одного xpo - только cs, sln и т.д. Кусок кода: X++: private void LoadCustomer() { List<List<string>> listCustomers = new List<List<string>>(); try { SqlDatabase database = (SqlDatabase)databaseCatalog.GetDatabase("AppDatabase"); DbDataReader reader = database.ExecuteReader("SELECT cus.Id, cus.Name, custype.Name FROM CUSTOMERS cus LEFT JOIN CUSTOMERTYPE custype ON custype.Id = cus.Type"); nCustomerCount = 0; view.ClearCustomerList(); while (reader.Read() == true) { nCustomerCount++; List<string> customer = new List<string>(); customer.Add(Convert.ToString(reader.GetInt32(0))); customer.Add(reader.GetString(1)); customer.Add(reader.GetString(2)); listCustomers.Add(customer); } view.SetCustomerList(listCustomers); } catch (Exception e) { LoggingService.Submit(new ErrorLogEntry("Database error", e)); throw e; } } |
|
|
|