|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
try { DynRec = DynAx.CreateAxaptaRecord("smmBusRelTable"); string fieldName = ("Status"); string fieldValue = ("Active"); DynRec.ExecuteStmt(string.Format("select * from %1 where %1.{0} == '{1}'", fieldName, fieldValue)); List<String> QueryList = new List<string>(); while (DynRec.Found) { QueryList.Add((string)DynRec.get_Field("BusRelAccount")); DynRec.Next(); } MainGrid.DataSource = (from item in QueryList select new { item }).ToList(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Don't Panic!"); } |
AX BC- Read a Record
This entry was posted in C# Development. Bookmark the permalink.