TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
james james
NA
419
30k
C# winform access database search multi datagrid for date
Jan 1 2018 8:35 PM
Happy New Year to all,
I have a winform with 7 tabs (Tab Control) 6 of them have a datagrid with different information. The 7th tab has all the datagrid on it.
I need to enter a date on the 7th tab that will retrieve all information from that date for each grid button click. The Access database has 6 tables, the code is as simple as it gets to store information.
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
Shift_End_Report
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
// TODO: This line of code loads data into the 'shift_End_Report_3DataSet.Restriction_Accommodation' table. You can move, or remove it, as needed.
this
.restriction_AccommodationTableAdapter.Fill(
this
.shift_End_Report_3DataSet.Restriction_Accommodation);
// TODO: This line of code loads data into the 'shift_End_Report_3DataSet.Open_Part_Issues' table. You can move, or remove it, as needed.
this
.open_Part_IssuesTableAdapter.Fill(
this
.shift_End_Report_3DataSet.Open_Part_Issues);
// TODO: This line of code loads data into the 'shift_End_Report_3DataSet.SSAR' table. You can move, or remove it, as needed.
this
.sSARTableAdapter.Fill(
this
.shift_End_Report_3DataSet.SSAR);
// TODO: This line of code loads data into the 'shift_End_Report_3DataSet.Hot_Calls' table. You can move, or remove it, as needed.
this
.hot_CallsTableAdapter.Fill(
this
.shift_End_Report_3DataSet.Hot_Calls);
// TODO: This line of code loads data into the 'shift_End_Report_3DataSet.Attendance' table. You can move, or remove it, as needed.
this
.attendanceTableAdapter.Fill(
this
.shift_End_Report_3DataSet.Attendance);
// TODO: This line of code loads data into the 'shift_End_Report_3DataSet.Part_Shortage' table. You can move, or remove it, as needed.
this
.part_ShortageTableAdapter.Fill(
this
.shift_End_Report_3DataSet.Part_Shortage);
}
#region Part Shortage Buttons
private
void
btn_PS_Add_Click(
object
sender, EventArgs e)
{
this
.partShortageBindingSource.AddNew();
}
private
void
btn_PS_Save_Click(
object
sender, EventArgs e)
{
this
.Validate();
this
.partShortageBindingSource.EndEdit();
this
.part_ShortageTableAdapter.Update(
this
.shift_End_Report_3DataSet);
this
.part_ShortageTableAdapter.Fill(
this
.shift_End_Report_3DataSet.Part_Shortage);
}
private
void
btn_PS_Next_Click(
object
sender, EventArgs e)
{
this
.partShortageBindingSource.MoveNext();
}
private
void
btn_PS_Previous_Click(
object
sender, EventArgs e)
{
this
.partShortageBindingSource.MovePrevious();
}
private
void
btn_PS_Delete_Click(
object
sender, EventArgs e)
{
this
.partShortageBindingSource.RemoveCurrent();
}
private
void
btn_PS_Exit_Click(
object
sender, EventArgs e)
{
var result = MessageBox.Show(
"Are you sure you would like to exit?"
,
"Closing Program"
,
MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if
(result == DialogResult.Yes)
{
Application.Exit();
}
#endregion
}
#region Attendance Buttons
#endregion
#region Hot Sheet Button
#endregion
}
#region SSAR Buttons
#endregion
}
#region Open Part Button
#endregion
}
#region Restriction Buttons
#endregion
}
private
void
btn_Date_Click(
object
sender, EventArgs e)
{
}
}
}
Reply
Answers (
1
)
Wish a Happy new year to all the members of our team
how to send codes via call ?