private void RenderItemListContent(ComponentController paComponentController) { POSTransactionListRow lcTransactionListRow; lcTransactionListRow = new POSTransactionListRow(null); if (clReceiptDetail != null) { for (int lcCount = 0; lcCount < clReceiptDetail.Rows.Count; lcCount++) { lcTransactionListRow.Row = clReceiptDetail.Rows[lcCount]; RenderTransactionListRow(paComponentController, lcTransactionListRow); } } }
private void RenderTransactionListRow(ComponentController paComponentController, POSTransactionListRow paTransactionListRow) { if (paTransactionListRow != null) { //if (paTransactionListRow.ItemStatus.ToUpper().Trim() == ctSTACancel) //{ // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemText, paTransactionListRow.ItemName); // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_UnitName, paTransactionListRow.UnitName); // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_UnitRelationship, paTransactionListRow.UnitRelationship.ToString()); //} paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemStatus, paTransactionListRow.ItemStatus.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemID, paTransactionListRow.ItemID.ToString()); paComponentController.AddElementType(ComponentController.ElementType.Item); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.Serial.ToString().ToLower()); paComponentController.AddAttribute(HtmlAttribute.Value, paTransactionListRow.Serial.ToString()); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.Description.ToString().ToLower()); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_UnitMode, paTransactionListRow.UnitMode.ToLower()); paComponentController.AddAttribute(HtmlAttribute.Value, paTransactionListRow.Quantity.ToString()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.Quantity.ToString().ToLower()); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.UnitPrice.ToString().ToLower()); paComponentController.AddAttribute(HtmlAttribute.Value, paTransactionListRow.UnitPrice.ToString(clSettingManager.BareCurrencyFormatString)); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.Discount.ToString().ToLower()); paComponentController.AddAttribute(HtmlAttribute.Value, paTransactionListRow.Discount.ToString()); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.SubTotal.ToString().ToLower()); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); } }