Beispiel #1
0
 private void coupon_Load(object sender, EventArgs e)
 {
     Basic.information_load il = new Basic.information_load();
     il.load(hallNameCB, "hall_info", "hall_name");
     //SELECT DISTINCT (`session`)FROM `student_info`ORDER BY `student_info`.`session` ASC
     il.load(sessionCB, "student_info", "session");
 }
Beispiel #2
0
        private void deleteDeptB_Click(object sender, EventArgs e)
        {
            try
            {
                //add delete query string and delete command run

                string deleteQuery = "delete from dept_info where dept_id='" + deptIdL.Text.ToString() + "' ";
                df.Delete(deleteQuery);
                // end of add delete query string and delete command run
                Basic.information_load bn = new Basic.information_load();
                bn.load(searchDeptCB, "dept_info", "dept_name");
            }
            catch (Exception ee)
            {
                MessageBox.Show("Error Occured. Message - " + ee.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void updateQoutaB_Click(object sender, EventArgs e)
        {
            if (qoutaNameTB.Text == "")
            {
                MessageBox.Show("Please fill up the qouta Name. ", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                qoutaNameTB.Focus();
                return;
            }
            try
            {
                // start of update command run
                string updateQuery = "update qouta set qouta_name='" + qoutaNameTB.Text.ToString() + "' where qouta_id='" + qoutaIdL.Text.ToString() + "'";
                df.Update(updateQuery);
                //end of update command runn

                Basic.information_load bn = new Basic.information_load();
                bn.load(searchQoutaCB, "qouta", "qouta_name");
            }
            catch (Exception ee)
            {
                MessageBox.Show("Error Occured. Message - " + ee.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #4
0
        private void updateDeptB_Click(object sender, EventArgs e)
        {
            if (deptNameTB.Text == "")
            {
                MessageBox.Show("Please fill up the dept Name. ", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                deptNameTB.Focus();
                return;
            }
            try
            {
                // start of update command run
                string updateQuery = "update dept_info set dept_name='" + deptNameTB.Text.ToString() + "', faculty_id='" + facultyNameCB.SelectedItem.ToString() + "' where dept_id='" + deptIdL.Text.ToString() + "'";
                df.Update(updateQuery);
                //end of update command runn

                Basic.information_load bn = new Basic.information_load();
                bn.load(searchDeptCB, "dept_info", "dept_name");
                bn.load(facultyNameCB, "faculty_info", "faculty_name");
            }
            catch (Exception ee)
            {
                MessageBox.Show("Error Occured. Message - " + ee.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }