コード例 #1
0
        void BindPrinyal(SqlConnection conn)
        {
            SqlCommand cmd = new SqlCommand("select ui.Family, ui.[IO], ui.UserId from UserInfo ui " +
                                            "join Zayavky z on ui.UserId=z.Prinyal " +
                                            "group by ui.Family, ui.[IO], ui.UserId", conn);
            SqlDataReader reader = cmd.ExecuteReader();

            while (reader.Read())
            {
                if (!(reader[0] is DBNull))
                {
                    prinyalData.Add(new PersonData()
                    {
                        Title = reader[0].ToString() + " " + reader[1].ToString(),
                        Id    = reader[1].ToString()
                    });
                }
            }
            reader.Close();
            if (!IsPostBack)
            {
                Prinyal.DataSource = prinyalData;
                Prinyal.DataBind();
            }
        }
コード例 #2
0
 protected void Button10_Click(object sender, EventArgs e)
 {
     PlaceHolder10.Visible = !PlaceHolder10.Visible;
     if (PlaceHolder10.Visible)
     {
         Prinyal.FindControl("SelectAll").Focus();
     }
 }