Example #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";

                #region [등록 및 수정 하기위한 데이터 처리]
                object obj_BoardCreate = Cache["BoardCreate"];
                object obj_BoardModify = Cache["BoardModify"];

                string[] ParameterData = new string[5];
                if (obj_BoardCreate != null && obj_BoardModify != null)
                {
                    Response.Redirect(DefaultPage, false);
                }
                else
                {
                    if (obj_BoardCreate != null)
                    {
                        //등록 페이지
                        ParameterData = obj_BoardCreate as string[];

                        if (ParameterData != null)
                        {
                            ParamBoardCategory = ParameterData[0];
                            ParamField         = ParameterData[1];
                            ParamKey           = ParameterData[2];
                            iIdx  = IntegerUtil.intValid(ParameterData[3], 0);
                            iPage = IntegerUtil.intPage(ParameterData[4], 1);

                            this.GetPageInfoSetting(ParamBoardCategory, ParamField, ParamKey, iIdx, iPage, "C");
                        }
                    }
                    else
                    {
                        //수정 페이지
                        if (obj_BoardModify != null)
                        {
                            ParameterData = obj_BoardModify as string[];

                            if (ParameterData != null)
                            {
                                ParamBoardCategory = ParameterData[0];
                                ParamField         = ParameterData[1];
                                ParamKey           = ParameterData[2];
                                iIdx  = IntegerUtil.intValid(ParameterData[3], 0);
                                iPage = IntegerUtil.intPage(ParameterData[4], 1);

                                this.GetPageInfoSetting(ParamBoardCategory, ParamField, ParamKey, iIdx, iPage, "M");
                            }
                        }
                    }
                }
                #endregion
            }
        }
Example #2
0
 private void ParameterSetting()
 {
     strField            = WebUtil.SCRequestFormString("FIELD", "ALL");
     strKey              = WebUtil.SCRequestFormString("KEY", string.Empty);
     iPage               = IntegerUtil.intPage(WebUtil.SCRequestFormString("ParamPage", string.Empty), 1);
     intPageViewRow      = IntegerUtil.intPage(WebUtil.SCRequestFormString("ParamPageViewRow", string.Empty), PageSize);
     intIdx              = WebUtil.RequestInt("intIdx", 0);
     this.ParamIdx.Value = Convert.ToString(intIdx);
 }
Example #3
0
 private void ParameterSetting()
 {
     strField         = WebUtil.SCRequestFormString("FIELD", "ALL");
     strKey           = WebUtil.SCRequestFormString("KEY", string.Empty);
     strTxTEndDate    = WebUtil.SCRequestFormString("TxTEndDate", string.Empty);
     iPage            = IntegerUtil.intPage(WebUtil.SCRequestFormString("ParamPage", string.Empty), 1);
     intPageViewRow   = IntegerUtil.intPage(WebUtil.SCRequestFormString("ParamPageViewRow", string.Empty), PageSize);
     strBoardCategory = WebUtil.SCRequestFormString("ddlBoardCategory", "-1");
 }
Example #4
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";

                #region [상세보기를 위한 데이터 처리]
                object obj_BoardModify = Cache["BoardModify"];

                string[] ParameterData = new string[5];
                if (obj_BoardModify != null)
                {
                    Response.Redirect(DefaultPage, false);
                }
                else
                {
                    if (obj_BoardModify != null)
                    {
                        //수정 페이지
                        ParameterData = obj_BoardModify as string[];

                        if (ParameterData != null)
                        {
                            ParamBoardCategory = ParameterData[0];
                            ParamField         = ParameterData[1];
                            ParamKey           = ParameterData[2];
                            iIdx  = IntegerUtil.intValid(ParameterData[3], 0);
                            iPage = IntegerUtil.intPage(ParameterData[4], 1);

                            this.GetPageInfoSetting(ParamBoardCategory, ParamField, ParamKey, iIdx, iPage, "V");
                        }
                    }
                    else
                    {
                        StringBuilder sbError = new StringBuilder();
                        sbError.Append("alert('데이터 조회에 실패하였습니다.');history.go(-1);");
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "PageError", sbError.ToString(), true);
                    }
                }
                #endregion
            }
        }
Example #5
0
        protected void PagingHelper1_OnPageIndexChanged(object sender, PagingEventArgs e)
        {
            try
            {
                if (intIdx.Equals(null) || intIdx == -1)
                {
                    intIdx = IntegerUtil.intPage(WebUtil.SCRequestFormString("ParamIdx", string.Empty), -1);
                }

                this.GetListInfo(PageSize, e.PageIndex, intIdx);
            }
            catch (Exception ex)
            {
                #region [Error Logger] 로그인을 한경우
                //ErrorLogger_Tx_Dac.GetErrorLogger_Tx_Dac().TB_TOTABBS_ERROR_LOGGER_INFO_INS_SP(ex, admin.MemberId, admin.MemberNm);
                #endregion
            }
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                this.GetPageDefaultSetting();
                this.ltTitle.Text      = "댓글 관리";
                PagingHelper1.PageSize = PageSize;

                if (!IsPostBack)
                {
                    this.ParameterSetting();
                    {
                        if (intIdx.Equals(null) || intIdx == -1)
                        {
                            intIdx = IntegerUtil.intPage(WebUtil.SCRequestFormString("ParamIdx", string.Empty), -1);
                        }
                        if (Request.QueryString["Page"] != null)
                        {
                            //페이지값을 유지하기위해서
                            iPage = IntegerUtil.intValid(Request.QueryString["Page"].ToString(), 1);
                            this.GetListInfo(PageSize, iPage, intIdx);
                            Page_Move(iPage, PagingHelper1);
                        }
                        else
                        {
                            this.GetListInfo(PageSize, 1, intIdx);
                            Page_Move(1, PagingHelper1);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                StringBuilder sbError = new StringBuilder();
                sbError.Append("alert('데이터 조회에 실패하였습니다.');");
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "PageError", sbError.ToString(), true);
            }
        }