-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmEmployeeAttendanceRecords.cs
77 lines (68 loc) · 2.35 KB
/
frmEmployeeAttendanceRecords.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using Excel = Microsoft.Office.Interop.Excel;
namespace School_Software
{
public partial class frmEmployeeAttendanceRecords : Form
{
SqlDataReader rdr = null;
DataTable dtable = new DataTable();
SqlConnection con = null;
SqlCommand cmd = null;
DataTable dt = new DataTable();
Connectionstring cs = new Connectionstring();
frmEmployeeAttendanceEntry frm = null;
public frmEmployeeAttendanceRecords()
{
InitializeComponent();
}
public frmEmployeeAttendanceRecords(frmEmployeeAttendanceEntry par)
{
frm = par;
InitializeComponent();
}
public void Auto()
{
}
private void frmEmployeeAttendanceRecords_Load(object sender, EventArgs e)
{
Auto();
}
private void DataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
string strRowNumber = (e.RowIndex + 1).ToString();
SizeF size = e.Graphics.MeasureString(strRowNumber, this.Font);
if (DataGridView1.RowHeadersWidth < Convert.ToInt32((size.Width + 20)))
{
DataGridView1.RowHeadersWidth = Convert.ToInt32((size.Width + 20));
}
Brush b = SystemBrushes.ButtonHighlight;
e.Graphics.DrawString(strRowNumber, this.Font, b, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + ((e.RowBounds.Height - size.Height) / 2));
}
public void reset()
{
txtemployeeName.Text = "";
dtpDateFrom.Text = System.DateTime.Now.ToString();
dtpDateTo.Text = System.DateTime.Now.ToString();
DataGridView1.Rows.Clear();
Auto();
}
private void button4_Click(object sender, EventArgs e)
{
reset();
}
private void button10_Click(object sender, EventArgs e)
{
}
private void txtemployeeName_TextChanged(object sender, EventArgs e)
{
}
}
}