Simple Payroll System Programming
Simple Payroll System Programming
Form1.cs
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;
namespace WindowsFormsApplication2
{
public partial class frm_login : Form
{
public frm_login()
{
InitializeComponent();
}
if (dtbl.Rows.Count == 1)
{
this.Hide();
a.Show();
}
}
private void button2_Click_1(object sender, EventArgs e)
{
Application.Exit();
}
AcceptButton.PerformClick();
}
}
}
}
Form1.cs [DESIGN]
mainform.cs
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;
namespace WindowsFormsApplication2
{
public partial class mainform : Form
{
SqlConnection con = new SqlConnection("Data Source=insert PC here;Initial
Catalog=payroll_db;Integrated Security=True");
SqlCommand cmd = new SqlCommand();
public mainform()
{
InitializeComponent();
}
ClearAllText(this);
cb_gen.SelectedIndex = -1;
cb_rate.SelectedIndex = -1;
cb_stat.SelectedIndex = -1;
}
private void mainform_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'payroll_dbDataSet.tbl_addemp'
table. You can move, or remove it, as needed.
this.tbl_addempTableAdapter.Fill(this.payroll_dbDataSet.tbl_addemp);
}
}
}
mainform.cs [DESIGN]