public BillGoodsVO LoadBillGoods(string billNO, int supplierId, PageVO page) { BillGoodsVO billGoods = null; if (StringUtil.isEmpty(billNO)) { return(billGoods); } BilliingVO billVO = service.LoadBill(billNO, supplierId, page); if (null != billVO) { billGoods = new BillGoodsVO(); billGoods.BillNO__PK = billVO.BillNO__PK; billGoods.Amount = billVO.Amount; billGoods.CrtTmst = billVO.CrtTmst; billGoods.CrtUsrId = billVO.CrtUsrId; billGoods.CustID = billVO.CustID; billGoods.CustName = billVO.CustName; billGoods.Direct = billVO.Direct; billGoods.FactAmount = billVO.FactAmount; List <OrderGoodsVO> orderGoodsList = orderService.LoadSupplierOrderGoods(supplierId, billVO._OrderNOList, page); billGoods._OrderGoods = orderGoodsList; } return(billGoods); }
private void InitPymntTable(string billNO, int custId) { if (grade == GRADE.SUPPLIER) { billGoods = supplierManager.LoadBillGoods(billNO, custId, null); } else if (grade == GRADE.RESELLER) { billGoods = resellerManager.LoadBillGoods(billNO, custId, null); } setAmntInfo(); if (null != billGoods) { Text = "【" + billGoods.CustName + "】 账单NO. " + billGoods.BillNO__PK; List <OrderGoodsVO> list = billGoods._OrderGoods; foreach (OrderGoodsVO goods in list) { int index = dtgvBillGoods.Rows.Add(); dtgvBillGoods.Rows[index].Cells[colOrderNO.Name].Value = goods.OrderNO; dtgvBillGoods.Rows[index].Cells[colDirectDesc.Name].Value = DIRECT.DIRECT_MAP[goods.Direct]; dtgvBillGoods.Rows[index].Cells[colGID.Name].Value = goods.GID; dtgvBillGoods.Rows[index].Cells[colGName.Name].Value = goods.GName; dtgvBillGoods.Rows[index].Cells[colSpesc.Name].Value = goods.Specs; dtgvBillGoods.Rows[index].Cells[colNum.Name].Value = goods.Num; dtgvBillGoods.Rows[index].Cells[colPrice.Name].Value = goods.Price; dtgvBillGoods.Rows[index].Cells[colCrtTmst.Name].Value = goods.Tmst; dtgvBillGoods.Rows[index].Cells[colAmount.Name].Value = goods.Num * goods.Price; } } }