public MastersController()
        {
            result              = new Result();
            countryUtil         = new CountryUtil();
            stateUtil           = new StateUtil();
            cityUtil            = new CityUtil();
            areaUtil            = new AreaUtil();
            subareaUtil         = new SubAreaUtil();
            appointmentTypeUtil = new AppointmentTypeUtil();
            currencyUtil        = new CurrencyUtil();
            dateFormatUtil      = new DateFormatUtil();
            documentTypeUtil    = new DocumentTypeUtil();
            languageUtil        = new LanguageUtil();
            religionUtil        = new ReligionUtil();
            nationalityUtil     = new NationalityUtil();
            sourceUtil          = new SourceUtil();
            durationDaysUtil    = new DurationDaysUtil();
            packageUtil         = new PackageUtil();

            // scoreColumnUtil = new ScoreColumnUtil();
            timeFormatUtil  = new TimeFormatUtil();
            industryUtil    = new IndustryUtil();
            paymentModeUtil = new PaymentModeUtil();
            applicationTemplatePlaceHolderUtil = new ApplicationTemplatePlaceHolderUtil();
        }
 public JsonController()
 {
     Result              = new Result();
     countryUtil         = new CountryUtil();
     stateUtil           = new StateUtil();
     areaUtil            = new AreaUtil();
     userUtil            = new UserUtil();
     subareaUtil         = new SubAreaUtil();
     appointmentTypeUtil = new AppointmentTypeUtil();
     currencyUtil        = new CurrencyUtil();
     dateFormatUtil      = new DateFormatUtil();
     languageUtil        = new LanguageUtil();
     religionUtil        = new ReligionUtil();
     durationDaysUtil    = new DurationDaysUtil();
     sourceUtil          = new SourceUtil();
     packageUtil         = new PackageUtil();
     cityUtil            = new CityUtil();
     //scoreColumnUtil = new ScoreColumnUtil();
     nationalityUtil = new NationalityUtil();
     timeFormatUtil  = new TimeFormatUtil();
     industryUtil    = new IndustryUtil();
     paymentModeUtil = new PaymentModeUtil();
     applicationTemplatePlaceHolderUtil = new ApplicationTemplatePlaceHolderUtil();
     jobTypeUtill        = new JobTypeUtill();
     jobStatusUtill      = new JobStatusUtill();
     packageTypeUtill    = new PackageTypeUtill();
     paperTypeUtill      = new PaperTypeUtill();
     paperSubTypeUtill   = new PaperSubTypeUtill();
     paymentStatusUtill  = new PaymentStatusUtill();
     currencyUtil        = new CurrencyUtil();
     leminationTypeUtill = new LeminationTypeUtill();
 }
Beispiel #3
0
        protected override string GetValue(PlatformDate date, FormatContext context, BareANY bareAny)
        {
            TimeZoneInfo timeZone = context != null && context.GetDateTimeZone() != null?context.GetDateTimeZone() : System.TimeZoneInfo.Local;

            string datePattern = DetermineDatePattern(date);

            ValidateDatePattern(datePattern, context);
            return(DateFormatUtil.Format(date, datePattern, timeZone));
        }
Beispiel #4
0
        protected override string GetValue(MbDate mbDate, FormatContext context, BareANY bareAny)
        {
            PlatformDate date = (mbDate == null ? null : mbDate.Value);
            // write out the date using the "full" pattern; clients can override this using a system property or a DateWithPattern date
            VersionNumber version     = GetVersion(context);
            string        datePattern = DetermineDateFormat(date, version);

            ValidateDatePattern(datePattern, context);
            TimeZoneInfo timeZone = context != null && context.GetDateTimeTimeZone() != null?context.GetDateTimeTimeZone() : System.TimeZoneInfo.Local;

            return(DateFormatUtil.Format(date, datePattern, timeZone));
        }
Beispiel #5
0
        protected override string GetValue(PlatformDate date, FormatContext context, BareANY bareAny)
        {
            // write out the date using the applicable "full" pattern; clients can override this using a system property or a DateWithPattern date
            VersionNumber    version          = GetVersion(context);
            StandardDataType standardDataType = StandardDataType.GetByTypeName(context);
            string           datePattern      = DetermineDateFormat(standardDataType, date, version);

            ValidateDatePattern(datePattern, context);
            TimeZoneInfo timeZone = context != null && context.GetDateTimeTimeZone() != null?context.GetDateTimeTimeZone() : System.TimeZoneInfo.Local;

            return(DateFormatUtil.Format(date, datePattern, timeZone));
        }
Beispiel #6
0
        private string RenderDate(MbDate birthTime)
        {
            string result = "";

            if (birthTime != null && birthTime.Value != null)
            {
                PlatformDate date       = birthTime.Value;
                string       dateFormat = "yyyyMMdd hh:mm:ss";
                if (date is DateWithPattern)
                {
                    dateFormat = ((DateWithPattern)date).DatePattern;
                }
                result = DateFormatUtil.Format(date, dateFormat);
            }
            return(result);
        }
Beispiel #7
0
        public virtual void TestFormatValueNonNull()
        {
            PlatformDate calendar1         = DateUtil.GetDate(1999, 0, 1, 12, 29, 59, 0);
            PlatformDate calendar2         = DateUtil.GetDate(2001, 1, 3, 13, 30, 00, 0);
            SETImpl <TS, PlatformDate> set = new SETImpl <TS, PlatformDate>(typeof(TSImpl));

            set.RawSet().AddAll(MakeSet(calendar1, calendar2));
            string result = new SetPropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                        (new ModelToXmlResult(), null, "blah", "SET<TS>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.MANDATORY, Cardinality.
                                                                                        Create("1-4"), false), set);
            string currentTimeZone1 = DateFormatUtil.Format(calendar1, "Z");
            string currentTimeZone2 = DateFormatUtil.Format(calendar2, "Z");
            string expectedValue1   = "19990101122959.0000" + currentTimeZone1;
            string expectedValue2   = "20010203133000.0000" + currentTimeZone2;

            AssertXml("non null", "<blah value=\"" + expectedValue1 + "\"/><blah value=\"" + expectedValue2 + "\"/>", result);
        }
Beispiel #8
0
        /// <summary>Adapted from org.apache.commons.lang.time.DateUtils, but leniency is turned off.</summary>
        /// <remarks>Adapted from org.apache.commons.lang.time.DateUtils, but leniency is turned off.</remarks>
        private PlatformDate ParseDate(string str, string[] parsePatterns, ParseContext context)
        {
            string dateString = StandardizeDate(str);

            for (int i = 0; i < parsePatterns.Length; i++)
            {
                string pattern = parsePatterns[i];
                if (DateFormatUtil.IsMatchingPattern(dateString, pattern))
                {
                    PlatformDate date = DateFormatUtil.Parse(dateString, pattern, GetTimeZone(context));
                    pattern = ExpandPatternIfNecessary(pattern);
                    // SPD: wrap the date in our own Date to remember the chosen parsePattern with the Date
                    return(new DateWithPattern(date, pattern));
                }
            }
            throw new ArgumentException("Unable to parse the date: " + str);
        }
Beispiel #9
0
 private string GetCurrentTimeZone(PlatformDate calendar)
 {
     return(DateFormatUtil.Format(calendar, "Z"));
 }