public void PopulatePurchaseObj() { Stocky.Proxies.AppDataClient DataClient = new Proxies.AppDataClient(); try { DataClient.Open(); PurchaseObject = DataClient.GetPurchaseObjectByStockID(Convert.ToInt32(Stockid)).PurchaseObject; } finally { DataClient.Close(); } }