๐จ๐ซ Please watch the top 3 most popular videos on my channel.
๐ฅ 33 Million Views : Programming in Visual Basic .Net How to Connect Access Database to VB.NET : https://youtu.be/cwDqjmSmtMQ
๐ฅ 13 Million Views : Visual Basic .Net : Search in Access Database - DataGridView BindingSource Filter (Part 1/2) : https://youtu.be/UoT2oava9ns
๐ฅ 2 Million Views : Visual Basic .Net : Search in Access Database - DataGridView BindingSource Filter (Part 2/2) : https://youtu.be/e5Dvkw7moWg
๐ฐ Donate $29 USD and Receive a free PDF Source Code of the above project:
✔
https://www.paypal.com/paypalme/CodeAMinute/29USD
๐ง Contact the instructor via this email:
ibasskung@gmail.com
✔ This project is also included: (Export Data To Excel): https://youtu.be/whwQWX4sR7Y
๐ก Premium Online Courses ๐ก
๐
Master Visual Basic .NET and Access Database By Building the Point Of Sale
System (POS)
๐ฒ Enroll Now: https://bit.ly/2WcbRhX
๐ Learn C# and SQL Server 2019 by Building Windows Forms Application with
ADO.NET
๐ฒ Enroll Now: https://bit.ly/37iLrRX
๐ See all courses here: https://bit.ly/2IJPxcm
๐ 4K UHD : Visual C# .NET Project : The Easy Way! - How to Search Data in SQL Server Database File (.mdf) using BindingSource Filter in Visual Studio 2019.
๐ฆ Watch in 4K on YouTube: https://youtu.be/686n651zAxc
๐ Visual Basic .NET version: https://youtu.be/lP2R0sb4qDY
C# Source Code by iBasskung.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CSMDFDatabase
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void employeesBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.employeesBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.myDatabaseDataSet);
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'myDatabaseDataSet.Employees' table. You can move, or remove it, as needed.
this.employeesTableAdapter.Fill(this.myDatabaseDataSet.Employees);
}
private void refreshToolStripButton_Click(object sender, EventArgs e)
{
refreshData();
}
private void refreshData()
{
// Clear filter.
this.employeesBindingSource.Filter = null;
this.employeesTableAdapter.Fill(this.myDatabaseDataSet.Employees);
this.keywordToolStripTextBox.Text = "";
this.keywordToolStripTextBox.Focus();
this.addNewButton.Text = "Add new";
}
private void closeButton_Click(object sender, EventArgs e)
{
// Note: This is a comment.
// Close this window.
this.Close();
}
private void previousButton_Click(object sender, EventArgs e)
{
bindingNavigatorMovePreviousItem.PerformClick();
}
private void NextButton_Click(object sender, EventArgs e)
{
bindingNavigatorMoveNextItem.PerformClick();
}
private void addNewButton_Click(object sender, EventArgs e)
{
bindingNavigatorAddNewItem.PerformClick();
}
private void saveButton_Click(object sender, EventArgs e)
{
employeesBindingNavigatorSaveItem.PerformClick();
}
private void deleteButton_Click(object sender, EventArgs e)
{
bindingNavigatorDeleteItem.PerformClick();
}
private void employeesDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
// Prevent the DataGridView Default Error.
e.Cancel = true;
}
private void searchToolStripButton_Click(object sender, EventArgs e)
{
string strFilter = this.keywordToolStripTextBox.Text.Replace("'", "''");
if (string.IsNullOrEmpty(this.keywordToolStripTextBox.Text))
{
refreshData();
}
else
{
string queryByID = "(Convert(EmployeeID, 'System.String') = '" + strFilter.Trim() + "') ";
string queryByName = "OR (EmployeeName LIKE '%" + strFilter + "%') "; // % Wildcard
string queryByPhone = "OR (MobilePhone LIKE '%" + strFilter + "%') ";
string queryByPage = "OR (FacebookPage LIKE '%" + strFilter + "%') ";
string queryByAddress = "OR (Address LIKE '%" + strFilter + "%')";
StringBuilder joinQuery = new StringBuilder(); // System.Text
joinQuery.Append(queryByID);
joinQuery.Append(queryByName);
joinQuery.Append(queryByPhone);
joinQuery.Append(queryByPage);
joinQuery.Append(queryByAddress);
this.employeesBindingSource.Filter = joinQuery.ToString();
}
}
}
}
๐ See all courses here: https://www.udemy.com/user/tanin-sangngam
⛳ Follow me around ⛳
✔ Want to get updates on new courses or other cool free stuff? Just follow me on social media if that's your thing!๐บ Pages:
๐ https://www.facebook.com/CodeAMinute
๐ https://www.facebook.com/IbasskungTutorial
๐ https://www.facebook.com/codewithibasskung
๐ https://www.facebook.com/iBasskungAcademy
๐บ YouTube:
๐ https://www.youtube.com/c/iBasskung
๐บ Udemy:
๐ https://www.udemy.com/user/tanin-sangngam
๐บ Twitter:
๐ https://twitter.com/IBasskung
๐บ Pinterest:
๐ https://www.pinterest.com/ibasskung
๐บ Blogger:
๐ .NET: https://codeaminute.blogspot.com
๐ JAVA: https://javacodeminutes.blogspot.com
๐ VBA: https://vbacodeminutes.blogspot.com
๐ฏ THANK YOU SO MUCH! ๐ฏ
#CSharp #VisualCSharp #FreeSourceCode #MDF #SQLServer #PointOfSale #POS #VisualStudio


Comments
Post a Comment