private void empty_all() { searchTB.Text = ""; anySearchRB.Checked = true; searchB_Click(s, EventArgs.Empty); //column null studentIdL.Text = ""; classRollTB.Text = ""; registrationTB.Text = ""; studentNameTB.Text = ""; fatherNameTB.Text = ""; motherNameTB.Text = ""; addressTB.Text = ""; sexCB.SelectedIndex = 0; religionTB.Text = ""; degreeCB.SelectedIndex = 0; mobileTB.Text = ""; phoneTB.Text = ""; emailTB.Text = ""; bloodGroupCB.SelectedIndex = 0; roomTB.Text = ""; //for form load part il.load(hallNameCB, "hall_info", "hall_name"); il.load(deptNameCB, "dept_info", "dept_name"); il.load(facultyNameCB, "faculty_info", "faculty_name"); il.load(qoutaCB, "qouta", "qouta_name"); addedByL.Text = ""; currentStudentRB.Checked = true; studentPB.ImageLocation = ""; }
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"); }
private void room_Load(object sender, EventArgs e) { il.load(hallCB, "SELECT hall_name from hall_info"); hallCB.SelectedItem = hallName; il.load(roomCB, "SELECT distinct(room) from seat"); roomCB.SelectedItem = roomNo; }
private void hallSearchRB_CheckedChanged(object sender, EventArgs e) { hallCB.Visible = true; deptCB.Visible = false; facultyCB.Visible = false; qoutaCB.Visible = false; il.load(hallCB, "hall_info", "hall_name"); }
private void empty_all() { String hall_query = "SELECT hall_name from hall_info"; bi.load(searchHallCB, hall_query); String hallid = bi.get_value("SELECT hall_id from hall_info where hall_name='" + searchHallCB.SelectedItem + "' "); bi.load(searchRoomCB, "SELECT room from seat where hall_id=" + hallid + ""); roomidL.Text = ""; roomNoTB.Text = ""; capacityTB.Text = ""; bi.load(hall_name_CB, hall_query); }
private void addDeptRB_CheckedChanged(object sender, EventArgs e) { if (addDeptRB.Checked) { searchDeptCB.Visible = false; groupBox2.Enabled = true; addDeptB.Enabled = true; updateDeptB.Enabled = false; deleteDeptB.Enabled = false; deptIdL.Text = "ID will be automatically generated"; deptNameTB.Text = ""; bi.load(facultyNameCB, "faculty_info", "faculty_name"); } }
private void searchFacultyToDeleteRB_CheckedChanged(object sender, EventArgs e) { if (searchFacultyToDeleteRB.Checked) { searchFacultyCB.Visible = true; bi.load(searchFacultyCB, "faculty_info", "faculty_name"); groupBox2.Enabled = false; addFacultyB.Enabled = false; updateFacultyB.Enabled = false; deleteFacultyB.Enabled = false; } if (searchFacultyCB.Items.Count != 0) { groupBox2.Enabled = false; addFacultyB.Enabled = false; updateFacultyB.Enabled = false; deleteFacultyB.Enabled = true; } }
private void searchHallToDeleteRB_CheckedChanged(object sender, EventArgs e) { if (searchHallToDeleteRB.Checked) { searchHallCB.Visible = true; bi.load(searchHallCB, "hall_info", "hall_name"); groupBox2.Enabled = false; addHallB.Enabled = false; updateHallB.Enabled = false; deleteHallB.Enabled = false; } if (searchHallCB.Items.Count != 0) { groupBox2.Enabled = false; addHallB.Enabled = false; updateHallB.Enabled = false; deleteHallB.Enabled = true; } }
private void searchQoutaToDeleteRB_CheckedChanged(object sender, EventArgs e) { if (searchQoutaToDeleteRB.Checked) { searchQoutaCB.Visible = true; bi.load(searchQoutaCB, "qouta", "qouta_name"); groupBox2.Enabled = false; addQoutaB.Enabled = false; updateQoutaB.Enabled = false; deleteQoutaB.Enabled = false; } if (searchQoutaCB.Items.Count != 0) { groupBox2.Enabled = false; addQoutaB.Enabled = false; updateQoutaB.Enabled = false; deleteQoutaB.Enabled = true; } }
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); } }
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); } }
private void deleteUserForm_Load(object sender, EventArgs e) { bi.load(userNameCB, "SELECT `username` FROM `user`"); }