//load table data
        private void initTableData()
        {
            if (!ReadWriteData.checkTableSizeFileExist())
            {
                ReadWriteData.writeTableSize("30-30");
            }

            if (!ReadWriteData.checkTableImagePathFileExist())
            {
                ReadWriteData.writeTableImagePath(startupProjectPath + "\\Images\\3dmap.png");
            }

            initBackgroundTable(ReadWriteData.readTableImagePath());

            currentTableList = _unitofwork.TableRepository.Get().ToList();

            readTableData();
        }
        //browse table image
        private void btnBrowseImage_Click(object sender, RoutedEventArgs e)
        {
            string         browseFileName = "";
            string         browseFilePath = "";
            OpenFileDialog browseFile     = new OpenFileDialog();

            browseFile.DefaultExt = ".";
            browseFile.Filter     = "All Image Files (*.png, *.jpg, *.jpeg)|*.png; *.jpg; *.jpeg"; // " | JPEG Files (*.jpeg)|*.jpeg | PNG Files (*.png)|*.png | JPG Files (*.jpg)|*.jpg";
            Nullable <bool> result = browseFile.ShowDialog();

            if (result == true)
            {
                browseFileName = browseFile.SafeFileName;
                browseFilePath = browseFile.FileName;

                ReadWriteData.writeTableImagePath(browseFilePath);
                initBackgroundTable(ReadWriteData.readTableImagePath());
            }
        }
        //method khoi tao table image
        private void initBackgroundTable(string fileName)
        {
            try
            {
                //ImageBrush backImg = new ImageBrush(new BitmapImage(new Uri(BaseUriHelper.GetBaseUri(this), fileName)));
                //backImg.Stretch = Stretch.Fill;
                //this.Background = backImg;
                imgTable.Source = new BitmapImage(new Uri(BaseUriHelper.GetBaseUri(this), fileName));
            }
            catch (Exception ex)
            {
                MessageBoxResult mess = MessageBox.Show("Table Image File: \"" + fileName + "\" is not found! Do you want to add new Table Image?", "Warning! Something went wrong!", MessageBoxButton.YesNo);
                if (mess == MessageBoxResult.Yes)
                {
                    string         browseFileName = "";
                    string         browseFilePath = "";
                    OpenFileDialog browseFile     = new OpenFileDialog();
                    browseFile.DefaultExt = ".";
                    browseFile.Filter     = "All Image Files (*.png, *.jpg, *.jpeg)|*.png; *.jpg; *.jpeg"; // " | JPEG Files (*.jpeg)|*.jpeg | PNG Files (*.png)|*.png | JPG Files (*.jpg)|*.jpg";
                    Nullable <bool> result = browseFile.ShowDialog();

                    if (result == true)
                    {
                        browseFileName = browseFile.SafeFileName;
                        browseFilePath = browseFile.FileName;

                        ReadWriteData.writeTableImagePath(browseFilePath);
                        initBackgroundTable(ReadWriteData.readTableImagePath());
                    }
                }
                if (mess == MessageBoxResult.No)
                {
                    ReadWriteData.writeTableImagePath("C:\\Program Files\\ITComma\\Asowel POS\\documents\\3dmap.jpg");
                    initBackgroundTable(ReadWriteData.readTableImagePath());
                }
            }
        }