merhaba,
aşağıdaki kod bloğunu kullanarak kayıt oluşturabilirsiniz.
not : önce biraz temizlik yapmanız gerekecektir.
UnityObjects.Data arpvoucher=UnityApp.NewDataObject(UnityObjects.DataObjectType.doARAPVoucher);
arpvoucher.New();
arpvoucher.DataFields.FieldByName("NUMBER").Value = "~"; //fiş numarasını otomatik verir
arpvoucher.DataFields.FieldByName("DATE").Value =15.02.2017;
arpvoucher.DataFields.FieldByName("TYPE").Value =1;
arpvoucher.DataFields.FieldByName("AUXIL_CODE").Value =�ZEL KOD;
arpvoucher.DataFields.FieldByName("AUTH_CODE").Value =YETK� KODU;
arpvoucher.DataFields.FieldByName("NOTES1").Value =GENEL A�IKLAMA;
arpvoucher.DataFields.FieldByName("TOTAL_CREDIT").Value =1000;
arpvoucher.DataFields.FieldByName("CREATED_BY").Value =1;
arpvoucher.DataFields.FieldByName("DATE_CREATED").Value =15.02.2017;
arpvoucher.DataFields.FieldByName("HOUR_CREATED").Value =21;
arpvoucher.DataFields.FieldByName("MIN_CREATED").Value =27;
arpvoucher.DataFields.FieldByName("SEC_CREATED").Value =11;
arpvoucher.DataFields.FieldByName("MODIFIED_BY").Value =1;
arpvoucher.DataFields.FieldByName("DATE_MODIFIED").Value =15.02.2017;
arpvoucher.DataFields.FieldByName("HOUR_MODIFIED").Value =21;
arpvoucher.DataFields.FieldByName("MIN_MODIFIED").Value =30;
arpvoucher.DataFields.FieldByName("SEC_MODIFIED").Value =2;
arpvoucher.DataFields.FieldByName("CURRSEL_TOTALS").Value =1;
arpvoucher.DataFields.FieldByName("DATA_REFERENCE").Value =1;
UnityObjects.Lines transactions_lines = arpvoucher.DataFields.FieldByName("TRANSACTIONS").Lines;
transactions_lines.AppendLine();
transactions_lines[transactions_lines.Count - 1].FieldByName("ARP_CODE").Value =CAR�01;
transactions_lines[transactions_lines.Count - 1].FieldByName("AUXIL_CODE").Value =�ZEL KOD 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("TRANNO").Value =000001;
transactions_lines[transactions_lines.Count - 1].FieldByName("DOC_NUMBER").Value =MAKBUZ NO;
transactions_lines[transactions_lines.Count - 1].FieldByName("DESCRIPTION").Value =SATIR A�IKLAMA;
transactions_lines[transactions_lines.Count - 1].FieldByName("CREDIT").Value =1000;
transactions_lines[transactions_lines.Count - 1].FieldByName("TC_AMOUNT").Value =1000;
transactions_lines[transactions_lines.Count - 1].FieldByName("MODIFIED_BY").Value =1;
transactions_lines[transactions_lines.Count - 1].FieldByName("DATE_MODIFIED").Value =15.02.2017;
transactions_lines[transactions_lines.Count - 1].FieldByName("HOUR_MODIFIED").Value =21;
transactions_lines[transactions_lines.Count - 1].FieldByName("MIN_MODIFIED").Value =30;
transactions_lines[transactions_lines.Count - 1].FieldByName("SEC_MODIFIED").Value =2;
transactions_lines[transactions_lines.Count - 1].FieldByName("TRADING_GRP").Value =T�CAR� ��LEM GR.;
UnityObjects.Lines payment_list0 = transactions_lines[transactions_lines.Count-1].FieldByName("PAYMENT_LIST").Lines;
payment_list0.AppendLine();
payment_list0[payment_list0.Count - 1].FieldByName("DATE").Value =15.02.2017;
payment_list0[payment_list0.Count - 1].FieldByName("MODULENR").Value =5;
payment_list0[payment_list0.Count - 1].FieldByName("SIGN").Value =1;
payment_list0[payment_list0.Count - 1].FieldByName("TRCODE").Value =1;
payment_list0[payment_list0.Count - 1].FieldByName("TOTAL").Value =1000;
payment_list0[payment_list0.Count - 1].FieldByName("PROCDATE").Value =15.02.2017;
payment_list0[payment_list0.Count - 1].FieldByName("DATA_REFERENCE").Value =0;
payment_list0[payment_list0.Count - 1].FieldByName("DISCOUNT_DUEDATE").Value =15.02.2017;
payment_list0[payment_list0.Count - 1].FieldByName("PAY_NO").Value =1;
payment_list0[payment_list0.Count - 1].FieldByName("DISCTRDELLIST").Value =0;
transactions_lines[transactions_lines.Count - 1].FieldByName("DATA_REFERENCE").Value =8;
transactions_lines[transactions_lines.Count - 1].FieldByName("PROJECT_CODE").Value =PROJE KODU 01;
transactions_lines[transactions_lines.Count - 1].FieldByName("MONTH").Value =2;
transactions_lines[transactions_lines.Count - 1].FieldByName("YEAR").Value =2017;
transactions_lines[transactions_lines.Count - 1].FieldByName("AFFECT_RISK").Value =1;
transactions_lines[transactions_lines.Count - 1].FieldByName("SALESMAN_CODE").Value = SATICI 01;
transactions_lines[transactions_lines.Count - 1].FieldByName("DISTRIBUTION_TYPE_FNO").Value =0;
arpvoucher.DataFields.FieldByName("TIME").Value =353964357;
arpvoucher.DataFields.FieldByName("PROJECT_CODE").Value =PROJE KODU 01;
arpvoucher.DataFields.FieldByName("AFFECT_RISK").Value =0;
arpvoucher.DataFields.FieldByName("SALESMAN_CODE").Value = SATICI 01;
arpvoucher.DataFields.FieldByName("GUID").Value =5851364B-6CD5-4AE6-8AF3-860B01E254D2;
if (arpvoucher.Post() == true)
{
MessageBox.Show("POST OK !");
}
else
{
if(arpvoucher.ErrorCode !=0)
{
MessageBox.Show("DBError(" + arpvoucher.ErrorCode.ToString() + ")-" + arpvoucher.ErrorDesc + arpvoucher.DBErrorDesc);
}
else if (arpvoucher.ValidateErrors.Count > 0)
{
string result="XML ErrorList:";
for (int i = 0; i < arpvoucher.ValidateErrors.Count; i++)
{
result +="("+ arpvoucher.ValidateErrors[i].ID.ToString()+ ") - " + arpvoucher.ValidateErrors[i].Error ;
}
MessageBox.Show(result);
}
}
bu da kasa nakit tahsilat
UnityObjects.Data sd_trans=UnityApp.NewDataObject(UnityObjects.DataObjectType.doSafeDepositTrans);
sd_trans.New();
sd_trans.DataFields.FieldByName("TYPE").Value =11;
sd_trans.DataFields.FieldByName("SD_CODE").Value =101;
sd_trans.DataFields.FieldByName("CROSS_DATA_REFERENCE").Value =59;
sd_trans.DataFields.FieldByName("DATE").Value =23.02.2017;
sd_trans.DataFields.FieldByName("HOUR").Value =22;
sd_trans.DataFields.FieldByName("MINUTE").Value =37;
sd_trans.DataFields.FieldByName("AUXIL_CODE").Value =�ZELKOD;
sd_trans.DataFields.FieldByName("AUTH_CODE").Value =YETK�KODU;
sd_trans.DataFields.FieldByName("NUMBER").Value =000002;
sd_trans.DataFields.FieldByName("MASTER_TITLE").Value =CAR�02;
sd_trans.DataFields.FieldByName("DESCRIPTION").Value =KASA A�IKLAMASI;
sd_trans.DataFields.FieldByName("AMOUNT").Value =2500;
sd_trans.DataFields.FieldByName("TC_AMOUNT").Value =2500;
sd_trans.DataFields.FieldByName("CREATED_BY").Value =1;
sd_trans.DataFields.FieldByName("DATE_CREATED").Value =23.02.2017;
sd_trans.DataFields.FieldByName("HOUR_CREATED").Value =22;
sd_trans.DataFields.FieldByName("MIN_CREATED").Value =38;
sd_trans.DataFields.FieldByName("SEC_CREATED").Value =20;
sd_trans.DataFields.FieldByName("DATA_REFERENCE").Value =2;
UnityObjects.Lines attachment_arp_lines = sd_trans.DataFields.FieldByName("ATTACHMENT_ARP").Lines;
attachment_arp_lines.AppendLine();
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("ARP_CODE").Value =CAR�02;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("AUXIL_CODE").Value =�ZELKOD;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("TRANNO").Value =000045;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("DOC_NUMBER").Value =MAKBUZNO;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("DESCRIPTION").Value =KASA A�IKLAMASI;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("CREDIT").Value =2500;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("TC_AMOUNT").Value =2500;
UnityObjects.Lines payment_list0 = attachment_arp_lines[attachment_arp_lines.Count-1].FieldByName("PAYMENT_LIST").Lines;
payment_list0.AppendLine();
payment_list0[payment_list0.Count - 1].FieldByName("DATE").Value =23.02.2017;
payment_list0[payment_list0.Count - 1].FieldByName("MODULENR").Value =10;
payment_list0[payment_list0.Count - 1].FieldByName("SIGN").Value =1;
payment_list0[payment_list0.Count - 1].FieldByName("TRCODE").Value =1;
payment_list0[payment_list0.Count - 1].FieldByName("TOTAL").Value =2500;
payment_list0[payment_list0.Count - 1].FieldByName("PROCDATE").Value =23.02.2017;
payment_list0[payment_list0.Count - 1].FieldByName("DATA_REFERENCE").Value =0;
payment_list0[payment_list0.Count - 1].FieldByName("DISCOUNT_DUEDATE").Value =23.02.2017;
payment_list0[payment_list0.Count - 1].FieldByName("PAY_NO").Value =1;
payment_list0[payment_list0.Count - 1].FieldByName("DISCTRDELLIST").Value =0;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("PROJECT_CODE").Value =PROJE KODU 01;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("MONTH").Value =2;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("YEAR").Value =2017;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("AFFECT_RISK").Value =0;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("DOC_DATE").Value =23.02.2017;
attachment_arp_lines[attachment_arp_lines.Count - 1].FieldByName("DISTRIBUTION_TYPE_FNO").Value =0;
sd_trans.DataFields.FieldByName("PROJECT_CODE").Value =PROJE KODU 01;
sd_trans.DataFields.FieldByName("DOC_DATE").Value =23.02.2017;
sd_trans.DataFields.FieldByName("GUID").Value =5A20DBEF-7691-433B-A389-39BA0602D64D;
if (sd_trans.Post() == true)
{
MessageBox.Show("POST OK !");
}
else
{
if(sd_trans.ErrorCode !=0)
{
MessageBox.Show("DBError(" + sd_trans.ErrorCode.ToString() + ")-" + sd_trans.ErrorDesc + sd_trans.DBErrorDesc);
}
else if (sd_trans.ValidateErrors.Count > 0)
{
string result="XML ErrorList:";
for (int i = 0; i < sd_trans.ValidateErrors.Count; i++)
{
result +="("+ sd_trans.ValidateErrors[i].ID.ToString()+ ") - " + sd_trans.ValidateErrors[i].Error ;
}
MessageBox.Show(result);
}
}
Cevap vermek için giriş yapmanız gerekmektedir.
Soru sormak için lütfen oturum açınız.
Nakit Tahsilat Fişi
31/10/18 14:02   Tiger/Logo Objects 2.50Merhaba,