public void setCostItemListWithCostItemArrayList(ArrayList costlist) { ArrayList newList = new ArrayList(); for (int i = 0; i < costlist.Count; i++) { CostItemRecord cR = (CostItemRecord)costlist[i]; IVCostItemRecord IVcR = new IVCostItemRecord(); IVcR.Invoice_no = this.invoice_no; IVcR.Cost_amount = cR.Amount; IVcR.Item_desc = cR.Description; IVcR.Item_id = cR.ItemId; IVcR.Item_no = cR.ItemNo; string iType = ""; if (cR.Waybill_type == "HAWB" || cR.Waybill_type == "MAWB") { iType = "A"; } else if (cR.Waybill_type == "HBOL" || cR.Waybill_type == "MBOL") { iType = "O"; } IVcR.IType = iType; IVcR.Hb_no = cR.Hb; IVcR.Mb_no = cR.Mb; IVcR.Vendor_no = cR.Vendor_no; IVcR.Ref_no = cR.Ref_no; IVcR.Import_export = cR.Import_export; newList.Add(IVcR); } costItemList = newList; }
public void setBillDetailWithCostItemArrayList(ArrayList costlist) { ArrayList newList = new ArrayList(); for (int i = 0; i < costlist.Count; i++) { try { CostItemRecord cR = (CostItemRecord)costlist[i]; if (!cR.ap_lock) { BillDetailRecord BDRec = new BillDetailRecord(); BDRec.invoice_no = this.invoice_no; BDRec.item_amt = cR.Amount; BDRec.item_id = cR.ItemId; BDRec.item_no = cR.ItemNo; string iType = ""; if (cR.Waybill_type == "HAWB" || cR.Waybill_type == "MAWB") { iType = "A"; } else if (cR.Waybill_type == "HBOL" || cR.Waybill_type == "MBOL") { iType = "O"; } else { } BDRec.import_export = cR.Import_export; BDRec.iType = iType; BDRec.mb_no = cR.Mb; BDRec.hb_no = cR.Hb; BDRec.ref_no = cR.Ref_no; BDRec.tran_date = this.invoice_date; BDRec.vendor_name = cR.Vendor_name; BDRec.vendor_number = cR.Vendor_no; newList.Add(BDRec); } } catch (Exception ex) { throw ex; } } billDetailList = newList; }
public BillDetailRecord(CostItemRecord crec, int invoice_no, int bill_number, int itme_ap) { }