Beispiel #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();
        }
Beispiel #2
0
        private void RenderSummaryBar(ComponentController paComponentController)
        {
            //bool    lcTaxApplicable;

            //lcTaxApplicable = General.ParseBoolean(clSettingManager.GetSettingValue(ctSETTaxApplicable), false);

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSSummaryBar);
            paComponentController.AddElementType(ComponentController.ElementType.Summary);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            RenderSummaryElement(paComponentController, ctCLSQuantity, ComponentController.UnicodeStr((int)Fontawesome.cubes));
            RenderSummaryElement(paComponentController, ctCLSSubtotal, clLanguageManager.GetText(ctDYTSubtotalText));
            RenderSummaryElement(paComponentController, ctCLSDiscount, clLanguageManager.GetText(ctDYTDiscountText));

            if ((clReceiptManager.GetReceiptType() == POSReceiptManager.ReceiptType.Sale) && (clReceiptManager.ActiveRow.TaxPercent > 0))
            {
                if (clReceiptManager.ActiveRow.TaxInclusive)
                {
                    RenderSummaryElement(paComponentController, ctCLSTotal, clLanguageManager.ConvertNumber(clLanguageManager.GetText(ctDYTTotalTaxIncludeText).Replace("$TAXPERCENT", clReceiptManager.ActiveRow.TaxPercent.ToString("0.##"))));
                }
                else
                {
                    RenderSummaryElement(paComponentController, ctCLSSubtotal2, clLanguageManager.GetText(ctDYTSubTotal2Text));
                    RenderSummaryElement(paComponentController, ctCLSTaxAmount, clLanguageManager.ConvertNumber(clLanguageManager.GetText(ctDYTTaxAmountText).Replace("$TAXPERCENT", clReceiptManager.ActiveRow.TaxPercent.ToString("0.##"))));
                    RenderSummaryElement(paComponentController, ctCLSTotal, clLanguageManager.GetText(ctDYTTotalText));
                }
            }
            else
            {
                RenderSummaryElement(paComponentController, ctCLSTotal, clLanguageManager.GetText(ctDYTTotalText));
            }

            paComponentController.RenderEndTag();
        }
Beispiel #3
0
        private void RenderReceiptBlockHeader(ComponentController paComponentController, POSReceiptDetailRow paReceiptDetailRow)
        {
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSBlockHeader);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSReceiptNoDiv);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write("#" + clLanguageManager.ConvertNumber(paReceiptDetailRow.ReceiptNo.ToString().PadLeft(6, '0')));
            paComponentController.RenderEndTag();

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSNameDiv);
            paComponentController.Write(paReceiptDetailRow.Name);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();
        }
Beispiel #4
0
        protected void RenderSummaryInfo(ComponentController paComponentController, String paInfoLabel, SummaryValue paSummaryValue, String paType, bool paDecimal)
        {
            dynamic lcValue;

            if (paDecimal)
            {
                lcValue = GetDecimalSummary(paSummaryValue);
            }
            else
            {
                lcValue = GetIntegerSummary(paSummaryValue);
            }

            if (lcValue < 0)
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Appearance, "negative");
            }

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paType);
            paComponentController.AddElementType(ComponentController.ElementType.Row);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementType(ComponentController.ElementType.Label);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(clLanguageManager.GetText(paInfoLabel));
            paComponentController.RenderEndTag();

            paComponentController.AddElementType(ComponentController.ElementType.Figure);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            if (paDecimal)
            {
                paComponentController.Write(clLanguageManager.ConvertNumber(lcValue.ToString(clSettingManager.CurrencyFormatString)));
            }
            else
            {
                paComponentController.Write(clLanguageManager.ConvertNumber(lcValue.ToString()));
            }

            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();
        }
Beispiel #5
0
        private void RenderServiceDurationPanel(ComponentController paComponentController)
        {
            String lcActivationDate;
            String lcExpiryDate;

            paComponentController.AddElementType(ComponentController.ElementType.Block);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSInfoGroup);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            RenderInfoHeader(paComponentController, ctDYTServiceDurationTitle);

            lcActivationDate = ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.ActivationDate.ToString(clSettingManager.DateFormatString);
            lcExpiryDate     = ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.ExpiryDate.ToString(clSettingManager.DateFormatString);

            RenderInfoRow(paComponentController, ctDYTActivationDate, clLanguageManager.ConvertNumber(lcActivationDate));
            RenderInfoRow(paComponentController, ctDYTExpiryDate, clLanguageManager.ConvertNumber(lcExpiryDate));

            paComponentController.RenderEndTag();
        }
