Example #1
0
        private void RenderBrowserMode(ComponentController paComponentController)
        {
            String lcBase64RegionalConfig;
            String lcBase64AppManifestConfig;
            String lcBase64JSONTable;

            lcBase64RegionalConfig    = General.Base64Encode(clSettingManager.RegionalConfigStr);
            lcBase64AppManifestConfig = General.Base64Encode(General.JSONSerialize(clAppManifestDictionary));
            lcBase64JSONTable         = General.Base64Encode(TimeZoneManager.GetInstance().GetJSONTable());

            IncludeExternalLinkFiles(paComponentController);

            paComponentController.AddElementType(ComponentController.ElementType.Control);
            paComponentController.AddBareAttribute(ctSETRegionalConfig, lcBase64RegionalConfig);
            paComponentController.AddBareAttribute(ctTBLAppManifest, lcBase64AppManifestConfig);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OptionList, lcBase64JSONTable);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSGeneralSetting);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            RenderContainer(paComponentController);

            paComponentController.RenderEndTag();

            RenderExternalComponentsContainer(paComponentController);
        }
Example #2
0
        private void RenderBrowserMode(ComponentController paComponentController)
        {
            String lcReceiptLayoutSetting;
            String lcReceiptLayout;
            String lcReceiptCustomization;

            //if (!String.IsNullOrEmpty(clPrimaryPrinterName))
            //{
            lcReceiptLayoutSetting = General.Base64Encode(General.JSONSerialize(clReceiptLayoutSetting));
            lcReceiptCustomization = General.Base64Encode(General.JSONSerialize(clReceiptCustomization));
            lcReceiptLayout        = General.Base64Encode(General.JSONSerialize(clReceiptActiveLayout));

            IncludeExternalLinkFiles(paComponentController);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Decimal, clSetting.CurrencyDecimalPlace.ToString());
            paComponentController.AddElementAttribute(ctSETReceiptLayoutSetting, lcReceiptLayoutSetting);
            paComponentController.AddElementAttribute(ctSETReceiptCustomization, lcReceiptCustomization);
            paComponentController.AddElementAttribute(ctSETReceiptLayout, lcReceiptLayout);
            paComponentController.AddElementAttribute(ctSETPrimaryPrinterSetting, General.Base64Encode(clSetting.GetSettingValue(ctSETPrimaryPrinterSetting, "{}")));
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Path, UploadManager.GetInstance().UploadPath);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, ctTYPReceiptBaseInfo);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSSubControlPOSReceiptOutput);
            paComponentController.AddElementType(ComponentController.ElementType.Composite);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            RenderCanvas(paComponentController);
            RenderPreviewPanel(paComponentController);

            paComponentController.RenderEndTag();
            // }
        }
Example #3
0
 public WidControlPOSPrinterSetting()
 {
     clLanguageManager       = ApplicationFrame.GetInstance().ActiveSubscription.ActiveLanguage;
     clSettingManager        = ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting;
     clPrimaryPrinterSetting = General.Base64Encode(clSettingManager.GetSettingValue(ctSETPrimaryPrinterSetting, "{}"));
     clTestPrintTemplate     = General.Base64Encode(clSettingManager.GetSettingValue(ctSETTestPrintReceipt, "{}"));
 }
Example #4
0
        private PrinterController()
        {
            String lcPrinterListJSON;

            lcPrinterListJSON       = ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting.GetSettingValue(ctSETPrinterList, "{}");
            clPrinterListBase64JSON = General.Base64Encode(lcPrinterListJSON);

            clPrinterList = General.JSONDeserialize <Dictionary <String, dynamic> >(lcPrinterListJSON);
        }
