Exemplo n.º 1
0
        private void ListOfAddedRubricForm_Load(object sender, EventArgs e)
        {
            SqlConnection Connection = new SqlConnection(constr);

            Connection.Open();
            if (Connection.State == ConnectionState.Open)
            {
                string         query  = "select Id,Name from dbo.Clo";
                SqlDataAdapter t      = new SqlDataAdapter(query, Connection);
                DataTable      dtatbl = new DataTable();
                t.Fill(dtatbl);
                combboxCLODetails.DataSource    = dtatbl;
                combboxCLODetails.DisplayMember = "Name";
                combboxCLODetails.ValueMember   = "id";
            }
            Connection.Close();

            ListOfAddedRubricDataGridView.Hide();

            ListOfAddedRubricLeveldataGridView.Hide();

            lblListOfRubricDetails.Hide();
            combboxListOfRubricDetails.Hide();
            lblDtailsRL.Hide();
            combboxRubricLevelDetails.Hide();
            lblMeasurementLevel.Hide();
            txtMeasurementLevel.Hide();
            btnADDRL.Hide();
        }
Exemplo n.º 2
0
        private void btnAddRubric_Click(object sender, EventArgs e)
        {
            lblCLONames.Show();
            combboxCLODetails.Show();
            lblRubricDetails.Show();
            txtRubricDetails.Show();
            btnADDR.Show();

            ListOfAddedRubricDataGridView.Hide();

            ListOfAddedRubricLeveldataGridView.Hide();

            lblListOfRubricDetails.Hide();
            combboxListOfRubricDetails.Hide();
            lblDtailsRL.Hide();
            combboxRubricLevelDetails.Hide();
            lblMeasurementLevel.Hide();
            txtMeasurementLevel.Hide();
            btnADDRL.Hide();
        }
Exemplo n.º 3
0
        private void btnListOfAddedRubrics_Click(object sender, EventArgs e)
        {
            ListOfAddedRubricDataGridView.Show();

            lblCLONames.Hide();
            combboxCLODetails.Hide();
            lblRubricDetails.Hide();
            txtRubricDetails.Hide();
            btnADDR.Hide();

            ListOfAddedRubricLeveldataGridView.Hide();

            lblListOfRubricDetails.Hide();
            combboxListOfRubricDetails.Hide();
            lblDtailsRL.Hide();
            combboxRubricLevelDetails.Hide();
            lblMeasurementLevel.Hide();
            txtMeasurementLevel.Hide();
            btnADDRL.Hide();


            using (SqlConnection con = new SqlConnection(constr))
            {
                using (SqlCommand cmd = new SqlCommand("SELECT * FROM dbo.Rubric", con))
                {
                    cmd.CommandType = CommandType.Text;
                    using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
                    {
                        using (DataTable dt = new DataTable())
                        {
                            sda.Fill(dt);
                            ListOfAddedRubricDataGridView.DataSource = dt;
                        }
                    }
                }
            }
        }