I updated to the latest version but i found the following problem.
When i try to change the order status from an order, the method doesn´t send an email. I was doing some tests and i got it overriding the Add method from OrderHistoryFactory. This is the result of the method:
public new order_history Add(order_history Entity)
{
long? idAux = Entity.id;
Entity.id = null;
List Entities = new
List();
Entities.Add(Entity);
RestRequest request = this.RequestForAdd($"{pluralEntityName}&sendemail=1", Entities);
request.AddParameter("sendemail", 1);
order_history aux = this.Execute(request);
Entity.id = idAux;
return this.Get((long)aux.id);
}
And this is how i tested it.
[Test]
public void AddOrderHistory()
{
order_history history = new order_history
{
id_order = 35206,
date_add = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
id_employee = 0,
id_order_state = 2
};
history = factory.Add(history);
Assert.IsNotNull(history.id);
Hello,
I updated to the latest version but i found the following problem.
When i try to change the order status from an order, the method doesn´t send an email. I was doing some tests and i got it overriding the Add method from OrderHistoryFactory. This is the result of the method:
public new order_history Add(order_history Entity) { long? idAux = Entity.id; Entity.id = null; List Entities = new
List();
Entities.Add(Entity);
RestRequest request = this.RequestForAdd($"{pluralEntityName}&sendemail=1", Entities);
request.AddParameter("sendemail", 1);
order_history aux = this.Execute(request);
Entity.id = idAux;
return this.Get((long)aux.id);
}
And this is how i tested it.
[Test] public void AddOrderHistory() { order_history history = new order_history { id_order = 35206, date_add = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), id_employee = 0, id_order_state = 2 };
}
Is there another solution?
Thank you.
Regards.