Пример #1
0
        private void RenderReceiptEntry(ComponentController paComponentController, POSReceiptListRow paReceiptListRow)
        {
            paComponentController.AddElementType(ComponentController.ElementType.Element);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDSelectReceipt);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paReceiptListRow.ReceiptID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paReceiptListRow.ReceiptType.ToLower());
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSElement);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLReceiptNo);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(clLanguageManager.ConvertNumber(ctReceiptNoPrefix + paReceiptListRow.ReceiptNo.ToString().PadLeft(6, '0')));
            paComponentController.RenderEndTag();

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLReceiptDate);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(clLanguageManager.ConvertNumber(paReceiptListRow.ReceiptDate.ToString(clSettingManager.DateFormatString)));
            paComponentController.RenderEndTag();

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLName);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(paReceiptListRow.Name);
            paComponentController.RenderEndTag();

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLReceiptAmount);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_CurrencyCode, clSettingManager.CurrencyCode);
            paComponentController.AddAttribute(HtmlAttribute.Value, paReceiptListRow.ReceiptAmount.ToString(clSettingManager.BareCurrencyFormatString));
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(clLanguageManager.ConvertNumber(paReceiptListRow.ReceiptAmount.ToString(clSettingManager.CurrencyFormatString)));
            paComponentController.RenderEndTag();

            RenderButtonPanel(paComponentController);

            paComponentController.RenderEndTag();
        }
Пример #2
0
        protected void RenderReceiptListEntries(ComponentController paComponentController)
        {
            POSReceiptListRow lcReceiptListRow;

            if (clReceiptList != null)
            {
                lcReceiptListRow = new POSReceiptListRow(null);

                for (int lcCount = 0; lcCount < clReceiptList.Rows.Count; lcCount++)
                {
                    lcReceiptListRow.Row = clReceiptList.Rows[lcCount];

                    RenderReceiptEntry(paComponentController, lcReceiptListRow);
                }
            }
        }