Пример #1
0
        protected void ddlBoardCaregory_itemSelected(object sender, EventArgs e)
        {
            try
            {
                int ddlBoardCategorySeletedValue = IntegerUtil.intValid(this.ddlBoardCategory.SelectedValue, 0);
                this.ddlWriteCategory.Enabled = true;

                Common_NTx_Dac ddlSet          = new Common_NTx_Dac();
                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();
                    this.ddlWriteCategory.Items.Add(new ListItem("선택하세요", "0")); // 기본값
                    DropDownListUtil.SetDropDownList(WriteCategorydt, this.ddlWriteCategory, "strCateName", "intIdx");
                }
            }
            catch (Exception ex)
            {
                #region [Error Logger] 로그인을 한경우
                //ErrorLogger_Tx_Dac.GetErrorLogger_Tx_Dac().TB_TOTABBS_ERROR_LOGGER_INFO_INS_SP(ex);
                #endregion
            }
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DropDownListUtil.BindData("ExceptionCount", this.ddlQuantity);
     DropDownListUtil.BindData("ExceptionLabel", this.ddlLabel);
     DropDownListUtil.BindData("ExceptionDeliveryNote", this.ddlNote);
     DropDownListUtil.BindData("ExceptionDamage", this.ddlDamage);
 }
Пример #3
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);
                }
            }
        }
Пример #4
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
        }
        // GET: Exams
        public ActionResult Index()
        {
            var list = db.Exams.ToList();

            foreach (var item in list)
            {
                var itemSub = DropDownListUtil.GetSubs().Where(s => s.Id == item.ExamSubject).FirstOrDefault();
                if (itemSub != null)
                {
                    item.ExamSubjectName = itemSub.Name;
                }

                var itemClass = DropDownListUtil.GetClasses().Where(s => s.Id == item.ClassRoom).FirstOrDefault();
                if (itemClass != null)
                {
                    item.ClassRoomName = itemClass.Name;
                }

                var itemFaculty = DropDownListUtil.GetFaculties().Where(s => s.Id == item.Faculty).FirstOrDefault();
                if (itemFaculty != null)
                {
                    item.FacultyName = itemFaculty.Name;
                }
            }
            return(View(list));
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int           pid = int.Parse(Request.QueryString["pid"]);
                StringBuilder sql = new StringBuilder();
                sql.Append(" select p.PID,p.Provider,p.PartNumber,p.Count,p.Received,er.[Count] Quantity_ID,er.Label Label_ID,er.DeliveryNote Note_ID,er.Damage Damage_ID from P_Product p");
                sql.Append(" left join ExceptionRecord er on p.PID=er.PID where p.PID = @PID");
                SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@PID", pid) };
                DataSet        ds         = DbHelperSQL.Query(sql.ToString(), parameters);
                lblID.Text         = ds.Tables[0].Rows[0]["PID"].ToString();
                lblSupplier.Text   = ds.Tables[0].Rows[0]["Provider"].ToString();
                lblPartNumber.Text = ds.Tables[0].Rows[0]["PartNumber"].ToString();
                lblQuantity.Text   = ds.Tables[0].Rows[0]["Count"].ToString();
                string flag = ds.Tables[0].Rows[0]["Received"].ToString();
                switch (flag)
                {
                case "1":
                    radioYes.Checked = true;
                    break;

                case "0":
                    radioNo.Checked = true;
                    break;

                default: break;
                }
                DropDownListUtil.BindData("ExceptionCount", this.ddlQuantity);
                DropDownListUtil.BindData("ExceptionLabel", this.ddlLabel);
                DropDownListUtil.BindData("ExceptionDeliveryNote", this.ddlNote);
                DropDownListUtil.BindData("ExceptionDamage", this.ddlDamage);

                string quantity_ID = ds.Tables[0].Rows[0]["Quantity_ID"].ToString();
                string label_ID    = ds.Tables[0].Rows[0]["Label_ID"].ToString();
                string note_ID     = ds.Tables[0].Rows[0]["Note_ID"].ToString();
                string damage_ID   = ds.Tables[0].Rows[0]["Damage_ID"].ToString();
                this.ddlQuantity.SelectedIndex = this.ddlQuantity.Items.IndexOf(this.ddlQuantity.Items.FindByValue(quantity_ID));
                this.ddlLabel.SelectedIndex    = this.ddlLabel.Items.IndexOf(this.ddlLabel.Items.FindByValue(label_ID));
                this.ddlNote.SelectedIndex     = this.ddlNote.Items.IndexOf(this.ddlNote.Items.FindByValue(note_ID));
                this.ddlDamage.SelectedIndex   = this.ddlDamage.Items.IndexOf(this.ddlDamage.Items.FindByValue(damage_ID));
            }
            else
            {
                Response.Write("<script type='text/javascript'>");
                //Response.Write("top.document.location.href='Temp.aspx'");
                Response.Write("parent.location.reload();window.stop();");
                Response.Write("</script>");
            }
        }
