Exemplo n.º 1
0
        /// <summary>
        /// CALL CACHE
        /// </summary>
        /// <param name="type"></param>
        /// <param name="id"></param>
        /// <param name="lang"></param>
        /// <returns></returns>
        public static string Get(enumXMListType type, int id, enumLang lang)
        {
            //if (StartAt.AddHours(3) < DateTime.Now)
            if (StartAt.AddMinutes(CacheMinutes) < DateTime.Now)
            {
                //Update();
            }

            switch (type)
            {
            case enumXMListType.Passenger:
                if (PassengerTypes.ContainsKey(id))
                {
                    switch (lang)
                    {
                    case enumLang.ARR: return(PassengerTypes[id][1]);

                    default: return(PassengerTypes[id][0]);
                    }
                }

                return("");

                break;

            case enumXMListType.Ticket:
                if (TicketTypes.ContainsKey(id))
                {
                    switch (lang)
                    {
                    case enumLang.ARR: return(TicketTypes[id][1]);

                    default: return(TicketTypes[id][0]);
                    }
                }
                return("");

                break;

            default: return("");
            }

            return("");
        }
Exemplo n.º 2
0
 public static Result getMsgRes(int id, enumLang lang)
 {
     return(getMsgRes(id, (int)lang));
 }
Exemplo n.º 3
0
 public static string getMsg(int id, enumLang lang)
 {
     return(getMsg(id, (int)lang));
 }
Exemplo n.º 4
0
 public clsEmployee(int ID, string Code, string Fullname, enumGender Gender, enumCityzone Cityzone,
                    string Username, string Password, enumEmployeeType Employeetype, enumLang Lang,
                    string Pic, clsListHouses Houses = null)
 {
     this.ID           = ID;
     this.Fullname     = Fullname;
     this.Gender       = Gender;
     this.Cityzone     = Cityzone;
     this.Code         = Code;
     this.Username     = Username;
     this.Password     = Password;
     this.Employeetype = Employeetype;
     this.Lang         = Lang;
     this.Pic          = Pic;
     this.Houses       = new clsListHouses();
 }