C Additional Functionality
The following are some useful functionalities in the SDK
The following example shows how validation can be done on a Evolution username and password.
bool valid = Agent.Authenticate(AgentName.Text, Password.Text); MessageBox.Show(valid.ToString()); Any transaction can be processed using a evolution user as follows
DatabaseContext.CurrentAgent = new Agent("User2"); On a online branch accounting database a specific branch can be specified as follows.
DatabaseContext.SetBranchContext(1); User defined fields can be updated as follows
SalesOrder SO = new SalesOrder("SO00023");//Specify the order number to process SO.UserFields["ucIITestSO"] = "this is a user field"; User fields can also be used to update existing fields where properties don't exist like on a Customer
Customer cust = new Customer(); cust.Code = "Test1"; cust.Description = "test1"; cust.UserFields["BFOpenType"] = 1;//The existing field will be case sensitive bfopentype wont work cust.Save(); The following List method displays a list of unprocessed Sales Orders the ListArchived method will display processed orders that are now invoices
dataGridView1.DataSource = SalesOrder.List(" Account = 'Cash'");
PriceLists can be displayed per customers
DataTable PriceList = SellingPrice.ListByStockItemID(1002); - See more at: http://kb.pastel.co.za/article.php?id=2000#sthash.BeYKuUBe.dpuf