ApplyCampaign uygulandığında Lines.count ve index değerleri bu fonksiyonla güncelleye biliyoruz.
Parametreleri |
---|
Yok |
Return Type |
Yok |
C# Örneği
UnityObjects.Data order_slip = Global.UnityApp.NewDataObject(UnityObjects.DataObjectType.doSalesOrderSlip);
order_slip.New();
order_slip.DataFields.FieldByName("NUMBER").Value = "00000061";
order_slip.DataFields.FieldByName("DATE").Value = "31.03.2010";
order_slip.DataFields.FieldByName("TIME").Value = "21:15";
order_slip.DataFields.FieldByName("ORDER_STATUS").Value = 1;
order_slip.DataFields.FieldByName("CURRSEL_TOTAL").Value = 1;
UnityObjects.Lines trns = order_slip.DataFields.FieldByName("TRANSACTIONS").Lines;
trns.AppendLine();
trns.get_Item((trns.Count - 1)).FieldByName("TYPE").Value = 0;
trns.get_Item((trns.Count - 1)).FieldByName("MASTER_CODE").Value = "MALZEME.01";
trns.get_Item((trns.Count - 1)).FieldByName("QUANTITY").Value = 1;
trns.get_Item((trns.Count - 1)).FieldByName("PRICE").Value = 777;
trns.get_Item((trns.Count - 1)).FieldByName("VAT_RATE").Value = 8;
trns.get_Item((trns.Count - 1)).FieldByName("UNIT_CODE").Value = "ADET";
trns.get_Item((trns.Count - 1)).FieldByName("CURR_PRICE").Value = 160;
trns.get_Item((trns.Count - 1)).FieldByName("PC_PRICE").Value = 777;
trns.get_Item((trns.Count - 1)).FieldByName("EDT_CURR").Value = 1;
order_slip.ApplyCampaign();
trns.RefreshContent();
if (!order_slip.Post())
{
if (order_slip.ErrorCode != 0)
{
MessageBox.Show("DB Error : (" + order_slip.ErrorCode.ToString() + ") - " + order_slip.ErrorDesc);
}
}
else
{
if (order_slip.ValidateErrors.Count > 0)
{
for (int i = 0; i < order_slip.ValidateErrors.Count - 1; i++)
{
MessageBox.Show("XML Error : (" + order_slip.ValidateErrors[i].ID.ToString() + ") - " + order_slip.ValidateErrors[i].Error);
}
}
}
Copyright © 2018 Logo Yazılım