Beispiel #6
0
        private void RenderEntryRow(ComponentController paComponentController, DateTime paDate, int paIncomingID, Decimal paCost)
        {
            bool lcInitialCost;

            lcInitialCost = paDate.Date == clInitialCostDate.Date;

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSEntryRow);
            paComponentController.AddAttribute(HtmlAttribute.Value, paCost.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDRowClick);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paIncomingID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Group, paDate.ToString("yyyy-MM-dd"));
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, lcInitialCost ? "initialcost" : "cost");

            paComponentController.AddElementType(ComponentController.ElementType.Row);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, "date");
            paComponentController.RenderBeginTag(HtmlTag.Span);

            if (lcInitialCost)
            {
                paComponentController.Write(clLanguageManager.GetText(ctDYTInitialCost));
            }
            else
            {
                paComponentController.Write(clLanguageManager.ConvertNumber(paDate.ToString(clSettingManager.DateFormatString)));
            }

            paComponentController.RenderEndTag();

            paComponentController.AddAttribute(HtmlAttribute.Value, paCost.ToString(clSettingManager.BareCurrencyFormatString));
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, "unitprice");
            paComponentController.RenderBeginTag(HtmlTag.Span);
            paComponentController.Write(clLanguageManager.ConvertNumber(paCost.ToString(clSettingManager.CurrencyFormatString)));
            paComponentController.RenderEndTag();

            RenderButtonPanel(paComponentController, lcInitialCost);

            paComponentController.RenderEndTag();
        }
Beispiel #7
0
 private String GetMonthText(DateTime paDate, bool paYearFirst)
 {
     if (clMonthListArray.Length >= paDate.Month)
     {
         if (paYearFirst)
         {
             return(clLanguageManager.ConvertNumber(paDate.Year.ToString()) + ctSeparator + " " + clMonthListArray[paDate.Month - 1]);
         }
         else
         {
             return(clMonthListArray[paDate.Month - 1] + ctSeparator + " " + clLanguageManager.ConvertNumber(paDate.Year.ToString()));
         }
     }
     else
     {
         return(String.Empty);
     }
 }
Beispiel #8
0
        private void RenderItemRow(ComponentController paComponentController, POSStockBalanceRow paItemRow)
        {
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemRow);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Status, (paItemRow.Quantity > 0 ? "ex-stock" : "nostock"));
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paItemRow.EntryType.ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paItemRow.ItemID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDShowCategory);
            paComponentController.AddElementType(ComponentController.ElementType.Row);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemName);
            paComponentController.RenderBeginTag(HtmlTag.Span);
            paComponentController.Write(paItemRow.ItemName);
            paComponentController.RenderEndTag();

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSQuantity);
            paComponentController.RenderBeginTag(HtmlTag.Span);

            if (paItemRow.Quantity <= 0)
            {
                paComponentController.Write(clLanguageManager.GetText(ctDYTOutOfStock));
            }
            else
            {
                paComponentController.Write(clLanguageManager.ConvertNumber(paItemRow.QuantityText));
            }

            paComponentController.RenderEndTag();

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTotalValue);
            paComponentController.AddAttribute(HtmlAttribute.Value, paItemRow.TotalCost.ToString());
            paComponentController.AddElementType(ComponentController.ElementType.Figure);
            paComponentController.RenderBeginTag(HtmlTag.Span);
            paComponentController.Write(clLanguageManager.ConvertNumber(paItemRow.TotalCost.ToString(clSettingManager.CurrencyFormatString)));
            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();
        }
Beispiel #9
0
        private void RenderItemRow(ComponentController paComponentController, POSItemCatalogueRow paItemRow)
        {
            Decimal lcCost;

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemRow);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paItemRow.EntryAttribute.ToLower().Trim() + paItemRow.EntryType.ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paItemRow.ItemID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, paItemRow.EntryType == ctENTCategory ? ctCMDShowCategory : ctCMDSetFocus);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_UnitRelationship, paItemRow.UnitRelationship.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MajorUnitName, paItemRow.MajorUnitName);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MinorUnitName, paItemRow.MinorUnitName);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemText, paItemRow.ItemName);
            paComponentController.AddElementType(ComponentController.ElementType.Row);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, "itemname");
            paComponentController.RenderBeginTag(HtmlTag.Span);
            paComponentController.Write(paItemRow.ItemName);
            paComponentController.RenderEndTag();

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, "cost");
            paComponentController.RenderBeginTag(HtmlTag.Span);

            if ((lcCost = Convert.ToDecimal(paItemRow.Row[ctCOLCost])) > 0)
            {
                paComponentController.Write(clLanguageManager.ConvertNumber(lcCost.ToString(clSettingManager.CurrencyFormatString)));
            }
            else
            {
                paComponentController.Write(ctDash);
            }

            paComponentController.RenderEndTag();

            if ((clAllowStaffInventoryFeature) || (clAdminUser))
            {
                RenderButtonPanel(paComponentController);
            }

            paComponentController.RenderEndTag();
        }
