private void RenderTableGroupBlock(ComponentController paComponentController, POSTableListRow paTableGroupRow) { DataRow[] lcTableList; int lcTableID; lcTableID = paTableGroupRow == null ? 0 : paTableGroupRow.TableID; lcTableList = GetTableList(lcTableID); if (lcTableList.Length > 0) { paComponentController.AddElementType(ComponentController.ElementType.Block); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTableGroupBlock); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Group, lcTableID.ToString()); paComponentController.RenderBeginTag(HtmlTag.Div); RenderTableGroupTitle(paComponentController, paTableGroupRow); RenderTableList(paComponentController, lcTableList); paComponentController.RenderEndTag(); } }
protected void RenderBrowserMode(ComponentController paComponentController) { IncludeExternalLinkFiles(paComponentController); if ((clAllowStaffInventoryFeature) || (clAdminUser)) { SCI_ParentForm.RenderToolBar(paComponentController); } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Attribute, "readonly"); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Template, GetTemplate()); paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSItemList); paComponentController.RenderBeginTag(HtmlTag.Div); RenderContainer(paComponentController); paComponentController.RenderEndTag(); }
//private int GetSettingIndex(String paSettingName) //{ // for (int lcCount = 0; lcCount < ctSettingList.GetLength(0); lcCount++) // if (string.Equals(ctSettingList[lcCount, ctSLIName], paSettingName, StringComparison.InvariantCultureIgnoreCase)) return (lcCount); // return (-1); //} private void RenderSettingConatiner(ComponentController paComponentController) { paComponentController.AddElementType(ComponentController.ElementType.Container); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSSettingList); paComponentController.RenderBeginTag(HtmlTag.Div); foreach (String lcKey in clSettingOptions.Keys) { RenderSettingRow(paComponentController, clSettingOptions[lcKey][ctKEYIcon].ToString(), clSettingOptions[lcKey][ctKEYLabel].ToString(), clSettingOptions[lcKey][ctKEYForm].ToString()); // General.GetJValueStr() } //for (int lcCount = 0; lcCount < clSettingOptions.Length; lcCount++) //{ // if ((lcIndex = GetSettingIndex(clSettingOptions[lcCount])) != -1) // { // RenderSettingRow(paComponentController, ctSettingList[lcIndex, ctSLIIcon], ctSettingList[lcIndex, ctSLILabel], ctSettingList[lcIndex, ctSLIFormName]); // } //} paComponentController.RenderEndTag(); }
protected void RenderBrowserMode(ComponentController paComponentController) { RetrieveData(); IncludeExternalLinkFiles(paComponentController); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, clMetaDataRow.ActiveData.GetData(ctCOLEntryID, "-1")); paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlMobileStoreAddAdjustInventory); paComponentController.RenderBeginTag(HtmlTag.Div); RenderContainer(paComponentController); RenderButtonPanel(paComponentController); RenderSelectionPanel(paComponentController, SelectionPanelType.Category, "normal", SC_CategoryLabel, clCategoryList); RenderSelectionPanel(paComponentController, SelectionPanelType.Manufacturer, "normal", SC_ManufacturerLabel, clManufacturerList); RenderSelectionPanel(paComponentController, SelectionPanelType.ProductName, "wide", SC_ProductNameLabel, clProductNameList); RenderSelectionPanel(paComponentController, SelectionPanelType.NetworkType, "normal", SC_NetworkLabel, clNetworkTypeList); paComponentController.RenderEndTag(); }
protected void RenderWidgetIcon(ComponentController paComponentController) { //paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, SC_WidgetCategory.ToLower()); //paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, GetHyperLink()); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidgetAnchor); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementType(ComponentController.ElementType.WidgetIcon); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidgetGroupIcon); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSMinuteIconContainer); paComponentController.RenderBeginTag(HtmlTag.Div); RenderMinuteWidgetEntries(paComponentController); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); RenderGroupPopUp(paComponentController); paComponentController.RenderEndTag(); }
protected void RenderBrowserMode(ComponentController paComponentController) { int lcParentCategory; IncludeExternalLinkFiles(paComponentController); if (SC_ControlMode == ControlMode.Category) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Template, ctPRMEditCategory + "<!!>" + ctPRMAddCategory + "<!!>" + ctPRMShowChild); } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Template, ctPRMEditItem + "<!!>" + ctPRMAddItem); } lcParentCategory = General.ParseInt(ApplicationFrame.GetInstance().ActiveFormInfoManager.GetFormParam(ctFPRCategory), 0); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Group, lcParentCategory.ToString()); if (SC_TitleVisible) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Appearance, "title"); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ControlMode, SC_ControlMode.ToString().ToLower()); paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlBEItemList); paComponentController.RenderBeginTag(HtmlTag.Div); if (SC_TitleVisible) { RenderTitle(paComponentController); } RenderContainer(paComponentController); paComponentController.RenderEndTag(); }
private void RenderTableList(ComponentController paComponentController, POSTableListRow paTableGroupRow) { POSTableListRow lcTableListRow; DataRow[] lcTableList; lcTableList = GetTableList(paTableGroupRow == null ? 0 : paTableGroupRow.TableID); paComponentController.AddElementType(ComponentController.ElementType.List); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTableListBlock); paComponentController.RenderBeginTag(HtmlTag.Div); lcTableListRow = new POSTableListRow(null); for (int lcCount = 0; lcCount < lcTableList.Length; lcCount++) { lcTableListRow.Row = lcTableList[lcCount]; RenderTableRow(paComponentController, lcTableListRow); } paComponentController.RenderEndTag(); }
private void RenderItemList(ComponentController paComponentController, POSItemCatalogueRow paCategoryRow) { POSItemCatalogueRow lcItemCatalogueRow; DataRow[] lcItemList; lcItemList = GetItemList(paCategoryRow == null ? 0 : paCategoryRow.ItemID); paComponentController.AddElementType(ComponentController.ElementType.List); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemListBlock); paComponentController.RenderBeginTag(HtmlTag.Div); lcItemCatalogueRow = new POSItemCatalogueRow(null); for (int lcCount = 0; lcCount < lcItemList.Length; lcCount++) { lcItemCatalogueRow.Row = lcItemList[lcCount]; RenderItemRow(paComponentController, lcItemCatalogueRow); } paComponentController.RenderEndTag(); }
private void RenderBrowserMode(ComponentController paComponentController) { String lcBase64ReceiptLayoutSetting; String lcBase64TestPrintTemplate; String lcBase64ReceiptLayoutList; lcBase64ReceiptLayoutSetting = General.Base64Encode(clSettingManager.GetSettingValue(ctSETReceiptLayoutSetting, "{}")); lcBase64TestPrintTemplate = General.Base64Encode(clSettingManager.GetSettingValue(ctSETTestPrintReceipt, "{}")); lcBase64ReceiptLayoutList = General.Base64Encode(clSettingManager.GetSettingValue(ctSETReceiptLayoutList, "{}")); IncludeExternalLinkFiles(paComponentController); paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddElementAttribute(ctSETReceiptLayoutSetting, lcBase64ReceiptLayoutSetting); paComponentController.AddElementAttribute(ctSETReceiptLayoutList, lcBase64ReceiptLayoutList); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Template, lcBase64TestPrintTemplate); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSReceiptLayoutSetting); paComponentController.RenderBeginTag(HtmlTag.Div); RenderContainer(paComponentController); paComponentController.RenderEndTag(); RenderExternalComponentsContainer(paComponentController); }
//private void RenderButton(ComponentController paComponentController) //{ // int lcParentCategory; // paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSButtonPanel); // paComponentController.RenderBeginTag(HtmlTag.Div); // paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSButton); // paComponentController.AddAttribute(HtmlAttribute.Href, ctCMDAddItem); // lcParentCategory = General.ParseInt(ApplicationFrame.GetInstance().ActiveFormInfoManager.GetFormParam(ctFPRCategory), 0); // if (SC_ControlMode == ControlMode.Item) // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Parameter, ctPRMAddItem.Replace("$CATEGORYCODE",lcParentCategory.ToString())); // else // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Parameter, ctPRMAddCategory.Replace("$CATEGORYCODE",lcParentCategory.ToString())); // paComponentController.RenderBeginTag(HtmlTag.A); // paComponentController.Write(SC_ButtonText); // paComponentController.RenderEndTag(); // paComponentController.RenderEndTag(); //} private void RenderContainer(ComponentController paComponentController) { StandardItemCatalogueRow lcStandardItemCatalogueRow; paComponentController.AddElementType(ComponentController.ElementType.Container); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSContainer); paComponentController.RenderBeginTag(HtmlTag.Div); if (SC_ItemList != null) { lcStandardItemCatalogueRow = new StandardItemCatalogueRow(null); for (int lcCount = 0; lcCount < SC_ItemList.Rows.Count; lcCount++) { lcStandardItemCatalogueRow.Row = SC_ItemList.Rows[lcCount]; RenderElementBlock(paComponentController, lcStandardItemCatalogueRow); } } // RenderButton(paComponentController); paComponentController.RenderEndTag(); // Container }
protected void RenderBrowserMode(ComponentController paComponentController) { IncludeExternalLinkFiles(paComponentController); if (clUserRow == null) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, (-1).ToString()); } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, clUserRow.UserID.ToString()); } paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSChangePassword); paComponentController.RenderBeginTag(HtmlTag.Div); RenderHeaderBar(paComponentController); RenderContentContainer(paComponentController); RenderButtonPanel(paComponentController); paComponentController.RenderEndTag(); }
private void RenderField(ComponentController paComponentController, MetaDataRow paMetaDataRow) { String lcGrouping; if (SC_GroupingColumnName != null) { lcGrouping = paMetaDataRow.ActiveData.GetData(SC_GroupingColumnName, String.Empty); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Group, lcGrouping); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_KeyValue, General.GetFormattedDBData(paMetaDataRow.ActiveData.GetData(SC_KeyColumnName, String.Empty))); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSField); paComponentController.RenderBeginTag(HtmlTag.Div); RenderPriceDiv(paComponentController, paMetaDataRow); RenderInlineButtons(paComponentController); RenderUsualPriceDiv(paComponentController, paMetaDataRow); paComponentController.RenderEndTag(); }
private void RenderUserRow(ComponentController paComponentController, UserRow paUserRow) { String lcSettingKey; String lcRestrictedWidgetList; lcSettingKey = ctSETRestrictedWidget.Replace("$USERID", paUserRow.UserID.ToString()); lcRestrictedWidgetList = clSettingManger.GetSettingValue(lcSettingKey); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSUserRow); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_KeyColumnName, lcSettingKey); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_KeyValue, lcRestrictedWidgetList); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDShowPopUp); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paUserRow.Type.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paUserRow.UserID.ToString()); paComponentController.AddElementType(ComponentController.ElementType.Row); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(paUserRow.LoginID); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
private void RenderRefreshBar(ComponentController paComponentController) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSRefreshBar); paComponentController.RenderBeginTag(HtmlTag.Div); RenderRefrehBarButton(paComponentController, ctICOButton1_Green, 1, false); RenderRefrehBarButton(paComponentController, ctICOButton1_Gray, 1, true); RenderRefrehBarButton(paComponentController, ctICOButton3_Green, 3, false); RenderRefrehBarButton(paComponentController, ctICOButton3_Gray, 3, true); RenderRefrehBarButton(paComponentController, ctICOButton5_Green, 5, false); RenderRefrehBarButton(paComponentController, ctICOButton5_Gray, 5, true); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSStatusDiv); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTimerDiv); paComponentController.AddElementType(ComponentController.ElementType.Timer); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(SC_RefreshTimeOut.ToString().PadLeft(2, '0') + ":00"); paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSAjaxImage); paComponentController.AddAttribute(HtmlAttribute.Src, ResourceManager.GetInstance().GetAjaxLoaderImageUrl(ctAJAXBigCircle)); paComponentController.RenderBeginTag(HtmlTag.Img); paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSLastUpdateDiv); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(General.GetCurrentSystemLocalTime().ToString("HH:mm")); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); RenderRefrehBarButton(paComponentController, ctICORefresh, 0, true); paComponentController.RenderEndTag(); }
protected void RenderOtherInfoSection(ComponentController paComponentController, String paColumnName, String paLabel, bool paMandatory, bool paNumeric) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSInputRow); paComponentController.AddElementType(ComponentController.ElementType.InputRow); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSLabel); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(paLabel); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSInputDiv); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paColumnName); if (paMandatory) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mandatory, "true"); } if (paNumeric) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_InputMode, "number"); } paComponentController.AddAttribute(HtmlAttribute.Value, clMetaDataRow.ActiveData.GetData(paColumnName, String.Empty)); paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.RenderBeginTag(HtmlTag.Input); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
private void RenderHeaderBar(ComponentController paComponentController) { paComponentController.AddElementType(ComponentController.ElementType.ControlBar); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSHeaderBar); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSReceiptNoDiv); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(ApplicationFrame.GetInstance().ActiveSubscription.ActiveLanguage.ConvertNumber(clReceiptManager.ActiveRow.ReceiptNo.ToString().PadLeft(6, '0'))); paComponentController.RenderEndTag(); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDCustomerInfo); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSCustomerDiv); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLCodeNo); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(clReceiptManager.ActiveStakeHolder.ActiveRow.CodeNo); paComponentController.RenderEndTag(); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLName); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(clReceiptManager.ActiveStakeHolder.ActiveRow.Name); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDChangeReceiptDate); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSDateDiv); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctCOLReceiptDate); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(ApplicationFrame.GetInstance().ActiveSubscription.ActiveLanguage.ConvertNumber(clReceiptManager.ActiveRow.ReceiptDate.ToString("dd/MM/yyyy"))); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
private void RenderElementBlock(ComponentController paComponentController, StandardItemCatalogueRow paStandardCatalogueRow) { // String lcShowChildParam; if (paStandardCatalogueRow != null) { //if (SC_ControlMode == ControlMode.Category) //{ // paComponentController.AddAttribute(HtmlAttribute.Href, ctCMDShowChild); // lcShowChildParam = ctPRMShowChild.Replace("$CATEGORYCODE",paStandardCatalogueRow.ItemID.ToString()); // lcShowChildParam = lcShowChildParam.Replace("$CATEGORYNAME", paStandardCatalogueRow.EntryName); // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Parameter, lcShowChildParam); //} paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, paStandardCatalogueRow.ItemID.ToString()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paStandardCatalogueRow.EntryType); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Group, paStandardCatalogueRow.Category.ToString()); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemBlock); paComponentController.RenderBeginTag(HtmlTag.Div); RenderButtonPanel(paComponentController); RenderElement(paComponentController, ctCLSItemName, paStandardCatalogueRow.EntryName); if ((SC_DescriptionVisible) && (!String.IsNullOrEmpty(paStandardCatalogueRow.Description))) { RenderElement(paComponentController, ctCLSDescription, paStandardCatalogueRow.Description); } RenderPricePanel(paComponentController, paStandardCatalogueRow.Price); paComponentController.RenderEndTag(); } }
private void RenderContentArea(ComponentController paComponentController) { paComponentController.AddElementType(ComponentController.ElementType.List); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSContentArea); paComponentController.RenderBeginTag(HtmlTag.Div); if (clListMode == ListMode.DictionaryMode) { RenderDictionaryItemList(paComponentController); } else { if (clSelectionMode == SelectionMode.Image) { RenderImageItemList(paComponentController); } else { RenderArrayItemList(paComponentController); } } paComponentController.RenderEndTag(); }
protected void RenderBrowserMode(ComponentController paComponentController) { MetaDataRow lcMetaDataRow; IncludeExternalLinkFiles(paComponentController); if (clSubscriberRow != null) { lcMetaDataRow = new MetaDataRow(clSubscriberRow.Row); } else { lcMetaDataRow = null; } paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlFEBasicStoreLocation); paComponentController.RenderBeginTag(HtmlTag.Div); RenderMapPanel(paComponentController); RenderInfoPanel(paComponentController); paComponentController.RenderEndTag(); }
private void RenderEntryList(ComponentController paComponentController) { DateTime lcDate; int lcIncomingID; Decimal lcUnitPrice; paComponentController.AddElementType(ComponentController.ElementType.List); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSEntryList); paComponentController.RenderBeginTag(HtmlTag.Div); if ((clCostPriceList != null) && (clCostPriceList.Rows.Count > 0)) { for (int lcCount = 0; lcCount < clCostPriceList.Rows.Count; lcCount++) { lcDate = Convert.ToDateTime(clCostPriceList.Rows[lcCount][ctCOLReceiptDate]); lcIncomingID = Convert.ToInt32(clCostPriceList.Rows[lcCount][ctCOLIncomingID]); lcUnitPrice = Convert.ToDecimal(clCostPriceList.Rows[lcCount][ctCOLUnitPrice]); if ((lcCount == 0) && (lcDate.Date != clInitialCostDate.Date)) { RenderEntryRow(paComponentController, clInitialCostDate, 0, 0); RenderEntryRow(paComponentController, lcDate, lcIncomingID, lcUnitPrice); } else { RenderEntryRow(paComponentController, lcDate, lcIncomingID, lcUnitPrice); } } } else { RenderEntryRow(paComponentController, clInitialCostDate, 0, 0); } paComponentController.RenderEndTag(); }
protected void RenderBrowserMode(ComponentController paComponentController) { IncludeExternalLinkFiles(paComponentController); paComponentController.AddElementType(ComponentController.ElementType.Control); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LowerBound, GetLowerBoundDays().ToString()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_UpperBound, GetUpperBoundDays().ToString()); if (clAllowProfitLossView) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, "profitloss"); } paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSDailyReceipt); paComponentController.RenderBeginTag(HtmlTag.Div); RenderTitleBar(paComponentController); RenderHeaderBar(paComponentController); RenderDailyReceiptContainer(paComponentController); paComponentController.RenderEndTag(); RenderCalendar(paComponentController); }
private void RenderOrderList(ComponentController paComponentController) { OrderInfoRow lcOrderInfoRow; DataRow[] lcOrderDetailList; paComponentController.AddElementType(ComponentController.ElementType.Container); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSListPanel); paComponentController.RenderBeginTag(HtmlTag.Div); if (SC_OrderInfoList != null) { lcOrderInfoRow = new OrderInfoRow(null); for (int lcCount = 0; lcCount < SC_OrderInfoList.Rows.Count; lcCount++) { lcOrderInfoRow.Row = SC_OrderInfoList.Rows[lcCount]; lcOrderDetailList = RetrieveOrderDetailList(lcOrderInfoRow.OrderNo); RenderOrderEntry(paComponentController, lcOrderInfoRow, lcOrderDetailList); } } paComponentController.RenderEndTag(); }
private void RenderApplicationTitlePanel(ComponentController paComponentController) { String lcDefaultTitle; lcDefaultTitle = clApplicationTitle.GetData(ctKEYDefault, ""); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, ctBLKApplicationTitle); paComponentController.AddElementType(ComponentController.ElementType.Block); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, ctSETApplicationTitle); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Name, ctKEYDefault); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, lcDefaultTitle); paComponentController.AddAttribute(HtmlAttribute.Value, lcDefaultTitle); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSSettingGroup); paComponentController.RenderBeginTag(HtmlTag.Div); RenderSectionHeader(paComponentController, ctDYTApplicationTitle); for (int lcCount = 0; lcCount < clLanaguageOptionArray.Length; lcCount++) { RenderApplicationTitleRow(paComponentController, clLanaguageOptionArray[lcCount]); } paComponentController.RenderEndTag(); }
private void RenderGridRowTemplate(ComponentController paComponentController) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, "template"); 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.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.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.RenderBeginTag(HtmlTag.Div); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Element); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, POSGridItem.Discount.ToString().ToLower()); 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(); }
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(); }
private void RenderBriefDescriptionDiv(ComponentController paComponentController, OrderInfoRow paOrderInfoRow, DataRow[] paOrderDetailList, int paTotalQuantity, Decimal paTotalAmount) { OrderDetailRow lcOrderDetailRow; int lcOverrideStatus; int lcEffectiveStatus; paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSBriefDescriptionDiv); paComponentController.RenderBeginTag(HtmlTag.Div); if (paOrderDetailList != null) { lcOrderDetailRow = new OrderDetailRow(null); lcOverrideStatus = paOrderInfoRow.OrderStatus; for (int lcCount = 0; lcCount < paOrderDetailList.Length; lcCount++) { lcOrderDetailRow.Row = paOrderDetailList[lcCount]; if (!String.IsNullOrEmpty(lcOrderDetailRow.ItemName)) { if (lcOverrideStatus < 0) { lcEffectiveStatus = lcOverrideStatus; } else { lcEffectiveStatus = lcOrderDetailRow.Status; } if ((lcEffectiveStatus >= 0) && (lcOrderDetailRow.Quantity <= 0)) { lcEffectiveStatus = (int)OrderInfoManager.OrderUniversalStatus.Cancel; } // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Appearance, ((OrderInfoManager.OrderUniversalStatus) lcEffectiveStatus).ToString().ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, lcOrderDetailRow.ItemID.ToString()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Status, lcEffectiveStatus.ToString()); paComponentController.AddElementType(ComponentController.ElementType.Row); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSEntryRow); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemName); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.ItemName); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Quantity); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSQuantity); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.Quantity.ToString("F0")); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Total); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSPrice); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write((lcOrderDetailRow.UnitPrice * lcOrderDetailRow.Quantity).ToString("F0")); paComponentController.RenderEndTag(); if (lcEffectiveStatus >= 0) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSButtonDiv); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Href, ctCMDRejectItem); paComponentController.AddAttribute(HtmlAttribute.Src, ResourceManager.GetInstance().GetFoundationIconUrl(ctICOCross)); paComponentController.RenderBeginTag(HtmlTag.Img); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); } if ((!String.IsNullOrWhiteSpace(lcOrderDetailRow.Remark)) && (lcEffectiveStatus != (int)OrderInfoManager.OrderUniversalStatus.Reject)) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemRemark); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.Remark); paComponentController.RenderEndTag(); } paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSRejectReason); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.RejectReason); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); } } paComponentController.AddElementType(ComponentController.ElementType.Quantity); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTotalQuantity); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(paTotalQuantity.ToString("F0")); paComponentController.RenderEndTag(); paComponentController.AddElementType(ComponentController.ElementType.Total); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTotalPrice); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(paTotalAmount.ToString("F0")); paComponentController.RenderEndTag(); } RenderFloatButtonBar(paComponentController); paComponentController.RenderEndTag(); }
private void RenderBriefDescriptionDiv(ComponentController paComponentController, OrderInfoRow paOrderInfoRow, DataRow[] paOrderDetailList, int paTotalQuantity, Decimal paTotalAmount) { OrderDetailRow lcOrderDetailRow; int lcOverrideStatus; int lcEffectiveStatus; paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSBriefDescriptionDiv); paComponentController.RenderBeginTag(HtmlTag.Div); if (paOrderDetailList != null) { lcOrderDetailRow = new OrderDetailRow(null); lcOverrideStatus = paOrderInfoRow.OrderStatus; for (int lcCount = 0; lcCount < paOrderDetailList.Length; lcCount++) { lcOrderDetailRow.Row = paOrderDetailList[lcCount]; if (!String.IsNullOrEmpty(lcOrderDetailRow.ItemName)) { if (lcOverrideStatus < 0) { lcEffectiveStatus = lcOverrideStatus; } else { lcEffectiveStatus = lcOrderDetailRow.Status; } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Appearance, ((OrderInfoManager.OrderUniversalStatus)lcEffectiveStatus).ToString().ToLower()); paComponentController.AddElementType(ComponentController.ElementType.Row); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, lcOrderDetailRow.ItemID.ToString()); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSEntryRow); paComponentController.RenderBeginTag(HtmlTag.Div); //paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSBullet); //paComponentController.RenderBeginTag(HtmlTag.Span); //paComponentController.Write(lcBullet); //paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemName); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.ItemName); paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSQuantity); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.Quantity.ToString("F0")); paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSPrice); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write((lcOrderDetailRow.UnitPrice * lcOrderDetailRow.Quantity).ToString("F0")); paComponentController.RenderEndTag(); if (lcEffectiveStatus == (int)OrderInfoManager.OrderUniversalStatus.Reject) { if (!String.IsNullOrWhiteSpace(lcOrderDetailRow.RejectReason)) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSRejectReason); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.RejectReason); paComponentController.RenderEndTag(); } } else { if (!String.IsNullOrWhiteSpace(lcOrderDetailRow.Remark)) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSItemRemark); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(lcOrderDetailRow.Remark); paComponentController.RenderEndTag(); } } paComponentController.RenderEndTag(); } } paComponentController.AddElementType(ComponentController.ElementType.Summary); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTotalSummary); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTotalQuantity); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(paTotalQuantity.ToString("F0")); paComponentController.RenderEndTag(); paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSTotalPrice); paComponentController.RenderBeginTag(HtmlTag.Span); paComponentController.Write(paTotalAmount.ToString("F0")); paComponentController.RenderEndTag(); if (paOrderInfoRow.OrderStatus == (int)OrderInfoManager.OrderUniversalStatus.Reject) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSOrderRemark); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(paOrderInfoRow.RejectReason); paComponentController.RenderEndTag(); } else { if (!String.IsNullOrEmpty(paOrderInfoRow.OrderRemark)) { paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSOrderRemark); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(paOrderInfoRow.OrderRemark); paComponentController.RenderEndTag(); } } paComponentController.RenderEndTag(); } paComponentController.RenderEndTag(); }
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(); } } }