示例#1
0
        public void AddNew(skAddresses AddressObject)
        {
            Proxies.AppDataClient DataClient = new Proxies.AppDataClient();
            try
            {
                if (IsObjectValid)
                {
                    if (AddressObject.IsObjectValid)
                    {
                        DataClient.Open();
                        DataClient.AddNewPerson(this, AddressObject);

                        OnPersonCreated();
                    }
                    else
                    {
                        throw new Stocky.Exceptions.InvalidObjectException(AddressObject.PropertyList);
                    }
                }
                else
                {
                    throw new Stocky.Exceptions.InvalidObjectException(this.PropertyList);
                }
            }
            finally
            {
                DataClient.Close();
            }
        }
示例#2
0
 public bool Add(skAddresses AddressObject)
 {
     if (IsObjectValid)
     {
         DATA.AddNewVendor(this, AddressObject);
         OnVendorCreated();
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#3
0
 public bool AddNewSale(skAddresses AddressObject)
 {
     try
     {
         if (IsObjectValid)
         {
             DATA.AddNewSale(AddressObject, this);
             OnSaleCreated();
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#4
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();
            }
        }