Пример #1
0
        private void txtRoom_Click(object sender, EventArgs e)
        {
            KIDS_CheckIn_System.checkin.frmRoomList frm = new checkin.frmRoomList();

            frm.Tag = this.Text;
            if(frm.ShowDialog()== System.Windows.Forms.DialogResult.OK)
            {
                this.Tag = frm.Tag;
                frmLogin_Load(null, null);

            }
        }
Пример #2
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            string kidID = dgvAttendance.CurrentRow.Cells["KidID"].Value.ToString();
            if(js.showQuestion("Are you sure you want to Transfer " + txtName.Text + " to other room?")== System.Windows.Forms.DialogResult.Yes)
            {
                tmrReader.Enabled = false;
                frmOverride overrider = new frmOverride();

                if(overrider.ShowDialog()== System.Windows.Forms.DialogResult.OK)
                {
                    checkin.frmRoomList frm = new checkin.frmRoomList();
                    frm.Tag = this.Text;

                    if(frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        string id = js.Lookup("fldID","tblRoom","fldRoom='" + frm.Tag + "'");

                        string q = "UPDATE tblAttendance SET fldRoomID='" + id + "' WHERE fldID='" + AttendanceID + "'";

                        js.ExecuteNonQuery(q);

                        this.Tag = frm.Tag;
                        frmLogin_Load(null, null);

                    }
                }
            }
            tmrReader.Enabled = true;
        }