示例#1
0
        private double handleException(Title t)
        {
            double r = 0;

            switch (Society.getSociety().Country)
            {
            case "DKK":
                switch (t.Currency)
                {
                case "EUR":
                    r = 0.0239;
                    break;

                case "LVL":
                    r = 0.0266;
                    break;

                case "BGN":
                    r = 0.0345;
                    break;
                }
                break;

            case "LVL":
                switch (t.Currency)
                {
                case "EUR":
                    r = 0.0264;
                    break;

                case "LTL":
                    r = 0.0291;
                    break;

                case "BGN":
                    r = 0.0370;
                    break;
                }
                break;

            case "LTL":
                switch (t.Currency)
                {
                case "EUR":
                    r = 0.026;
                    break;

                case "BGN":
                    r = 0.013;
                    break;
                }
                break;

            case "BGN":
                if (t.Currency == "EUR")
                {
                    r = 0.0104;
                }
                break;
            }
            return(r);
        }
示例#2
0
 protected static bool inChangeModule(Title t)
 {
     return(t.Country != Society.getSociety().Country);
 }
示例#3
0
 public static Society getSociety(String name = null, String country = null, String currency=null)
 {
     if (name != null && country != null && currency!=null)
         society = new Society(name, country, currency);
     return society;
 }