Example #5
0
        protected void RenderBrowserMode(ComponentController paComponentController)
        {
            String lcBase64TransactionSettingStr;
            String lcBase64SystemConfigStr;
            String lcBase64StaffPermissionStr;
            String lcBase64RegionalConfigStr;

            lcBase64SystemConfigStr       = General.Base64Encode(clSettingManager.SystemConfigStr);
            lcBase64RegionalConfigStr     = General.Base64Encode(clSettingManager.RegionalConfigStr);
            lcBase64StaffPermissionStr    = General.Base64Encode(clSettingManager.GetSettingValue(ctSETStaffPermissionSetting, "{}"));
            lcBase64TransactionSettingStr = General.Base64Encode(clSettingManager.GetSettingValue(ctSETTransactionSetting, "{}"));

            IncludeExternalLinkFiles(paComponentController);
            CreateReceiptManager();

            paComponentController.AddElementType(ComponentController.ElementType.Control);
            paComponentController.AddBareAttribute(ctSETSytemConfig, lcBase64SystemConfigStr);
            paComponentController.AddBareAttribute(ctSETRegionalConfig, lcBase64RegionalConfigStr);
            paComponentController.AddBareAttribute(ctSETTransactionSetting, lcBase64TransactionSettingStr);
            paComponentController.AddBareAttribute(ctSETStaffPermissionSetting, lcBase64StaffPermissionStr);

            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_TaxApplicable, clTaxApplicable.ToString().ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_TransactionState, clTransactionState.ToString().ToLower());
            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_MultiPaymentMode, clMultiPaymentMode.ToString().ToLower());
            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_ReceiptPrintMode, clReceiptPrintMode.ToString().ToLower());

            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_AllowShortSell, General.ParseBoolean(clSettingManager.SystemConfig.GetData(ctKEYAllowShortSell), false).ToString().ToLower());
            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_TaxInclusive, clReceiptManager.ActiveRow.TaxInclusive.ToString().ToLower());
            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.gpos_TaxPercent, clReceiptManager.ActiveRow.TaxPercent.ToString());
            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LowerBound, GetLowerBoundDays().ToString());
            // paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_UpperBound, GetUpperBoundDays().ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_AdminMode, clAdminUser ? "true" : null);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, clMode.ToString().ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataID, clReceiptManager.ActiveRow.ReceiptID.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Edition, clEdition.ToString().ToLower());
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSTransaction);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            RenderTitleBar(paComponentController);
            RenderHeaderBar(paComponentController);
            RenderFields(paComponentController);

            RenderTransactionList(paComponentController);

            RenderKeyPad(paComponentController);

            paComponentController.RenderEndTag();

            RenderExternalComponentsContainer(paComponentController);


            // RenderPopUp(paComponentController, ctTIDReceiptDateInfo, ctIIGReceiptDateInfo);
            // RenderPopUp(paComponentController, ctTIDPaymentInfo, ctIIGPaymentInfo);
        }
Example #6
0
        protected String GetHyperLink()
        {
            Match lcMatch;

            if ((lcMatch = Regex.Match(SC_WidgetLink, ctRegExFormLink)).Success)
            {
                return(ctFormLinkTemplate.Replace("$FORMNAME", HttpUtility.UrlEncode(General.Base64Encode(lcMatch.Groups[ctGRPFormName].Value))));
            }
            else
            {
                return(ctOtherLinkTemplate.Replace("$LINK", SC_WidgetLink));
            }
        }
Example #7
0
        private void RenderBrowserMode(ComponentController paComponentController)
        {
            String lcBase64RegionalConfig;

            IncludeExternalLinkFiles(paComponentController);

            lcBase64RegionalConfig = General.Base64Encode(clSettingManager.RegionalConfigStr);

            paComponentController.AddBareAttribute(ctSETRegionalConfig, lcBase64RegionalConfig);
            paComponentController.AddElementType(ComponentController.ElementType.Control);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSLanguageSetting);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            RenderContainer(paComponentController);

            paComponentController.RenderEndTag();
        }
Example #8
0
        private void RenderBrowserMode(ComponentController paComponentController)
        {
            String lcBase64StaffPermission;
            String lcBase64SystemConfig;

            lcBase64StaffPermission = General.Base64Encode(clSettingManager.GetSettingValue(ctSETStaffPrmissionSetting));
            lcBase64SystemConfig    = General.Base64Encode(clSettingManager.SystemConfigStr);

            IncludeExternalLinkFiles(paComponentController);

            paComponentController.AddElementType(ComponentController.ElementType.Control);
            paComponentController.AddElementAttribute(ctSETStaffPrmissionSetting, lcBase64StaffPermission);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_SystemConfig, lcBase64SystemConfig);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSStaffPermissionSetting);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            RenderContainer(paComponentController);

            paComponentController.RenderEndTag();
        }
Example #9
0
        private void RenderBrowserMode(ComponentController paComponentController)
        {
            String lcBase64ReceiptCustomization;
            String lcBase64TestPrintTemplate;

            lcBase64ReceiptCustomization = General.Base64Encode(clSettingManager.GetSettingValue(ctSETReceiptCustomization));
            lcBase64TestPrintTemplate    = General.Base64Encode(clSettingManager.GetSettingValue(ctSETTestPrintReceipt, "{}"));

            IncludeExternalLinkFiles(paComponentController);

            paComponentController.AddElementType(ComponentController.ElementType.Control);
            paComponentController.AddElementAttribute(ctSETReceiptCustomization, lcBase64ReceiptCustomization);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Template, lcBase64TestPrintTemplate);
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlPOSReceiptCustomizationSetting);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            RenderContainer(paComponentController);
            paComponentController.RenderEndTag();

            RenderExternalComponentsContainer(paComponentController);
        }
