
November 1, 2011 10:41 by
Couldn't find a c# example so I created one. A customer wanted to pull notes from an Invoice to place in SAGE when the processing orders were being pulled down via the v2 API.
//pass in the order_id value from your salesOrderEntity object.
public salesOrderInvoiceEntity[] GetSalesOrders(string orderID)
{
if (string.IsNullOrEmpty(this.SessionId))
this.Login();
filters listFilters = null;
complexFilter cFilter = new complexFilter();
cFilter.key = "order_id";
cFilter.value = new associativeEntity
{
key = "equal",
value = orderID
};
listFilters = new filters();
listFilters.complex_filter = new complexFilter[] { cFilter };
salesOrderInvoiceListRequest req = new salesOrderInvoiceListRequest(this.SessionId, listFilters);
return magentoService.salesOrderInvoiceList(req).result;
}
//I Only need the last comment but you can return the salesOrderInvoiceCommentEntity object and parse all that the invoice has.
public string GetInvoiceComments(string id)
{
if (string.IsNullOrEmpty(this.SessionId))
this.Login();
salesOrderInvoiceInfoResponse req = magentoService.salesOrderInvoiceInfo(new salesOrderInvoiceInfoRequest(this.SessionId, id));
if (req.result.comments != null)
return req.result.comments[0].comment;
else
return string.Empty;
}
d4e59d85-694f-43f5-ad41-f0b5138b0838|0|.0

March 14, 2010 12:25 by
| add java script function filterGrid(ddl) { if (ddl.value == '*') { Grid1.removeFilter(); } else { Grid1.addFilterCriteria('AccountRep', OboutGridFilterCriteria.EqualTo, ddl.value); Grid1.executeFilter(); } } set grid to AllowFiltering="True" and FilterType="ProgrammaticOnly" if (!Page.IsPostBack) { ddlReps.Attributes["onchange"] = "filterGrid(this)"; } |
0cd7c987-5e91-4ab3-a228-f3e72edb64aa|1|5.0