private void ශරණලයසතවToolStripMenuItem_Click(object sender, EventArgs e)
        {
            gradeList gl = gradeList.getInstance();

            gl.MdiParent = this;
            gl.Show();
            gl.WindowState     = FormWindowState.Maximized;
            gl.FormBorderStyle = FormBorderStyle.FixedSingle;
        }
示例#2
0
 public static gradeList getInstance()
 {
     if (inst3 == null || inst3.IsDisposed)
     {
         inst3 = new gradeList();
         return(inst3);
     }
     else
     {
         return(inst3);
     }
 }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
            MySqlCommand cmd1 = new MySqlCommand();

            cmd1.CommandText = "DELETE FROM `gradetable` WHERE grade= '" + loaded_grade.ToString() + "';";
            MySqlCommand cmd2 = new MySqlCommand();

            cmd2.CommandText = "INSERT INTO `gradetable`( `grade`, `maximumAge`, `Birthday_After`) VALUES ('" + textBox1.Text + "','" + numericUpDown1.Value.ToString() + "','" + calculateBirthDay(Convert.ToInt32(numericUpDown1.Value.ToString())) + "');";
            cmd1.Connection  = SqlCon.con;
            cmd2.Connection  = SqlCon.con;
            SqlCon.con.Open();
            cmd1.ExecuteNonQuery();
            cmd2.ExecuteNonQuery();
            SqlCon.con.Close();
            gradeList gl = gradeList.getInstance();

            gl.updateDatagridview();
        }
示例#4
0
        private void edit_grades_FormClosed(object sender, FormClosedEventArgs e)
        {
            gradeList gl = gradeList.getInstance();

            gl.Enabled = true;
        }