Exemplo n.º 1
0
        public void Add()
        {
            Stocky.Proxies.AppDataClient DataClient = new Proxies.AppDataClient();
            try
            {
                if (IsObjectValid)
                {
                    DataClient.Open();

                    DataClient.AddNewPurchase(this, CurrentUser.UserID);

                    OnPurchaseCreated();
                }
                else
                {
                    throw new InvalidObjectException(PropertyList);
                }
            }
            finally
            {
                DataClient.Close();
            }
        }