Ejemplo n.º 1
0
        private void btnGENER_Click(object sender, EventArgs e)
        {
            payroll pr = new payroll();

            try
            {
                if (txtrates.Text == "")
                {
                    MessageBox.Show("please insert  hours rates");

                    return;
                }
                else if (txthours.Text == "")
                {
                    MessageBox.Show("please insert Houres Worked");

                    return;
                }
                pr.EmployeeID  = Convert.ToInt32(txtId.Text);
                pr.Empfullname = txtName.Text;
                pr.Empsalary   = txtNETPAY.Text;
                pr.Day         = lblday2.Text;

                pr.insert();
                MessageBox.Show("Report Generated");
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void btnret_Click(object sender, EventArgs e)
        {
            payroll ret = new payroll();

            try
            {
                if (txtId.Text == "")
                {
                    MessageBox.Show("please insert the ID");

                    return;
                }
                else
                {
                    int aid = Convert.ToInt32(txtId.Text);
                    ret.Retrieve2(aid);

                    txtName.Text = ret.EmpFirstName;
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
                return;
            }
        }
Ejemplo n.º 3
0
        private void PayrollForm_Load(object sender, EventArgs e)
        {
            lblday2.Text = DateTime.Now.DayOfWeek.ToString();
            payroll ret = new payroll();

            dgvPayroll.DataSource = ret.showrecord();
            txtId.MaxLength       = 3;
            txthours.MaxLength    = 2;
            txtrates.MaxLength    = 4;
            txtName.Enabled       = false;
            txtGROSSPAY.Enabled   = false;
            txtmedallow.Enabled   = false;
            txtTAXES.Enabled      = false;
        }