예제 #1
0
 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);
            }
        }
예제 #3
0
 public static string UnFormatPeriod(string period)
 {
     return(FinPeriodIDFormattingAttribute.FormatForStoring(period));
 }