コード例 #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();
            }
        }
コード例 #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();
            }
        }