コード例 #1
0
        public bool Add()
        {
            if (IsObjectValid)
            {
                Proxies.AppDataClient DataClient = new Proxies.AppDataClient();
                DataClient.Open();
                DataClient.AddNewVendor(this);
                DataClient.Close();

                OnVendorCreated();
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
 public void Add(skAddresses AddressObject)
 {
     Proxies.AppDataClient DataClient = new Proxies.AppDataClient();
     try
     {
         if (IsObjectValid)
         {
             DataClient.Open();
             DataClient.AddNewVendor(this, AddressObject);
         }
         else
         {
             throw new Stocky.Exceptions.InvalidObjectException(this.PropertyList);
         }
     }
     finally
     {
         DataClient.Close();
     }
 }