private void btnEditDirectSales_Click(object sender, RoutedEventArgs e)
        {
            salesOfficeToUpdate = dgvSalesOffice.SelectedItem as SalesOffices;

            if (salesOfficeToUpdate != null)
            {
                txtOfficeName.Text  = salesOfficeToUpdate.OfficeName;
                txtDescription.Text = salesOfficeToUpdate.Description;

                btnSave.Visibility   = Visibility.Hidden;
                btnUpdate.Visibility = Visibility.Visible;
            }
        }
        private async void saveRecord()
        {
            try
            {
                conDB = new ConnectionDB();
                MongoClient  client = conDB.initializeMongoDB();
                var          db     = client.GetDatabase("DBFH");
                SalesOffices so     = new SalesOffices();
                so.OfficeName  = txtOfficeName.Text;
                so.Description = txtDescription.Text;

                var collection = db.GetCollection <SalesOffices>("SalesOffices");
                collection.InsertOne(so);
            }
            catch (Exception ex)
            {
                await window.ShowMessageAsync("ERROR", "Caused by: " + ex.StackTrace);
            }
        }