Exemplo n.º 1
0
            private string GetOrderStr()
            {
                string order  = ConvertHelper.AdjustNumber(FamilyOrder, 2);
                string result = ((Parent == null) ? order : Parent.GetOrderStr() + order);

                return(result);
            }
Exemplo n.º 2
0
        public string GetDisplayString(DateFormat format, bool includeBC = false, bool showCalendar = false)
        {
            string result = "";

            int  year  = fYear;
            int  month = fMonth;
            int  day   = fDay;
            bool ybc   = fYearBC;

            if (year > 0 || month > 0 || day > 0)
            {
                switch (format)
                {
                case DateFormat.dfDD_MM_YYYY:
                    result += day > 0 ? ConvertHelper.AdjustNumber(day, 2) + "." : "__.";
                    result += month > 0 ? ConvertHelper.AdjustNumber(month, 2) + "." : "__.";
                    result += year > 0 ? year.ToString().PadLeft(4, '_') : "____";
                    break;

                case DateFormat.dfYYYY_MM_DD:
                    result += year > 0 ? year.ToString().PadLeft(4, '_') + "." : "____.";
                    result += month > 0 ? ConvertHelper.AdjustNumber(month, 2) + "." : "__.";
                    result += day > 0 ? ConvertHelper.AdjustNumber(day, 2) : "__";
                    break;

                case DateFormat.dfYYYY:
                    if (year > 0)
                    {
                        result = year.ToString().PadLeft(4, '_');
                    }
                    break;
                }
            }

            if (includeBC && ybc)
            {
                switch (format)
                {
                case DateFormat.dfDD_MM_YYYY:
                    result = result + " BC";
                    break;

                case DateFormat.dfYYYY_MM_DD:
                    result = "BC " + result;
                    break;

                case DateFormat.dfYYYY:
                    result = "BC " + result;
                    break;
                }
            }

            if (showCalendar)
            {
                result = result + GKData.DateCalendars[(int)fCalendar].Sign;
            }

            return(result);
        }
Exemplo n.º 3
0
 public string GetInternalStr()
 {
     return(ConvertHelper.AdjustNumber(Level, 2) + GetOrderStr());
 }
Exemplo n.º 4
0
        internal string GetDataTableName()
        {
            string tableName = "PD" + ConvertHelper.AdjustNumber(Id, 6, '0');

            return(tableName);
        }