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(); } }
public bool Add(skAddresses AddressObject) { if (IsObjectValid) { DATA.AddNewVendor(this, AddressObject); OnVendorCreated(); return(true); } else { return(false); } }
public bool AddNewSale(skAddresses AddressObject) { try { if (IsObjectValid) { DATA.AddNewSale(AddressObject, this); OnSaleCreated(); return(true); } else { return(false); } } catch (Exception) { throw; } }
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(); } }