Example #1
0
        private void CheckVersionApp()
        {
#if DEBUG
            return;
#endif

            //Phát Check version
            BSGCURRENTVERSIONController bSGCURRENTVERSIONController = new BSGCURRENTVERSIONController();
            List <BSGCURRENTVERSION>    bSGCURRENTVERSIONs          = new List <BSGCURRENTVERSION>();
            bSGCURRENTVERSIONs = bSGCURRENTVERSIONController.BSGCURRENTVERSIONSelect();
            if (bSGCURRENTVERSIONs.Count > 0)
            {
                //Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
                string version = ClientCommon.GetVersion();
                if (bSGCURRENTVERSIONs[0].CurrentVersion != version)
                {
                    MessageBoxHelper.ShowErrorMessage("Lỗi version! Vui lòng liên hệ nhà sản xuất!");
                    this.Close();
                }
            }
        }