Aşağıdaki şekilde Takım Boz fişini oluşturabilirsiniz. CREATE_STFICHES xml alanı Malzeme Fişlerini oluşturmak için kullanılmaktadır.
UnityObjects.Data oproduc = Global.UnityApp.NewDataObject(UnityObjects.DataObjectType.doQProduction);
oproduc.New();
oproduc.DataFields.FieldByName("FICHENO").Value = "TKB02";
oproduc.DataFields.FieldByName("DATE").Value = "04.05.2016";
oproduc.DataFields.FieldByName("FTIME").Value = 152831807;
oproduc.DataFields.FieldByName("ITEM_CODE").Value = "MM01";
oproduc.DataFields.FieldByName("UEDIT").Value = "ADET";
oproduc.DataFields.FieldByName("UUNIT").Value = "05";
oproduc.DataFields.FieldByName("AMOUNT").Value = 1;
oproduc.DataFields.FieldByName("DEPARTMENT").Value = 0;
oproduc.DataFields.FieldByName("SOURCEINDEX").Value = 0;
oproduc.DataFields.FieldByName("CAPIBLOCK_CREATEDBY").Value = 1;
oproduc.DataFields.FieldByName("XML_ATTRIBUTE").Value = 1;
oproduc.DataFields.FieldByName("PRODTYPE").Value = 2;
oproduc.DataFields.FieldByName("CREATE_STFICHES").Value = 1;
UnityObjects.Lines transactions_lines = oproduc.DataFields.FieldByName("TRANSACTIONS").Lines;
transactions_lines.AppendLine();
transactions_lines[transactions_lines.Count - 1].FieldByName("AMNT").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("LINENO").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("SOURCEINDEX").Value = 0;
transactions_lines[transactions_lines.Count - 1].FieldByName("UOMREF").Value = 23;
transactions_lines[transactions_lines.Count - 1].FieldByName("CARDTYPE").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("SCODE").Value = "MLZ01";
transactions_lines[transactions_lines.Count - 1].FieldByName("UEDIT").Value = "ADET";
transactions_lines[transactions_lines.Count - 1].FieldByName("UUNIT").Value = "000,Merkez";
transactions_lines.AppendLine();
transactions_lines[transactions_lines.Count - 1].FieldByName("AMNT").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("LINENO").Value = 2;
transactions_lines[transactions_lines.Count - 1].FieldByName("SOURCEINDEX").Value = 0;
transactions_lines[transactions_lines.Count - 1].FieldByName("UOMREF").Value = 23;
transactions_lines[transactions_lines.Count - 1].FieldByName("CARDTYPE").Value = 1;
transactions_lines[transactions_lines.Count - 1].FieldByName("SCODE").Value = "MLZ02";
transactions_lines[transactions_lines.Count - 1].FieldByName("UEDIT").Value = "ADET";
transactions_lines[transactions_lines.Count - 1].FieldByName("UUNIT").Value = "000,Merkez";
oproduc.DataFields.FieldByName("XBUFS").Value = 0;
if (oproduc.Post() == true) {
MessageBox.Show("POST OK !");
} else {
if (oproduc.ErrorCode != 0) {
MessageBox.Show("DBError(" + oproduc.ErrorCode.ToString() + ")-" + oproduc.ErrorDesc + oproduc.DBErrorDesc);
} else if (oproduc.ValidateErrors.Count > 0) {
string result = "XML ErrorList:";
for (int i = 0; i < oproduc.ValidateErrors.Count; i++) {
result += "(" + oproduc.ValidateErrors[i].ID.ToString() + ") - " + oproduc.ValidateErrors[i].Error;
}
MessageBox.Show(result);
}
}
Cevap vermek için giriş yapmanız gerekmektedir.
Soru sormak için lütfen oturum açınız.
Takım Boz Fişinin Oluşturulması
04/05/16 09:52   Tiger/Logo Object Designer (LOD)Hızlı Üretim fişlerinde bulunan takım boz fişini nasıl oluşturabiliriz.
LObjects Hızlı Üretim Takım Boz XML