Beispiel #10
0
        private void RenderContentList(ComponentController paComponentController, DataRow[] paDataRowList, EntryType paEntryType)
        {
            POSItemCatalogueRow lcPOSItemCatalogueRow;

            lcPOSItemCatalogueRow = new POSItemCatalogueRow(null);

            for (int lcCount = 0; lcCount < paDataRowList.Length; lcCount++)
            {
                lcPOSItemCatalogueRow.Row = paDataRowList[lcCount];

                if ((paEntryType == EntryType.Category) || (!clStockOnlyMode) || (lcPOSItemCatalogueRow.EntryAttribute != "STATIC"))
                {
                    paComponentController.AddElementType(ComponentController.ElementType.Element);
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_EntryType, lcPOSItemCatalogueRow.EntryType.ToLower());
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_EntryAttribute, lcPOSItemCatalogueRow.EntryAttribute.ToLower());
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemID, lcPOSItemCatalogueRow.ItemID.ToString());
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_Category, lcPOSItemCatalogueRow.Category.ToString());
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_Attribute, lcPOSItemCatalogueRow.Favourite ? "favourite" : "");
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemText, lcPOSItemCatalogueRow.ItemName);

                    if (paEntryType != EntryType.Category)
                    {
                        paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemCode, lcPOSItemCatalogueRow.ItemCode.ToUpper());
                        paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MajorUnitName, lcPOSItemCatalogueRow.MajorUnitName);
                        paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MinorUnitName, lcPOSItemCatalogueRow.MinorUnitName);
                        paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_UnitRelationship, lcPOSItemCatalogueRow.UnitRelationship.ToString());
                        paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ItemStatus, lcPOSItemCatalogueRow.Status.ToLower());

                        if (clPriceMode == PriceMode.PriceShow)
                        {
                            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MajorPrice, lcPOSItemCatalogueRow.MajorPrice.ToString(clSettingManager.BareCurrencyFormatString));
                            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MinorPrice, lcPOSItemCatalogueRow.MinorPrice.ToString(clSettingManager.BareCurrencyFormatString));
                            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MajorMSP, lcPOSItemCatalogueRow.MajorMSP.ToString(clSettingManager.BareCurrencyFormatString));
                            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MinorMSP, lcPOSItemCatalogueRow.MinorMSP.ToString(clSettingManager.BareCurrencyFormatString));
                        }
                    }
                    paComponentController.RenderBeginTag(HtmlTag.A);

                    paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemName);
                    paComponentController.RenderBeginTag(HtmlTag.Span);
                    paComponentController.Write(lcPOSItemCatalogueRow.ItemName);
                    paComponentController.RenderEndTag();

                    if (paEntryType != EntryType.Category)
                    {
                        paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemInfo);
                        paComponentController.RenderBeginTag(HtmlTag.Span);

                        if ((clItemCodeMode) && (!String.IsNullOrWhiteSpace(lcPOSItemCatalogueRow.ItemCode)))
                        {
                            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemCode);
                            paComponentController.RenderBeginTag(HtmlTag.Span);
                            paComponentController.Write(clLanguageManager.ConvertNumber(lcPOSItemCatalogueRow.ItemCode));
                            paComponentController.RenderEndTag();
                        }

                        if (clPriceMode == PriceMode.PriceShow)
                        {
                            if (lcPOSItemCatalogueRow.MajorPrice > 0)
                            {
                                paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSMajorPrice);
                                paComponentController.RenderBeginTag(HtmlTag.Span);
                                paComponentController.Write(clLanguageManager.ConvertNumber(lcPOSItemCatalogueRow.MajorPrice.ToString(clSettingManager.CurrencyFormatString)));
                                paComponentController.RenderEndTag();
                            }


                            if (lcPOSItemCatalogueRow.MinorPrice > 0)
                            {
                                paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSMinorPrice);
                                paComponentController.RenderBeginTag(HtmlTag.Span);
                                paComponentController.Write(clLanguageManager.ConvertNumber(lcPOSItemCatalogueRow.MinorPrice.ToString(clSettingManager.CurrencyFormatString)));
                                paComponentController.RenderEndTag();
                            }
                        }

                        paComponentController.RenderEndTag();
                    }

                    paComponentController.RenderEndTag();
                }
            }
        }