Example #10
0
        private String GetFormStack()
        {
            String lcFormStackStr;

            String[] lcFormStack;
            String   lcNewFromStack;
            String   lcLastFormName;

            if ((ActiveFormInfoManager != null) && (!String.IsNullOrEmpty(lcFormStackStr = General.Base64Decode(GetStateParameter(ctPRMFormStack)))))
            {
                if (!clFormInfoManager.IsAttributeSet(FormInfoManager.FormAttribute.Desktop))
                {
                    lcFormStack = lcFormStackStr.Split(new String[] { ctFormStackDelimiter.ToString() }, StringSplitOptions.RemoveEmptyEntries);

                    if (lcFormStack.Length > 0)
                    {
                        lcLastFormName = lcFormStack[lcFormStack.Length - 1].Trim().Split(',')[0];
                        if (lcLastFormName.Trim() == ActiveFormInfoManager.ActiveRow.FormName.Trim())
                        {
                            Array.Resize(ref lcFormStack, lcFormStack.Length - 1);
                        }
                    }
                    //if ((lcFormStack.Length > 0) && (lcFormStack[lcFormStack.Length - 1].Trim() == ActiveFormInfoManager.ActiveRow.FormName.Trim()))
                    //    Array.Resize(ref lcFormStack, lcFormStack.Length - 1);

                    lcNewFromStack = String.Join(ctFormStackDelimiter.ToString(), lcFormStack);
                }
                else
                {
                    lcNewFromStack = String.Empty;
                }

                lcNewFromStack = General.Base64Encode(lcNewFromStack);
                ActiveWebStateBlock.StoreWebStateVariable(ctPRMFormStack, lcNewFromStack);

                return(lcNewFromStack);
            }
            return(String.Empty);
        }
Example #11
0
 public LiteralControl WebStateControl()
 {
     return(new LiteralControl(ctWebStateControl.Replace("$WEBSTATE", HttpUtility.UrlEncode(General.Base64Encode(GetCompliedWebStateBlock())))));
 }
Example #12
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();
        }
Example #13
0
        protected void AddFormStyle(ComponentController paComponentController)
        {
            String lcFormCSSClass;
            String lcCustomWallPaper;

            lcFormCSSClass = String.IsNullOrWhiteSpace(clFormInfoManager.ActiveRow.FormCSSClass) ? clFormInfoManager.ActiveRow.RenderMode : clFormInfoManager.ActiveRow.FormCSSClass;

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSPanel + " " + lcFormCSSClass);
            paComponentController.AddElementType(ComponentController.ElementType.Form);

            if (ApplicationFrame.GetInstance().ActiveSubscription.IsDemoMode())
            {
                paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DemoMode, "true");
            }

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_FormProtocolList, General.Base64Encode(clSettingManager.FormProtocolListStr));
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ServiceRequestToken, ApplicationFrame.GetInstance().ActiveServiceRequestToken);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_FormStack, ApplicationFrame.GetInstance().FormStack);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_FormName, clFormInfoManager.ActiveRow.FormName);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_EncodedFormName, clFormInfoManager.EncodedFormName);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_DataGroupName, clFormInfoManager.ActiveRow.DataGroup);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LandingPage, General.Base64Encode(ApplicationFrame.GetInstance().ActiveSubscription.GetLandingPage()));
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Language, ApplicationFrame.GetInstance().ActiveSubscription.ActiveLanguage.ActiveRow.Language.ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LocalNumberMode, ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting.LocalNumberMode.ToString().ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LocalDigits, ApplicationFrame.GetInstance().ActiveSubscription.ActiveLanguage.LocalDigits);
            paComponentController.AddStyle(CSSStyle.Width, clFormInfoManager.ActiveRow.FormWidth.ToString() + ConfigClass.GetInstance().StandardXUnit);
            paComponentController.AddStyle(CSSStyle.Height, clFormInfoManager.ActiveRow.FormHeight.ToString() + ConfigClass.GetInstance().StandardYUnit);

            if ((lcCustomWallPaper = ApplicationFrame.GetInstance().ActiveSubscription.GetCustomWallPaper(clFormInfoManager.ActiveRow.FormName)) != null)
            {
                if (lcCustomWallPaper.ToLower().Contains(ctWallPaperPath))
                {
                    SetCustomBackground(paComponentController, lcCustomWallPaper);
                }
                else
                {
                    paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_desktopbackgroundcss, lcCustomWallPaper);
                }
            }
        }
Example #14
0
        protected String GetHyperLink(String paToolItemName, String paLink, out String paFormName)
        {
            Match lcMatch;

            paFormName = String.Empty;

            if (!String.IsNullOrEmpty(paLink))
            {
                if (paLink == ctHome)
                {
                    return(ctToolLinkTemplate.Replace("$FORMNAME", HttpUtility.UrlEncode(General.Base64Encode(paFormName = ApplicationFrame.GetInstance().ActiveSubscription.GetHomeForm()))));
                }
                else if ((lcMatch = Regex.Match(paLink, ctRegExFormLink)).Success)
                {
                    return(ctToolLinkTemplate.Replace("$FORMNAME", HttpUtility.UrlEncode(General.Base64Encode(paFormName = lcMatch.Groups[ctGRPFormName].Value))));
                }
                else
                {
                    return(paLink);
                }
            }
            else
            {
                return(null);
            }
        }