Ejemplo n.º 1
0
        private void SecretaryMSGSending_Load(object sender, EventArgs e)
        {
            comboBox1.Items.Clear();
            comboBox1.Items.Add("All");
            SqlConnection conn = new SqlConnection(constring);

            conn.Open();
            SqlCommand cmd1 = conn.CreateCommand();

            cmd1.CommandType = CommandType.Text;
            cmd1.CommandText = "select Name from Students";
            cmd1.ExecuteNonQuery();
            DataTable      dt1 = new DataTable();
            SqlDataAdapter da1 = new SqlDataAdapter(cmd1);

            da1.Fill(dt1);
            foreach (DataRow dr in dt1.Rows)
            {
                comboBox1.Items.Add(dr["Name"].ToString());
            }
            conn.Close();
            label4.Text = "Hello, " + secretary.getName() + " Send a message please:";
        }
Ejemplo n.º 2
0
 private void SecretaryReplyMSG_Load(object sender, EventArgs e)
 {
     label3.Text = "Name: " + student.getName() + ", Department: " + student.getDep();
     label1.Text = "Hello, " + secretary.getName() + "Send a message please:";
 }
Ejemplo n.º 3
0
 private void SecreteryMenu_Load(object sender, EventArgs e)
 {
     label1.Text = "Welcome, " + secretary.getName();
 }