//public static void OpenPurchaseTab(skPurchase PurchaseObj) //{ // ObjectMessenger om = new ObjectMessenger(); // if (PurchaseObj != null) // { // om.Send("TRANOBJ", PurchaseObj); // // UI.Enviroment.LoadNewTab("PurchaseDetailsView"); // } // else // { // throw new Exception("No Purchase with this ID can be found."); // } //} public static skPurchase GetPurchaseObject(int ID) { Proxies.AppDataClient DataClient = new Proxies.AppDataClient(); try { DataClient.Open(); skPurchase PurchaseOBJ = DataClient.GetPurchaseObject(ID).PurchaseObject; if (PurchaseOBJ != null) { return(PurchaseOBJ); } else { throw new Exception("No purchase found !"); } } finally { DataClient.Close(); } }