Exemplo n.º 1
0
        private void deRegisterPB_click(object sender, EventArgs e)
        {
            passingtext1 = medicalIDLabel.Text;
            passingtext2 = medicalStaffID.Text;
            DeRegister deRegister = new DeRegister();

            deRegister.Show();
        }
Exemplo n.º 2
0
        private void pbRegister_Click(object sender, EventArgs e)
        {
            DatabaseConnertor databaseConnertor = new DatabaseConnertor();

            databaseConnertor.connect();

            rederegister rederegister = new rederegister();

            rederegister.Ms_id           = int.Parse(lbMedicalID.Text);
            rederegister.Register_date   = this.dateTimePicker2.Value;
            rederegister.Register_time   = tbTime.Text;
            rederegister.Deregister_date = this.dateTimePicker1.Value;
            rederegister.Deregister_time = tbDtime.Text;

            rederegisterHandler rederegisterHandler = new rederegisterHandler();
            int recordCnt1 = rederegisterHandler.addReDeregister(databaseConnertor.getconn(), rederegister);

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

            this.Close();
            DeRegister deRegister = new DeRegister();

            deRegister.Show();
        }