Beispiel #1
0
        private void button20_Click(object sender, EventArgs e)
        {
            DbConnecter dbConn = new DbConnecter();

            dbConn.connect();

            Labourer labr = new Labourer();

            labr.Name   = textBox2.Text;
            labr.Age    = Convert.ToInt32(numericUpDown1.Value);
            labr.Gender = comboBox4.Text;

            LabourerHandler labHnd    = new LabourerHandler();
            int             recordCnt = labHnd.addNewLabourer(dbConn.getConn(), labr);

            MessageBox.Show(recordCnt + " record has been inserted !! ");
        }
Beispiel #2
0
        private void button19_Click(object sender, EventArgs e)
        {
            DbConnecter dbConn = new DbConnecter();

            dbConn.connect();

            Labourer labr = new Labourer();

            labr.Name   = "Adam";
            labr.Age    = 30;
            labr.Gender = "male";

            LabourerHandler labHnd    = new LabourerHandler();
            int             recordCnt = labHnd.addNewLabourer(dbConn.getConn(), labr);

            MessageBox.Show(recordCnt + " record has been inserted !! ");
        }