protected virtual void FATran_FinPeriodID_FieldUpdating(PXCache sender, PXFieldUpdatingEventArgs e) { try { if (e.Row != null && IsDefaulting) { object newValue = FinPeriodIDFormattingAttribute.FormatForStoring((string)e.NewValue); sender.RaiseFieldVerifying <FATran.finPeriodID>(e.Row, ref newValue); } } finally { IsDefaulting = false; } }
public override object Evaluate(PXCache cache, object item, Dictionary <Type, object> parameters) { string direction = (string)parameters[typeof(Direction)]; string periodID = (string)parameters[typeof(PeriodID)]; switch (direction) { case FormatDirection.Display: return(FinPeriodIDFormattingAttribute.FormatForDisplay(periodID)); case FormatDirection.Store: return(FinPeriodIDFormattingAttribute.FormatForStoring(periodID)); case FormatDirection.Error: return(FinPeriodIDFormattingAttribute.FormatForError(periodID)); default: return(null); } }
public static string UnFormatPeriod(string period) { return(FinPeriodIDFormattingAttribute.FormatForStoring(period)); }