Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HtmlForm form1 = (HtmlForm)Master.FindControl("form1");

                form1.Method  = "post";
                form1.Enctype = "multipart/form-data";
                //form1.Action = "Test.aspx";

                Common_NTx_Dac ddlSet = new Common_NTx_Dac();

                // 게시판 카테고리 필드
                DataTable BoardCategorydt = null;
                BoardCategorydt = ddlSet.TOTALBBS_BOARD_CATEGORY_INFO_SEL(0);
                int ddlBoardCategorySeletedValue = IntegerUtil.intValid(this.ddlBoardCategory.SelectedValue, 0);

                // 게시판 카테고리 필드 - DropDownList
                if (BoardCategorydt.Rows.Count == 0)
                {
                    this.ddlWriteCategory.Items.Clear();
                    this.ddlBoardCategory.Items.Add(new ListItem("등록된 카테고리가 없습니다.", ""));
                    this.ddlBoardCategory.Enabled = false;
                }
                else
                {
                    this.ddlBoardCategory.Items.Clear();
                    //this.ddlBoardCategory.Items.Add(new ListItem("선택하세요", "0")); // 기본값
                    //DropDownListUtil.SetDropDownList(BoardCategorydt, this.ddlBoardCategory, "strCateName", "intIdx");
                    DropDownListUtil.SetDropDownListValue(BoardCategorydt, this.ddlBoardCategory, this.ddlBoardCategory.SelectedValue, DropDownListUtil.DropDownFlag.Select);
                }
            }
        }
Esempio n. 2
0
        private void GetPageDefaultSetting()
        {
            this.ltTitle.Text      = "게시글 관리";
            this.ltTotalPosts.Text = "전체 게시글 수";

            #region [버튼 설정]
            this.lbtnCreate.Text = "<span>등록</span>";
            this.lbtnSearch.Text = "<span>검색</span>";

            #endregion

            #region [DropDownList 설정]
            this.FIELD.Items.Clear();
            this.FIELD.Items.Add(new ListItem("작성자", "WRITER"));
            this.FIELD.Items.Add(new ListItem("제목", "SUBJECT"));

            Common_NTx_Dac ddlSet = new Common_NTx_Dac();

            // 게시판 카테고리 필드
            BoardCategorydt = ddlSet.TOTALBBS_BOARD_CATEGORY_INFO_SEL(-1);
            int ddlBoardCategorySeletedValue = IntegerUtil.intValid(this.ddlBoardCategory.SelectedValue, -1);

            // 게시판 카테고리 필드 - DropDownList
            if (BoardCategorydt.Rows.Count == 0)
            {
                this.ddlBoardCategory.Items.Add(new ListItem("등록된 카테고리가 없습니다.", ""));
                this.ddlBoardCategory.Enabled = false;
            }
            else
            {
                this.ddlBoardCategory.Items.Clear();
                DropDownListUtil.SetDropDownListValue(BoardCategorydt, this.ddlBoardCategory, this.ddlBoardCategory.SelectedValue, DropDownListUtil.DropDownFlag.Select);
            }
            #endregion
        }
Esempio n. 3
0
        private void GetPageInfoSetting(string ParamBoardCategory, string ParamField, string ParamKey, int Idx, int PageNo, string CMD)
        {
            //페이지 HTML 언어 세팅
            this.ltBoardCategory.Text = "게시판 카테고리";
            this.ltWriteCategory.Text = "게시글 카테고리";
            this.ltUserId.Text        = "작성자 아이디";
            this.ltWriter.Text        = "작성자 이름";
            this.ltSubject.Text       = "제목";
            this.ltContent.Text       = "내용";
            this.ltRegiDate.Text      = "등록일";
            this.ltViewCnt.Text       = "조회수";

            #region [DropDownList 설정]
            Common_NTx_Dac ddlSet = new Common_NTx_Dac();

            // 게시판 카테고리 필드
            DataTable BoardCategorydt = null;
            BoardCategorydt = ddlSet.TOTALBBS_BOARD_CATEGORY_INFO_SEL(-1);
            int ddlBoardCategorySeletedValue = IntegerUtil.intValid(this.ddlBoardCategory.SelectedValue, -1);

            // 게시판 카테고리 필드 - DropDownList
            if (BoardCategorydt.Rows.Count == 0)
            {
                this.ddlWriteCategory.Items.Clear();
                this.ddlBoardCategory.Items.Add(new ListItem("등록된 카테고리가 없습니다.", ""));
                this.ddlBoardCategory.Enabled = false;
            }
            else
            {
                this.ddlBoardCategory.Items.Clear();
                DropDownListUtil.SetDropDownListValue(BoardCategorydt, this.ddlBoardCategory, this.ddlBoardCategory.SelectedValue, DropDownListUtil.DropDownFlag.Select);
            }

            // 게시글 카테고리 필드
            DataTable WriteCategorydt = null;
            WriteCategorydt = ddlSet.TOTALBBS_WRITE_CATEGORY_INFO_SEL(ddlBoardCategorySeletedValue);

            // 게시글 카테고리 필드 - DropDownList
            if (WriteCategorydt.Rows.Count == 0)
            {
                this.ddlWriteCategory.Items.Clear();
                this.ddlWriteCategory.Items.Add(new ListItem("등록된 카테고리가 없습니다.", ""));
                this.ddlWriteCategory.Enabled = false;
            }
            else
            {
                this.ddlWriteCategory.Items.Clear();
                DropDownListUtil.SetDropDownListValue(WriteCategorydt, this.ddlWriteCategory, this.ddlWriteCategory.SelectedValue, DropDownListUtil.DropDownFlag.Select);
            }
            #endregion

            DataSet ds = null;
            if (CMD.Equals("M"))
            {
                Board_NTx_Dac oWS = new Board_NTx_Dac();
                ds = oWS.TOTALBBS_BOARD_VIEW_SEL(Idx);
            }
            else
            {
                this.trVisible_2.Attributes.Add("style", "display:none");
                this.trVisible_2.Visible = false;
            }

            this.GetPageSetting(Idx, ds, CMD);
        }