Пример #1
0
        public static void init()
        {
            Constants.oldVersion = Constants.getDefaultVersion();
            Constants.newVersion = Constants.getDefaultNewVersion();

            SessionTable version = App.Database.GetItem(DBConstants.ID_APP_VERSION);

            if (version != null)
            {
                Constants.oldVersion = JObject.Parse(version.JSON_DATA).ToObject <AppVersion>();
            }
            GetAppVersionRs res = MetaDataService.getInstance().CallGetAppVersion();

            if (res != null)
            {
                Constants.newVersion = res.appVersion;
            }

            TempDB.setCodeDescriptions();
            init_Member();
            init_User();
            init_Branch();
            Constants.APPLICATION_LANGUAGE = getLanguageFromDB();

            if (TempDB.flagUpdateAppVersion)
            {
                App.Database.SaveItem(DBConstants.ID_APP_VERSION, JsonConvert.SerializeObject(Constants.newVersion));
            }
            Constants.setUIReturn();
        }
Пример #2
0
        public static void init_Member()
        {
            if (Constants.isAppForMember())
            {
                TempDB.setProvinces();
                TempDB.setDistrict();
                TempDB.setBranches();
                TempDB.setServices();

                SessionModel.loginMember = getMemberFormDB();
                if (SessionModel.loginMember != null)
                {
                    UIReturn uiReturn = ReserveQController.getInstance().getMemberSession(SessionModel.loginMember);
                }
            }
        }