コード例 #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;
     }
 }
コード例 #2
0
        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
ファイル: Attribute.cs プロジェクト: PavelMPD/SimpleProjects
 public static string UnFormatPeriod(string period)
 {
     return(FinPeriodIDFormattingAttribute.FormatForStoring(period));
 }