Пример #7
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);
        }
Пример #8
0
        private void GetPageSetting(int Idx, DataSet ds, string CMD)
        {
            if (CMD.Equals("C"))
            {
                this.lbtnValidationSave.Text     = "<span class='btn btn-default'>확인</span>";
                this.lbtnValidationSave.CssClass = "buttons";

                this.lbtnCancel.Text              = "<span class='btn btn-default'>취소</span>";
                this.lbtnCancel.CssClass          = "buttons mg_l5";
                this.lbtnValidationDelete.Visible = false;

                if (!admin.MemberId.Equals(null) || !admin.MemberId.Equals(""))
                {
                    this.txtUserId.Text = admin.MemberId.ToString();
                }
                if (!admin.MemberNm.Equals(null) || !admin.MemberNm.Equals(""))
                {
                    this.txtWriter.Text = admin.MemberNm.ToString();
                }

                this.ifrmReply.Visible = false;
            }
            else if (CMD.Equals("M"))
            {
                this.lbtnValidationModify.Text     = "<span class='btn btn-primary'>수정</span>";
                this.lbtnValidationModify.CssClass = "buttons fl_r";
                this.lbtnCancel.Text     = "<span class='btn btn-default'>목록</span>";
                this.lbtnCancel.CssClass = "buttons fl_l";

                this.lbtnValidationDelete.Text          = "<span class='btn btn-success'>삭제</span>";
                this.lbtnValidationDelete.CssClass      = "buttons mg_l5 fl_r";
                this.lbtnValidationDelete.OnClientClick = "return fnDelConfirm();";

                DataTable dt1 = ds.Tables[0];
                DataTable dt2 = ds.Tables[1];

                this.ddlBoardCategory.SelectedValue = dt1.Rows[0]["intBoardCategory"].ToString();

                Common_NTx_Dac ddlSet = new Common_NTx_Dac();

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

                // 게시글 카테고리 필드
                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.Enabled = true;
                    this.ddlWriteCategory.Items.Clear();
                    DropDownListUtil.SetDropDownListValue(WriteCategorydt, this.ddlWriteCategory, dt1.Rows[0]["intWriteCategory"].ToString(), DropDownListUtil.DropDownFlag.Select);
                }

                this.ddlWriteCategory.SelectedValue = dt1.Rows[0]["intWriteCategory"].ToString();

                this.txtUserId.Text       = dt1.Rows[0]["strUserId"].ToString();
                this.txtWriter.Text       = dt1.Rows[0]["strWriter"].ToString();
                this.txtSubject.Text      = dt1.Rows[0]["strSubject"].ToString();
                this.txtContent.Text      = TextControl.Delete_Tag(dt1.Rows[0]["strContent"].ToString());
                this.ltRegiDateValue.Text = dt1.Rows[0]["dateRegDate"].ToString();
                this.ltViewCntValue.Text  = dt1.Rows[0]["intViewCount"].ToString();

                //this.ifrmReply.Src = "/BackOffice/Board/BoardReplyList.aspx?intIdx=" + dt1.Rows[0]["intIdx"];
                ifrmReply.Attributes["src"] = "/BackOffice/Board/BoardReplyList?intIdx=" + dt1.Rows[0]["intIdx"];
                this.ifrmReply.Visible      = true;

                //첨부파일 세팅
                if (dt2.Rows.Count == 0)
                {
                    this.rptBoard_Attached.DataSource = dt2;
                    this.rptBoard_Attached.DataBind();
                }
                else
                {
                    AttachedFileCnt = 1;
                    this.rptBoard_Attached.DataSource = dt2;
                    this.rptBoard_Attached.DataBind();
                }
            }

            this.hdfIdx.Value = Idx.ToString();
            this.hdfCMD.Value = CMD;
        }