예제 #1
0
        private void btn_hack_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmmainmenu frm1 = new frmmainmenu();

            frm1.Show();
        }
예제 #2
0
        private void msgshow()
        {
            string check = "";

            for (int n = 0; n < dataGridView1.Rows.Count; n++)
            {
                check   = dataGridView1.Rows[n].Cells[5].Value.ToString();
                mymail  = dataGridView1.Rows[n].Cells[0].Value.ToString();
                gurmail = dataGridView1.Rows[n].Cells[1].Value.ToString();
                myname  = dataGridView1.Rows[n].Cells[2].Value.ToString();
                string myfname = dataGridView1.Rows[n].Cells[3].Value.ToString();
                string myroll  = dataGridView1.Rows[n].Cells[4].Value.ToString();

                {
                    if (check != "True")
                    {
                        con.Open();
                        OleDbCommand cmd = new OleDbCommand("insert into absentdata (studentid, stu_name, stu_fname, period, absenton) values ('" + myroll.ToString() + "','" + myname.ToString() + "','" + myfname.ToString() + "','" + cmb_period.Text.ToString() + "','" + DateTime.Now.ToShortDateString() + "')", con);
                        cmd.ExecuteNonQuery();
                        con.Close();
                        msgsent();
                    }
                }
            }
            frmmainmenu mainmenu = new frmmainmenu();

            this.Hide();
            mainmenu.Show();
        }
예제 #3
0
        private void btn_delete_Click(object sender, EventArgs e)
        {
            DialogResult result = new DialogResult();

            result = MessageBox.Show("Are you sure to Delete the current Record", "Delete Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (result == DialogResult.Yes)
            {
                con.Open();
                OleDbCommand cmd  = new OleDbCommand("delete from student where enrol='" + cmb_enrol.Text.ToString() + "'", con);
                int          temp = cmd.ExecuteNonQuery();
                if (temp > 0)
                {
                    MessageBox.Show("Record Delete Successfully");
                }
                else
                {
                    MessageBox.Show("Sorry Record not deleted");
                }
                con.Close();
                this.Hide();
                frmmainmenu frm1 = new frmmainmenu();
                frm1.Show();
            }
        }