Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. A kliens oldali releváns kód:
  2.  
  3. proxy.AutoImportGetProtokollsCompleted += (sender, args) =>
  4. {
  5. try
  6. {
  7. if (args.res.Succeeded)
  8. {
  9. AutomationLogs.Clear();
  10. foreach (var result in args.Result)
  11. {
  12. AutomationLogs.Add(result);
  13. }
  14. }
  15. }
  16. catch (Exception)
  17. {
  18.  
  19. }
  20.  
  21. };
  22. proxy.AutoImportGetProtokollsAsync();
  23.  
  24. Szerver oldali service és a hozzá tartozó cucc:
  25.  
  26. [OperationContract]
  27. public List<sp_AutoImport_GetProtokolls_Result> AutoImportGetProtokolls(out ErrorCustomModel res)
  28. {
  29. return M8500.AutoImportGetProtokolls(out res);
  30. }
  31.  
  32. public static List<sp_AutoImport_GetProtokolls_Result> AutoImportGetProtokolls(out ErrorCustomModel res)
  33. {
  34. res = new ErrorCustomModel();
  35. try
  36. {
  37. List<sp_AutoImport_GetProtokolls_Result> list = null;
  38. EKOEntities db = new EKOEntities();
  39. list = (from row in db.sp_AutoImport_GetProtokolls()
  40. select new sp_AutoImport_GetProtokolls_Result
  41. {
  42. //row.Datum.Value.ToString("dd/MM/yy HH:mm")
  43. DT_Beginn = row.DT_Beginn,
  44. KEY_SAP_Import_MessageTyp = row.KEY_SAP_Import_MessageTyp,
  45. TXT_Beschreibung = row.TXT_Beschreibung
  46.  
  47. }
  48. ).ToList();
  49.  
  50. return list;
  51.  
  52. }
  53. catch (Exception ex)
  54. {
  55. res = ExceptionHelper.GetTranslatedSQLErrorMessage(ex);
  56.  
  57. }
  58. return null;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement