Exemplo n.º 1
0
        public void AddNewSale(skPerson PersonObject, skAddresses AddressObject, int UserID)
        {
            Stocky.Proxies.AppDataClient DataClient = new Proxies.AppDataClient();
            try
            {
                if (IsObjectValid)
                {
                    DataClient.Open();
                    DataClient.AddNewSale(AddressObject, PersonObject, this, UserID);

                    OnSaleCreated();
                }
                else
                {
                    throw new Stocky.Exceptions.InvalidObjectException(this.PropertyList);
                }
            }
            finally
            {
                DataClient.Close();
            }
        }
Exemplo n.º 2
0
        public bool AddNewSale(int UserID)
        {
            Proxies.AppDataClient DataClient = new Proxies.AppDataClient();
            try
            {
                if (IsObjectValid)
                {
                    DataClient.Open();
                    DataClient.AddNewSale(this, UserID);

                    OnSaleCreated();
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            finally
            {
                DataClient.Close();
            }
        }