protected void Page_Load(object sender, EventArgs e)
    {
        this.progCode = IMBC.FW.Util.WebUtil.GetRequestQueryString("progCode", "");
        this.receiver = IMBC.FW.Util.WebUtil.GetRequestQueryString("receiver", "");

        ArrayList al = this.getUser();

        for (int i = 0; i < al.Count; i++)
        {
            if (receiverNm.Text != "")
            {
                receiverNm.Text += ", ";
            }
            receiverNm.Text += ((NoteUser)al[i]).userNm;
        }

        if (!IsPostBack)
        {
            NoteData         data = new NoteData();
            RadioProgramInfo prog = data.RetrieveProgramInfo(this.progCode);
            ViewState["subClassCode"] = prog.subClassCode;
            this.progTitle.Text       = prog.progTitle;
            this.progImg.ImageUrl     = NoteUtil.GetProgImg(this.progCode, prog.progImage);
        }
    }
Beispiel #2
0
    /// <summary>
    /// 라디오 프로그램 정보
    /// </summary>
    /// <param name="progCode">프로그램코드</param>
    /// <returns>프로그램 정보</returns>
    public RadioProgramInfo RetrieveProgramInfo(string progCode)
    {
        RadioProgramInfo prog = new RadioProgramInfo();

        SqlConnection conn = DbConnection.DbCon;

        SQLHelper.OpenConnection(conn);


        SqlCommand sqlCmd = new SqlCommand();

        sqlCmd.CommandText = "music_RetrieveProgramInfo";
        sqlCmd.CommandType = CommandType.StoredProcedure;

        sqlCmd.Parameters.Add("@progCode", SqlDbType.VarChar, 13).Value = progCode;

        SqlDataReader reader = SQLHelper.ExecuteReader(conn, sqlCmd);

        if (reader.Read())
        {
            prog.progCode     = progCode;
            prog.subClassCode = reader["SUBCLASS_CODE"].ToString();
            prog.progTitle    = reader["prog_title"].ToString();
            prog.progImage    = reader["prog_image"].ToString();
        }

        reader.Close();

        SQLHelper.CloseConnection(conn);


        return(prog);
    }