static void Main(string[] args) { // Create instance of service and set credentials. Vendor_Binding service = new Vendor_Binding(); service.UseDefaultCredentials = true; // Create instance of vendor. Vendor vend = new Vendor(); vend.Name = "Vendor Name"; Msg("Pre Create"); PrintVendor(vend); // Insert vendor. service.Create(ref vend); Msg("Post Create"); PrintVendor(vend); // Create filter for searching for vendors. List<Vendor_Filter> filterArray = new List<Vendor_Filter>(); Vendor_Filter nameFilter = new Vendor_Filter(); nameFilter.Field = Vendor_Fields.Name; nameFilter.Criteria = "C*"; filterArray.Add(nameFilter); Msg("List before modification"); PrintVendorList(service, filterArray); vend.Name = vend.Name + "Updated"; service.Update(ref vend); Msg("Post Update"); PrintVendor(vend); Msg("List after modification"); PrintVendorList(service, filterArray); service.Delete(vend.Key); Msg("List after deletion"); PrintVendorList(service, filterArray); Msg("Press [ENTER] to exit program!"); Console.ReadLine(); }
/// <remarks/> public void UpdateMultipleAsync(Vendor[] Vendor_List, object userState) { if ((this.UpdateMultipleOperationCompleted == null)) { this.UpdateMultipleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateMultipleOperationCompleted); } this.InvokeAsync("UpdateMultiple", new object[] { Vendor_List}, this.UpdateMultipleOperationCompleted, userState); }
/// <remarks/> public void UpdateMultipleAsync(Vendor[] Vendor_List) { this.UpdateMultipleAsync(Vendor_List, null); }
/// <remarks/> public void UpdateAsync(Vendor Vendor) { this.UpdateAsync(Vendor, null); }
public void Update(ref Vendor Vendor) { object[] results = this.Invoke("Update", new object[] { Vendor}); Vendor = ((Vendor)(results[0])); }
/// <remarks/> public void CreateMultipleAsync(Vendor[] Vendor_List) { this.CreateMultipleAsync(Vendor_List, null); }
/// <remarks/> public void CreateAsync(Vendor Vendor, object userState) { if ((this.CreateOperationCompleted == null)) { this.CreateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOperationCompleted); } this.InvokeAsync("Create", new object[] { Vendor}, this.CreateOperationCompleted, userState); }
/// <remarks/> public void CreateAsync(Vendor Vendor) { this.CreateAsync(Vendor, null); }
static void PrintVendor(Vendor v) { Console.WriteLine("No: {0} Name: {1}", v.No, v.Name); }