private void Edit_button_Click(object sender, EventArgs e)
        {
            editTemplate edit     = new editTemplate();
            editMenu     fillEdit = new editMenu();

            edit.addEditTemplateName(cbCl.Text);
            edit.getLatestEditTemplateID();
            edit.getLatestEditSectionID();
            edit.getLastestEditOptionsID();
            fillEdit.createTBEditTemplate();
            fillEdit.fillEditTemplate();
            fillEdit.fillEditSection();
            fillEdit.fillEditOption();
            fillEdit.fillEditOptionComment();
            fillEdit.ShowDialog();
        }
Beispiel #2
0
        public void makeTemplateOption(string sqlQuery, int sID)
        {
            SqlCommand command = new SqlCommand();

            command.CommandType = CommandType.Text;
            command.CommandText = sqlQuery;
            editMenu menuEdit = new editMenu();

            command.Parameters.AddWithValue("@sectID", sID);

            openConnection();
            command.Connection = connectionToDB;

            using (SqlDataReader fillRead = command.ExecuteReader())
            {
                while (fillRead.Read())
                {
                    menuEdit.createFillEditOption();
                }
            }

            closeConnection();
        }