Exemple #1
0
 private static void ProcessNumericFormat(NumericFieldFormat nff, Utf8JsonWriter jsonw)
 {
     jsonw.WritePropertyName("NumericFieldFormat");
     jsonw.WriteStartObject();
     jsonw.WriteString("CurrencyPosition", nff.CurrencyPosition.ToStringSafe());
     jsonw.WriteString("CurrencySymbol", nff.CurrencySymbol);
     jsonw.WriteString("CurrencySymbolFormat", nff.CurrencySymbolFormat.ToStringSafe());
     jsonw.WriteString("DecimalSymbol", nff.DecimalSymbol);
     jsonw.WriteString("DisplayReverseSign", nff.DisplayReverseSign.ToStringSafe());
     jsonw.WriteString("EnableSuppressIfZero", nff.EnableSuppressIfZero.ToStringSafe());
     jsonw.WriteString("EnableUseLeadZero", nff.EnableUseLeadZero.ToStringSafe());
     jsonw.WriteString("NDecimalPlaces", nff.NDecimalPlaces.ToStringSafe());
     jsonw.WriteString("NegativeFormat", nff.NegativeFormat.ToStringSafe());
     jsonw.WriteString("OneCurrencySymbolPerPage", nff.OneCurrencySymbolPerPage.ToStringSafe());
     jsonw.WriteString("RoundingFormat", nff.RoundingFormat.ToStringSafe());
     jsonw.WriteString("ThousandsSeparator", nff.ThousandsSeparator.ToStringSafe());
     jsonw.WriteString("ThousandSymbol", nff.ThousandSymbol);
     jsonw.WriteString("ZeroValueString", nff.ZeroValueString);
     jsonw.WriteString("CurrencyPositionFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeCurrencyPosition].Text);
     jsonw.WriteString("CurrencySymbolFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeCurrencySymbol].Text);
     jsonw.WriteString("CurrencySymbolFormatFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeCurrencySymbolFormat].Text);
     jsonw.WriteString("DecimalSymbolFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeDecimalSymbol].Text);
     jsonw.WriteString("DisplayReverseSignFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeDisplayReverseSign].Text);
     jsonw.WriteString("EnableSuppressIfZeroFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeEnableSuppressIfZero].Text);
     jsonw.WriteString("EnableUseLeadZeroFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeEnableUseLeadZero].Text);
     jsonw.WriteString("NDecimalPlacesFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeNDecimalPlaces].Text);
     jsonw.WriteString("NegativeFormatFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeNegativeFormat].Text);
     jsonw.WriteString("OneCurrencySymbolPerPageFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeOneCurrencySymbolPerPage].Text);
     jsonw.WriteString("RoundingFormatFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeRoundingFormat].Text);
     jsonw.WriteString("ThousandsSeparatorFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeThousandsSeparator].Text);
     jsonw.WriteString("ThousandSymbolFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeThousandSymbol].Text);
     jsonw.WriteString("ZeroValueStringFormula", nff.ConditionFormulas[CrNumericFieldFormatConditionFormulaTypeEnum.crNumericFieldFormatConditionFormulaTypeZeroValueString].Text);
     jsonw.WriteEndObject();
 }
Exemple #2
0
 private static void ProcessNumericFormat(NumericFieldFormat nff, XmlWriter xmlw)
 {
     xmlw.WriteStartElement("NumericFieldFormat");
     xmlw.WriteAttributeString("CurrencySymbolFormat", nff.CurrencySymbolFormat.ToStringSafe());
     xmlw.WriteAttributeString("DecimalPlaces", nff.DecimalPlaces.ToStringSafe());
     xmlw.WriteAttributeString("EnableUseLeadingZero", nff.EnableUseLeadingZero.ToStringSafe());
     xmlw.WriteAttributeString("NegativeFormat", nff.NegativeFormat.ToStringSafe());
     xmlw.WriteAttributeString("RoundingFormat", nff.RoundingFormat.ToStringSafe());
     xmlw.WriteEndElement();
 }