Beispiel #11
0
        private void RenderInputBoxTextBox(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue, bool paMultiline)
        {
            String lcInputType;

            if (paInputInfoRow.MaxLimit > 0)
            {
                paComponentController.AddAttribute(HtmlAttribute.Maxlength, paInputInfoRow.MaxLimit.ToString());
            }
            if (!paInputInfoRow.InputName.StartsWith(ctVirtualColumnPrefix))
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower());
            }
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_InputMode, paInputInfoRow.InputMode.Trim());

            if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DelimitedList))
            {
                paActiveValue = paActiveValue.Replace(ctMultilineDelimiter, ctCR);
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, "delimited");
            }

            if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Mandatory))
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mandatory, "true");
            }

            if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Identifier))
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_IdentifierColumn, "true");
            }

            if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.KeyField))
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_KeyField, "true");
            }

            if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DataMirror))
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_MirrorColumn, paInputInfoRow.LinkColumn);
            }

            if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Persist))
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Persist, "true");
            }

            if ((clForceReadOnlyMode) || (IsAttributeSet(paInputInfoRow, InputInfoAttribute.ReadOnly)))
            {
                paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "true");
            }

            if (!String.IsNullOrEmpty(paInputInfoRow.QueryName))
            {
                if (paInputInfoRow.QueryName.Contains("."))
                {
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_QueryName, paInputInfoRow.QueryName);
                }
                else
                {
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_QueryName, paInputInfoRow.InputGroup + "." + paInputInfoRow.QueryName);
                }
            }

            paComponentController.AddAttribute(HtmlAttribute.Style, paInputInfoRow.InputCss);
            paComponentController.AddAttribute(HtmlAttribute.Name, paInputInfoRow.InputName);
            paComponentController.AddElementType(ComponentController.ElementType.InputBox);

            if (!IsAttributeSet(paInputInfoRow, InputInfoAttribute.Password))
            {
                if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DynamicNumber))
                {
                    paActiveValue = clLanguageManager.ConvertNumber(paActiveValue);
                }
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue);
                paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue);
                lcInputType = "text";
            }
            else
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, General.Base64Encode(paActiveValue));
                lcInputType = "password";
            }

            if (paMultiline)
            {
                paComponentController.RenderBeginTag(HtmlTag.Textarea);
                paComponentController.Write(paActiveValue);
            }
            else
            {
                //if (IsAttributeSet(lcInputInfoRow, InputInfoAttribute.Password)) paComponentController.AddAttribute(HtmlAttribute.Type, "password");
                //else paComponentController.AddAttribute(HtmlAttribute.Type, "text");
                paComponentController.AddAttribute(HtmlAttribute.Type, lcInputType);
                paComponentController.RenderBeginTag(HtmlTag.Input);
            }
            paComponentController.RenderEndTag();
        }
Beispiel #12
0
        private void RenderTable(ComponentController paComponentController, POSTableListRow paTableListRow)
        {
            POSReceiptRow lcPOSReceiptRow;
            Decimal       lcTotalPrice;

            if ((lcPOSReceiptRow = GetPendingReceiptRow(paTableListRow.TableID)) != null)
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ReceiptID, lcPOSReceiptRow.ReceiptID.ToString());
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Lastmodified, lcPOSReceiptRow.LastModified.ToString("yyyy-MM-dd HH:mm:ss.fff"));
                lcTotalPrice = lcPOSReceiptRow.PaymentCash;
            }
            else
            {
                lcTotalPrice = 0;
            }

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTableElement);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paTableListRow.TableID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paTableListRow.EntryType.ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_Reference, ctTableReferencePrefix + paTableListRow.TableID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_DisplayName, paTableListRow.DisplayName);
            paComponentController.AddElementType(ComponentController.ElementType.Element);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDToggleActive);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSInnerArea);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTableElementTitle);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.RenderBeginTag(HtmlTag.Span);
            paComponentController.Write(paTableListRow.DisplayName);
            paComponentController.RenderEndTag();

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDAddOrder);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(ComponentController.UnicodeStr((int)Fontawesome.plus));
            paComponentController.RenderEndTag();

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDMove);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.Write(ComponentController.UnicodeStr((int)Fontawesome.move));
            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTableElementContent);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementType(ComponentController.ElementType.Total);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            if (lcTotalPrice > 0)
            {
                paComponentController.Write(clLanguageManager.ConvertNumber(lcTotalPrice.ToString(clSettingManger.CurrencyFormatString)));
            }

            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();

            RenderButtonPanel(paComponentController);

            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();
        }