public RestaurantServicesDataAccessTests(ITestOutputHelper testOutputHelper) { _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; _testOutputHelper = testOutputHelper; _restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); }
private void removeRestaurantBtn_Click(object sender, EventArgs e) { string _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; RestaurantServices restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); restaurantServices.Delete(resm); Lrf.Reload(); }
public void Reload() { restaurantPanel.Controls.Clear(); string _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; RestaurantServices restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); restaurantList = (List <RestaurantModel>)restaurantServices.GetAll(); AddRestaurantList(restaurantList); }
public ListRestaurantsForm() { InitializeComponent(); string _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; RestaurantServices restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); restaurantList = (List <RestaurantModel>)restaurantServices.GetAll(); AddRestaurantList(restaurantList); }
private void addRestaurantBtn_Click(object sender, EventArgs e) { string restaurantName = restaurantNameTB.Text; string restaurantAddress = restaurantAddressTB.Text; string _connectionString = "Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\OO_PocketGourmet_REAL-UnitTest\MVPDB.sqlite;"; RestaurantServices restaurantServices = new RestaurantServices(new RestaurantRepository(_connectionString), new ModelDataAnnotationCheck()); RestaurantModel restaurant = new RestaurantModel() { RestaurantName = restaurantName, RestaurantAddress = restaurantAddress, }; restaurantServices.Add(restaurant); MessageBox.Show("Restaurant Added"); }
public EditRestoPage() { InitializeComponent(); myService = new RestaurantServices(); }
public AddRestaurantPage() { InitializeComponent(); myService = new RestaurantServices(); }
public DaftarRestaurant() { InitializeComponent(); restoService = new RestaurantServices(); }
public ListSqLitePage() { InitializeComponent(); myDataAccess = new DataAccess(); myRestoService = new RestaurantServices(); }