示例#1
0
        /// <summary>
        /// 관리자 정보 삭제
        /// </summary>
        private void RemoveAdminData(string adminId)
        {
            StringBuilder param = new StringBuilder();

            param.Append(AdminId);

            string[] result = ExecuteQueryResult(3804, param.ToString());

            if (result == null)
            {
                // 삭제 실패 - 코드 자체가 안오는 경우
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생하였습니다."));
            }
            else if (result != null && CStringUtil.IsNullOrEmpty(result[0]).Equals("00") == false)
            {
                // 삭제 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }

            Response.Redirect("./order_list.aspx");
        }
示例#2
0
        /// <summary>
        /// 데이터를 저장한다.
        /// </summary>
        /// <param name="mode"></param>
        private void SaveData(string mode)
        {
            string succ_yn = string.Empty;

            succ_yn = succ_y.Checked ? "Y" : succ_yn;
            succ_yn = succ_n.Checked ? "N" : succ_yn;

            if (mode.Equals("U") && succ_yn.Equals(""))
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("합격/불합격 여부를 선택해 주세요."));
            }
            else
            {
                StringBuilder param = new StringBuilder();
                param.Append(SupportNo);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(mode);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(succ_yn);

                // 실 데이터 조회
                DataSet ds = GetDataSet(35301, param.ToString());

                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    string result_cd  = ds.Tables[0].Rows[0]["RESULT_CD"].ToString();
                    string result_msg = ds.Tables[0].Rows[0]["RESULT_MSG"].ToString();

                    if ("00".Equals(result_cd))
                    {
                        // 다른 페이지로 이동하는 경우 WebUtil쪽 이용한다.
                        Response.Redirect("job_support_list.aspx?reg_seq_no=" + RegSeqNo);
                    }
                    else
                    {
                        // 현재 화면으로 다시 돌아오면 이 방식을 그대로 사용
                        ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result_msg));
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // check validation
                if (CStringUtil.IsNullOrEmpty(SupportNo))
                {
                    CWebUtil.jsAlertAndRedirect(this, "잘못된 경로로 진입하였습니다.", "/recruit/result_list.aspx");
                }

                SearchData();

                if (CStringUtil.IsNullOrEmpty(GetData(0, 0, "IS_PROCESSING")) || GetData(0, 0, "IS_PROCESSING").Equals("N"))
                {
                    CWebUtil.jsAlertAndRedirect(this, "채용완료된 공고이거나 없는 채용공고 입니다.", "/recruit/result_list.aspx");
                }

                SetControls();

                InitControls();
            }
        }
示例#4
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(CConst.DB_PARAM_DELIMITER).Append(txtTitle.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("admin");

            string[] result = null;

            result = ExecuteQueryResult(3307, param.ToString());

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
        }
示例#5
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(writer_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(busin_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(posit.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(tel.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(email.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(ttl.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(cont.Value);

            string[] result = null;

            // 입력 모드
            result = ExecuteQueryResult(1511, param.ToString());

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("접수 되었습니다."));

                writer_nm.Value = "";
                busin_nm.Value  = "";
                posit.Value     = "";
                tel.Value       = "";
                email.Value     = "";
                ttl.Value       = "";
                cont.Value      = "";
            }
        }
示例#6
0
        /// <summary>
        /// 관리자 정보 수정
        /// </summary>
        private void ModifyAdminData()
        {
            string adminPwd = CSecureUtil.Encrypt(sys_insert_member_pwd.Value);

            StringBuilder param = new StringBuilder();

            param.Append(sys_insert_member_id.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(sys_insert_member_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(adminPwd);

            string[] result = ExecuteQueryResult(3803, param.ToString());

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
        }
示例#7
0
 /// <summary>
 /// 컨트롤 초기화
 /// </summary>
 private void InitControls()
 {
     if (GetRowCount(0) <= 0)
     {
         CWebUtil.jsAlertAndRedirect(this, "지원자 정보가 존재하지 않습니다.", "job_support_list.aspx?reg_seq_no=" + RegSeqNo);
     }
     else if (GetDataTableCount(6) < 1)
     {
         CWebUtil.jsAlertAndRedirect(this, "조회할 권한이 없습니다.", "job_support_list.aspx?reg_seq_no=" + RegSeqNo);
     }
     else
     {
         if ("Y".Equals(GetData(0, 0, "SUCC_YN")))
         {
             succ_y.Checked = true;
         }
         else if ("N".Equals(GetData(0, 0, "SUCC_YN")))
         {
             succ_n.Checked = true;
         }
     }
 }
示例#8
0
        /// <summary>
        /// 데이터 삭제
        /// </summary>
        private void RemoveData()
        {
            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(Seq) == false && Seq.Equals("0") == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(Seq);

                result = ExecuteQueryResult(3526, param.ToString());

                if (result == null)
                {
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
                }
                else if (result[0].Equals("00") == false)
                {
                    // 삭제 실패
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
                }
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("입력모드에서는 지원하지 않습니다."));
            }

            // 코드 삭제
            if (result != null && result.Length == 3)
            {
                string reg_seq_no = result[2];

                StringBuilder param = new StringBuilder();
                param.Length = 0;
                param.Append(Seq);

                ExecuteQueryResult(3527, param.ToString());
            }
        }
示例#9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                System.Diagnostics.Debug.WriteLine("==== job_guide_join_sub:");
                // check validation
                if (CStringUtil.IsNullOrEmpty(RegSeqNo))
                {
                    CWebUtil.jsAlertAndRedirect(this, "잘못된 경로로 진입하였습니다.", "/recruit/job_guide_list.aspx");
                }

                SearchData();

                if (CStringUtil.IsNullOrEmpty(GetData(0, 0, "IS_PROCESSING")) || GetData(0, 0, "IS_PROCESSING").Equals("N"))
                {
                    CWebUtil.jsAlertAndRedirect(this, "채용완료된 공고이거나 없는 채용공고 입니다.", "/recruit/job_guide_list.aspx");
                }

                SetControls();

                InitControls();
            }
        }
示例#10
0
        /// <summary>
        /// 데이터 추가
        /// </summary>
        private void AddData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(UPR_CATG_NO);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(DEPTH);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(sort_ord.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(""); // 로그인 관리자
            param.Append(CConst.DB_PARAM_DELIMITER).Append(catg_nm.Value);

            string[] result = ExecuteQueryResult(3702, param.ToString());

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 추가 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
        }
示例#11
0
        private void AddData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(duty_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(DUTY_DEPTH);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(sort_ord.Value);

            string[] result = ExecuteQueryResult(3813, param.ToString());

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 추가 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                Response.Redirect("duty_list.aspx");
            }
        }
示例#12
0
        /// <summary>
        /// 데이터 삭제
        /// </summary>
        private void RemoveData()
        {
            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(Seq);

                string[] result = ExecuteQueryResult(3517, param.ToString());

                if (result == null)
                {
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
                }
                else if (result[0].Equals("00") == false)
                {
                    // 삭제 실패
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
                }
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("입력모드에서는 지원하지 않습니다."));
            }
        }
示例#13
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            string img1 = CStringUtil.IsNullOrEmpty(upload_path_01.Value) == false?UploadFile(upload_01, "DIR_PROMOTION") : "";

            string img2 = CStringUtil.IsNullOrEmpty(upload_path_02.Value) == false?UploadFile(upload_02, "DIR_PROMOTION") : "";

            string img3 = CStringUtil.IsNullOrEmpty(upload_path_03.Value) == false?UploadFile(upload_03, "DIR_PROMOTION") : "";

            string img4 = CStringUtil.IsNullOrEmpty(upload_path_04.Value) == false?UploadFile(upload_04, "DIR_PROMOTION") : "";

            string img5 = CStringUtil.IsNullOrEmpty(upload_path_05.Value) == false?UploadFile(upload_05, "DIR_PROMOTION") : "";

            int show_type = 1;

            if (showTp2.Checked == true)
            {
                show_type = 2;
            }
            else if (showTp3.Checked == true)
            {
                show_type = 3;
            }
            else if (showTp4.Checked == true)
            {
                show_type = 4;
            }

            StringBuilder param = new StringBuilder();

            param.Append(writerNm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(show_type);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(txtTitle.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value.Replace("|", "&#124;"));
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img1);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img2);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img3);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img4);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img5);

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                // 수정모드 - SEQ 파라미터로 판단
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Seq);
                result = ExecuteQueryResult(3516, param.ToString());
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3515, param.ToString());
            }

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
        }
示例#14
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            string img1 = CStringUtil.IsNullOrEmpty(upload_path_01.Value) == false?UploadFile(upload_01, "DIR_PROMOTION") : "";

            string img2 = CStringUtil.IsNullOrEmpty(upload_path_02.Value) == false?UploadFile(upload_02, "DIR_PROMOTION") : "";

            string img3 = CStringUtil.IsNullOrEmpty(upload_path_03.Value) == false?UploadFile(upload_03, "DIR_PROMOTION") : "";

            string img4 = CStringUtil.IsNullOrEmpty(upload_path_04.Value) == false?UploadFile(upload_04, "DIR_PROMOTION") : "";

            string img5 = CStringUtil.IsNullOrEmpty(upload_path_05.Value) == false?UploadFile(upload_05, "DIR_PROMOTION") : "";

            string menual = CStringUtil.IsNullOrEmpty(upload_path_file.Value) == false?UploadFile(upload_file, "DIR_PROMOTION") : "";

            string open_yn = (open_yn1.Checked) ? "Y" : "N";

            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);                                         // 언어코드
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_cd.Value); // 제품코드
            string catgNo = catg_no.Value.Equals("") ? "0" : catg_no.Value;

            param.Append(CConst.DB_PARAM_DELIMITER).Append(catgNo);                 // 분류번호
            param.Append(CConst.DB_PARAM_DELIMITER).Append(UPR_CATG_NO);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(catg_no2.SelectedValue); // 분류

            string prodType = string.Empty;

            prodType = pdt_bae.Checked ? pdt_bae.Value : prodType;
            prodType = pdt_re.Checked ? pdt_re.Value : prodType;

            param.Append(CConst.DB_PARAM_DELIMITER).Append(prodType); // PROD_TYPE 입력못함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img1);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img2);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img3);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img4);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img5);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(clip_url.Value);                          // 동영상
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 카달로그 - 바이오 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(menual);                                  // 설명서
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 썸네일 - 바이오 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_nm.Value);                           // 제품명
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // EFT가 뭔지 모르겠음 (효능효과 hdnContent로 변경)
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 주요성분(성분함량)
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 성상 - 바이오 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 약가
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value.Replace("|", "&#124;")); // 제품설명
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 보험코드
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 포장단위 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 주의사항
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 특징
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_summary.Value);                       // 개요
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_keep.Value);                          // 보관 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_boheom.Value);                        // 규격 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 비고 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 구성 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 정보 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 구분
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 신제품 START
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 신제품 END
            param.Append(CConst.DB_PARAM_DELIMITER).Append(open_yn);                                 // 노출여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 신제품 여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 동의카테고리
            param.Append(CConst.DB_PARAM_DELIMITER).Append(reg_dt.Value);                            // 등록일

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                // 수정 모드
                result = ExecuteQueryResult(3205, param.ToString());
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3204, param.ToString());
            }

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                // 입력 성공 - 이어서 태그 입력
                AddTag();
            }
        }
示例#15
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            string img1 = CStringUtil.IsNullOrEmpty(upload_path_01.Value) == false?UploadFile(upload_01, "DIR_PROMOTION") : "";

            string img2 = CStringUtil.IsNullOrEmpty(upload_path_02.Value) == false?UploadFile(upload_02, "DIR_PROMOTION") : "";

            string img3 = CStringUtil.IsNullOrEmpty(upload_path_03.Value) == false?UploadFile(upload_03, "DIR_PROMOTION") : "";

            string img4 = CStringUtil.IsNullOrEmpty(upload_path_04.Value) == false?UploadFile(upload_04, "DIR_PROMOTION") : "";

            string img5 = CStringUtil.IsNullOrEmpty(upload_path_05.Value) == false?UploadFile(upload_05, "DIR_PROMOTION") : "";

            string menual = CStringUtil.IsNullOrEmpty(upload_path_file.Value) == false?UploadFile(upload_file, "DIR_PROMOTION") : "";

            string open_yn = (open_yn1.Checked) ? "Y" : "N";

            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_cd.Value);
            string catgNo = catg_no.Value.Equals("") ? "0" : catg_no.Value;

            param.Append(CConst.DB_PARAM_DELIMITER).Append(catgNo);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(UPR_CATG_NO);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(catg_no2.SelectedValue); // 분류

            string db_new_yn = new_yn.Checked ? "Y" : "N";

            string prodType = string.Empty;

            prodType = pdt_org.Checked ? pdt_org.Value : prodType;
            //prodType = pdt_new.Checked ? pdt_new.Value : prodType;
            prodType = pdt_godl.Checked ? pdt_godl.Value : prodType;

            h_prod_img1_path.Value   = GetData(0, 0, "PROD_IMG1");
            h_prod_img2_path.Value   = GetData(0, 0, "PROD_IMG2");
            h_prod_img3_path.Value   = GetData(0, 0, "PROD_IMG3");
            h_prod_img4_path.Value   = GetData(0, 0, "PROD_IMG4");
            h_prod_img5_path.Value   = GetData(0, 0, "PROD_IMG5");
            h_prod_menual_path.Value = GetData(0, 0, "MANUAL");

            param.Append(CConst.DB_PARAM_DELIMITER).Append(prodType); // PROD_TYPE 입력못함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img1);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img2);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img3);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img4);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img5);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(clip_url.Value);                          // 동영상
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 카달로그 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(menual);                                  // 설명서
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 썸네일 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_nm.Value);                           // 제품명
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // EFT가 뭔지 모르겠음
            param.Append(CConst.DB_PARAM_DELIMITER).Append(ingredi.Value);                           // 주요성분(성분함량)
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 성상 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pmedi.Value);                             // 약가
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value.Replace("|", "&#124;")); // 스마트 에디터
            param.Append(CConst.DB_PARAM_DELIMITER).Append(insu_cd.Value);                           // 보험코드
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 포장단위 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 주의사항
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 특장
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 개요 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 보관 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 규격 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 비고 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 구성 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 정보 - 동물 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 구분
            param.Append(CConst.DB_PARAM_DELIMITER).Append(new_start_dt.Value);                      // 신제품 START
            param.Append(CConst.DB_PARAM_DELIMITER).Append(new_end_dt.Value);                        // 신제품 END
            param.Append(CConst.DB_PARAM_DELIMITER).Append(open_yn);                                 // 노출여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append(db_new_yn);                               // 신제품 여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                                      // 동의카테고리
            param.Append(CConst.DB_PARAM_DELIMITER).Append(reg_dt.Value);                            // 등록일

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                // 수정 모드
                result = ExecuteQueryResult(3205, param.ToString());
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3204, param.ToString());
            }

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                // 입력 성공 - 이어서 태그 입력
                AddTag();
            }
        }
示例#16
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            string img1 = CStringUtil.IsNullOrEmpty(upload_path_01.Value) == false?UploadFile(upload_01, "DIR_PROMOTION") : "";

            string img2 = CStringUtil.IsNullOrEmpty(upload_path_02.Value) == false?UploadFile(upload_02, "DIR_PROMOTION") : "";

            string img3 = CStringUtil.IsNullOrEmpty(upload_path_03.Value) == false?UploadFile(upload_03, "DIR_PROMOTION") : "";

            string img4 = CStringUtil.IsNullOrEmpty(upload_path_04.Value) == false?UploadFile(upload_04, "DIR_PROMOTION") : "";

            string img5 = CStringUtil.IsNullOrEmpty(upload_path_05.Value) == false?UploadFile(upload_05, "DIR_PROMOTION") : "";

            string menual = CStringUtil.IsNullOrEmpty(upload_path_file.Value) == false?UploadFile(upload_file, "DIR_PROMOTION") : "";

            string open_yn = (open_yn1.Checked) ? "Y" : "N";

            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_cd.Value);
            string catgNo = catg_no.Value.Equals("") ? "0" : catg_no.Value;

            param.Append(CConst.DB_PARAM_DELIMITER).Append(catgNo);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(UPR_CATG_NO);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(catg_no2.SelectedValue);

            string db_new_yn = new_yn.Checked ? "Y" : "N";

            param.Append(CConst.DB_PARAM_DELIMITER).Append("PROD_ORG"); //제품유형
            param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img1);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img2);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img3);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img4);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img5);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(clip_url.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(""); // 인체 의약품 카달로그 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(menual);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(""); // 인체 의약품 썸네일 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(""); // 효능 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(ingredi.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(temper.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pmedi.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value.Replace("|", "&#124;"));
            param.Append(CConst.DB_PARAM_DELIMITER).Append(insu_cd.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pack_mea.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 //주의사항 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 특장점 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 개요 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 보관 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 규격 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 비고 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 구성 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 정보 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_div.Value);     // 구분
            param.Append(CConst.DB_PARAM_DELIMITER).Append(new_start_dt.Value); // 신제품 START
            param.Append(CConst.DB_PARAM_DELIMITER).Append(new_end_dt.Value);   // 신제품 END
            param.Append(CConst.DB_PARAM_DELIMITER).Append(open_yn);            // 노출여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append(db_new_yn);          // 신제품 여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");                 // 동의카테고리
            param.Append(CConst.DB_PARAM_DELIMITER).Append(reg_dt.Value);       // 등록일



            //System.Diagnostics.Debug.WriteLine("wwwwwwwww" + new_start_dt.Value);


            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                // 수정 모드
                result = ExecuteQueryResult(3205, param.ToString());
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3204, param.ToString());
            }

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                // 입력 성공 - 이어서 태그 입력
                AddTag();
            }
        }
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            bool result = false;

            using (SqlConnection myConnection = new SqlConnection(connString))
            {
                myConnection.Open();

                SqlTransaction trans = myConnection.BeginTransaction();

                try
                {
                    #region 지원일반정보
                    SqlDataAdapter myAdapter = new SqlDataAdapter("USP_HOMEPAGE_1439_RCM_JOINCOMP_STATUS_U", myConnection);
                    myAdapter.SelectCommand.Transaction = trans;
                    myAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;

                    //string img1 = ""; CStringUtil.IsNullOrEmpty(img.PostedFile.FileName) == false ? UploadFile(img, "DIR_RECRUITMENT_USER") : "";
                    string img1 = img.Value;

                    System.Diagnostics.Debug.WriteLine("RcmDutyNo=" + RcmDutyNo);

                    StringBuilder param = new StringBuilder();

                    param.Append(Request["rcm_type"]); // 지원유형코드


                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["rcm_jobgroup"]);     // 지원직군코드
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["rcm_career"]);       // 지원경력코드
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(RcmDutyNo);                   // 직무번호
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["hope_position_cd"]); // 희망직급코드
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["support_motive"]);   // 지원동기
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["support_motive_r"]); // 지원동기 이유 (기타인 경우만 입력)
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["hope_work_place"]);  // 희망근무지
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["joincomp_pb_date"]); // 입사가능일

                    string qual_exam_yn = Request["qual_exam_yn"];

                    if ("Y".Equals(qual_exam_yn))
                    {
                        // 검정고시 체크되어 있는 경우: 고등학교, 고등학교 소재지 clear
                        param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 고등학교명
                        param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 고등학교 소재지
                        param.Append(CConst.DB_PARAM_DELIMITER).Append("Y"); // 검정고시
                    }
                    else
                    {
                        param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["hs_nm"]);          // 고등학교명
                        param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["rcm_stead_catg"]); // 고등학교 소재지
                        param.Append(CConst.DB_PARAM_DELIMITER).Append("N");                       // 검정고시
                    }

                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["hs_grad_date"]);        // 졸업연도
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["hs_grad_select_catg"]); // 졸업선택
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["rcm_major_catg"]);      // 전공

                    // 기본정보
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(img1);                   // 이미지
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["chi_nm"]);      // 성명(한자)
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["birthday"]);    // 생년월일
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["tel"]);         // 연락처
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["celltel"]);     // 핸드폰
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["email"]);       // 이메일
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["zipcode_str"]); // 우편번호 앞자리
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["zipcode_end"]); // 우편번호 뒷자리
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["addr"]);        // 주소
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["addr_dtl"]);    // 주소상세

                    // 자기소개
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["intro_grow_process"]);    // 자기소개서 성장과정
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["intro_char__adv_fault"]); // 자기소개서 성격상의 장단점
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["intro_support_motive"]);  // 자기소개서 지원동기
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["intro_joincomp_aspira"]); // 자기소개서 입사후포부

                    param.Append(CConst.DB_PARAM_DELIMITER).Append(RegSeqNo);                         // 채용번호
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(SupportNo);                        // 지원번호;;;
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["salary_req"]);            // 희망연봉

                    ParsingArg(param.ToString());

                    string[]    variable  = new string[variableLength];    // sql 의 파라미터 변수 이름
                    SqlDbType[] sqldbtype = new SqlDbType[variableLength]; // sql 의 파라미터 변수 타입

                    variable[0]  = "@SUPPORT_TYPE_CD";
                    variable[1]  = "@SUPPORT_POS_CD";
                    variable[2]  = "@SUPPORT_CR_CD";
                    variable[3]  = "@SUPPORT_DUTY_NO";
                    variable[4]  = "@HOPE_POSITION";
                    variable[5]  = "@SUPPORT_MOTIVE";
                    variable[6]  = "@SUPPORT_MOTIVE_R";
                    variable[7]  = "@HOPE_WORK_PLACE";
                    variable[8]  = "@JOINCOMP_PB_DATE";
                    variable[9]  = "@HS_NM";
                    variable[10] = "@HS_LOC_CD";
                    variable[11] = "@HS_QUAL_EXAM_YN";
                    variable[12] = "@HS_GRAD_DATE";
                    variable[13] = "@HS_GRAD_SELECT_CD";
                    variable[14] = "@HS_MAJOR_CD";
                    variable[15] = "@IMG";
                    variable[16] = "@CHI_NM";
                    variable[17] = "@BIRTHDAY";
                    variable[18] = "@TEL";
                    variable[19] = "@CELLTEL";
                    variable[20] = "@EMAIL";
                    variable[21] = "@ZIPCODE_STR";
                    variable[22] = "@ZIPCODE_END";
                    variable[23] = "@ADDR";
                    variable[24] = "@ADDR_DTL";
                    variable[25] = "@INTRO_GROW_PROCESS";
                    variable[26] = "@INTRO_CHAR__ADV_FAULT";
                    variable[27] = "@INTRO_SUPPORT_MOTIVE";
                    variable[28] = "@INTRO_JOINCOMP_ASPIRA";
                    variable[29] = "@REG_SEQ_NO";
                    variable[30] = "@SUPPORT_NO";
                    variable[31] = "@SALARY_REQ";

                    sqldbtype[0]  = SqlDbType.VarChar;
                    sqldbtype[1]  = SqlDbType.VarChar;
                    sqldbtype[2]  = SqlDbType.VarChar;
                    sqldbtype[3]  = SqlDbType.Int;
                    sqldbtype[4]  = SqlDbType.VarChar;
                    sqldbtype[5]  = SqlDbType.VarChar;
                    sqldbtype[6]  = SqlDbType.VarChar;
                    sqldbtype[7]  = SqlDbType.VarChar;
                    sqldbtype[8]  = SqlDbType.VarChar;
                    sqldbtype[9]  = SqlDbType.VarChar;
                    sqldbtype[10] = SqlDbType.VarChar;
                    sqldbtype[11] = SqlDbType.VarChar;
                    sqldbtype[12] = SqlDbType.VarChar;
                    sqldbtype[13] = SqlDbType.VarChar;
                    sqldbtype[14] = SqlDbType.VarChar;
                    sqldbtype[15] = SqlDbType.VarChar;
                    sqldbtype[16] = SqlDbType.VarChar;
                    sqldbtype[17] = SqlDbType.VarChar;
                    sqldbtype[18] = SqlDbType.VarChar;
                    sqldbtype[19] = SqlDbType.VarChar;
                    sqldbtype[20] = SqlDbType.VarChar;
                    sqldbtype[21] = SqlDbType.VarChar;
                    sqldbtype[22] = SqlDbType.VarChar;
                    sqldbtype[23] = SqlDbType.VarChar;
                    sqldbtype[24] = SqlDbType.VarChar;
                    sqldbtype[25] = SqlDbType.VarChar;
                    sqldbtype[26] = SqlDbType.VarChar;
                    sqldbtype[27] = SqlDbType.VarChar;
                    sqldbtype[28] = SqlDbType.VarChar;
                    sqldbtype[29] = SqlDbType.Int;
                    sqldbtype[30] = SqlDbType.Int;
                    sqldbtype[31] = SqlDbType.VarChar;

                    for (int i = 0; i < variableLength; i++)
                    {
                        myAdapter.SelectCommand.Parameters.Add(variable[i], sqldbtype[i]);
                        myAdapter.SelectCommand.Parameters[variable[i]].Value = m_value[i];
                    }

                    DataSet ds = new DataSet();
                    myAdapter.Fill(ds, "Table");

                    variable  = null;
                    sqldbtype = null;

                    #endregion

                    if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                    {
                        string support_no = SupportNo;
                        // resource 해제
                        ds = null;

                        #region 이력서 데이터 삭제

                        // 어떤 데이터가 어떻게 수정/제거/입력됐는지 알 수 없으므로
                        // 기존에 입력했던 학력,경력,자격증,가족관계 등을 모두 삭제하고
                        // 이어서, 학력,경력,자격증,가족관계 등을 다시 입력하는 구조
                        myAdapter.SelectCommand.Parameters.Clear();
                        myAdapter.SelectCommand.CommandText = "USP_HOMEPAGE_1440_RCM_JOINCOMP_STATUS_D";
                        myAdapter.SelectCommand.Parameters.Add("@SUPPORT_NO", SqlDbType.Int);

                        myAdapter.SelectCommand.Parameters["@SUPPORT_NO"].Value = support_no;
                        myAdapter.SelectCommand.ExecuteNonQuery();

                        #endregion

                        #region 학력사항 - 대학/대학교 /대학원
                        // 학력사항
                        string[] sch_nm = Request.Form.GetValues("sch_nm");
                        if (sch_nm.Length > 0 && CStringUtil.IsNullOrEmpty(sch_nm[0]) == false)
                        {
                            // 첫번째 대학교 입력란에 학교명이 있는 경우에 입력 시작
                            myAdapter.SelectCommand.CommandText = "USP_HOMEPAGE_1434_RCM_JOINCOMP_STATUS_AA_I";

                            string[]    arr_var = { "@SCH_NM", "@MATER_CD",        "@BSL_TSL_CD"
                                                    ,             "@ADMIS_YEAR",      "@ADMIS_CD","@GRADUT_YEAR", "@GRADUT_CD", "@ABILITY_CD"
                                                    ,             "@ABILITY_DEPT_NM", "@SCORE", "@GRADUT_DISSERT_NM" };
                            SqlDbType[] arr_col_tp = { SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar
                                                       ,                  SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar
                                                       ,                  SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar };

                            int col_catg_num = Convert.ToInt32(Request["col_catg_num"]); // 대학교 이상 학력 사항 개수

                            string[] arr_params = { "sch_nm", "mater_cd", "bsl_tsl_cd",  "admis_year"
                                                    ,         "admis_cd", "gradut_year", "gradut_cd","ability_cd", "ability_dept_nm", "score", "gradut_dissert_nm" };

                            int end_cnt = 0;
                            for (int i = 1; i <= MAX_LOOP; i++)
                            {
                                string col_catg_numVal = i.ToString();

                                string type_cd = Request["type_cd" + col_catg_numVal];

                                if (end_cnt >= col_catg_num || CStringUtil.IsNullOrEmpty(type_cd))
                                {
                                    break;
                                }
                                else
                                {
                                    // 파라미터 초기화
                                    myAdapter.SelectCommand.Parameters.Clear();

                                    // 공통
                                    myAdapter.SelectCommand.Parameters.Add("@SUPPORT_NO", SqlDbType.Int);
                                    myAdapter.SelectCommand.Parameters["@SUPPORT_NO"].Value = support_no;

                                    myAdapter.SelectCommand.Parameters.Add("@TYPE_CD", SqlDbType.VarChar);
                                    myAdapter.SelectCommand.Parameters["@TYPE_CD"].Value = type_cd;

                                    for (int idx_param = 0; idx_param < arr_params.Length; idx_param++)
                                    {
                                        string[] arr_param_value = Request.Form.GetValues(arr_params[idx_param]);

                                        string var_nm = arr_var[idx_param];
                                        myAdapter.SelectCommand.Parameters.Add(var_nm, arr_col_tp[idx_param]);
                                        myAdapter.SelectCommand.Parameters[var_nm].Value = arr_param_value[end_cnt];
                                    }

                                    myAdapter.SelectCommand.ExecuteNonQuery();

                                    myAdapter.SelectCommand.Parameters.Clear();

                                    end_cnt++;
                                }
                            }
                        }
                        #endregion

                        #region 경력사항
                        // 학력사항
                        string[] company_nms = Request.Form.GetValues("company_nm");
                        if (company_nms != null && company_nms.Length > 0 && CStringUtil.IsNullOrEmpty(company_nms[0]) == false)
                        {
                            // 첫번째 회사명 입력란에 회사명이 있는 경우에 입력 시작
                            myAdapter.SelectCommand.CommandText = "USP_HOMEPAGE_1435_RCM_JOINCOMP_STATUS_CR_I";

                            string[] arr_var =
                            {
                                "@COMPANY_NM", "@JOINCOMP_YEAR", "@RSN_YEAR",       "@CAREER_TERM_CD", "@DEPT_NM"
                                ,              "@POSIT_CD",      "@DUTY_CD",        "@SAL",            "@JOB_CONT", "@PROJECT"
                                ,              "@DTL_BUSIN",     "@MAJOR_JOB_OUTC", "@CHANGE_JOB_REASON"
                            };
                            SqlDbType[] arr_col_tp = { SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar
                                                       ,                  SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar
                                                       ,                  SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar };

                            int career_num = Convert.ToInt32(Request["career_num"]); // 대학교 이상 학력 사항 개수

                            string[] arr_params =
                            {
                                "company_nm", "start_date", "end_date",       "career_term_cd", "dept_nm"
                                ,             "posit_cd",   "duty_cd",        "sal",            "job_cont", "project"
                                ,             "dtl_busin",  "major_job_outc", "change_job_reason"
                            };

                            int end_cnt = 0;
                            for (int i = 1; i <= MAX_LOOP; i++)
                            {
                                if (end_cnt >= career_num)
                                {
                                    break;
                                }
                                else
                                {
                                    // 파라미터 초기화
                                    myAdapter.SelectCommand.Parameters.Clear();

                                    // 공통
                                    myAdapter.SelectCommand.Parameters.Add("@SUPPORT_NO", SqlDbType.Int);
                                    myAdapter.SelectCommand.Parameters["@SUPPORT_NO"].Value = support_no;

                                    for (int idx_param = 0; idx_param < arr_params.Length; idx_param++)
                                    {
                                        string[] arr_param_value = Request.Form.GetValues(arr_params[idx_param]);

                                        string var_nm = arr_var[idx_param];
                                        myAdapter.SelectCommand.Parameters.Add(var_nm, arr_col_tp[idx_param]);
                                        myAdapter.SelectCommand.Parameters[var_nm].Value = arr_param_value[end_cnt];
                                    }

                                    myAdapter.SelectCommand.ExecuteNonQuery();

                                    myAdapter.SelectCommand.Parameters.Clear();

                                    end_cnt++;
                                }
                            }
                        }
                        #endregion

                        #region 자격사항
                        // 자격사항
                        string[] cdt_kinds = Request.Form.GetValues("cdt_kind");
                        if (cdt_kinds != null && cdt_kinds.Length > 0 && CStringUtil.IsNullOrEmpty(cdt_kinds[0]) == false)
                        {
                            // 첫번째 자격증명 입력란에 자격증명이 있는 경우에 입력 시작
                            myAdapter.SelectCommand.CommandText = "USP_HOMEPAGE_1436_RCM_JOINCOMP_STATUS_CDT_I";

                            string[]    arr_var    = { "@CDT_KIND", "@ACQ_DT", "@PUB_PLACE" };
                            SqlDbType[] arr_col_tp = { SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar };
                            int         cdt_num    = Convert.ToInt32(Request["cdt_num"]); // 개수

                            string[] arr_params = { "cdt_kind", "acq_dt", "pub_place" };

                            int end_cnt = 0;
                            for (int i = 1; i <= MAX_LOOP; i++)
                            {
                                if (end_cnt >= cdt_num)
                                {
                                    break;
                                }
                                else
                                {
                                    // 파라미터 초기화
                                    myAdapter.SelectCommand.Parameters.Clear();

                                    // 공통
                                    myAdapter.SelectCommand.Parameters.Add("@SUPPORT_NO", SqlDbType.Int);
                                    myAdapter.SelectCommand.Parameters["@SUPPORT_NO"].Value = support_no;

                                    for (int idx_param = 0; idx_param < arr_params.Length; idx_param++)
                                    {
                                        string[] arr_param_value = Request.Form.GetValues(arr_params[idx_param]);

                                        string var_nm = arr_var[idx_param];
                                        myAdapter.SelectCommand.Parameters.Add(var_nm, arr_col_tp[idx_param]);
                                        myAdapter.SelectCommand.Parameters[var_nm].Value = arr_param_value[end_cnt];
                                    }

                                    myAdapter.SelectCommand.ExecuteNonQuery();

                                    myAdapter.SelectCommand.Parameters.Clear();

                                    end_cnt++;
                                }
                            }
                        }
                        #endregion

                        #region 가족사항
                        // 가족사항
                        string[] rels = Request.Form.GetValues("rel");
                        if (rels != null && rels.Length > 0 && CStringUtil.IsNullOrEmpty(rels[0]) == false)
                        {
                            // 첫번째 값이 있는 경우에 시작
                            myAdapter.SelectCommand.CommandText = "USP_HOMEPAGE_1437_RCM_JOINCOMP_FAMILY_I";

                            string[] arr_var =
                            {
                                "@REL", "@NM",     "@AGE", "@ABILITY", "@JOB"
                                ,       "@JOB_NM", "@POSIT"
                            };
                            SqlDbType[] arr_col_tp =
                            {
                                SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar
                                ,                  SqlDbType.VarChar, SqlDbType.VarChar
                            };
                            int family_num = Convert.ToInt32(Request["family_num"]); // 개수

                            string[] arr_params =
                            {
                                "rel", "nm",     "age", "ability", "job"
                                ,      "job_nm", "posit"
                            };

                            int end_cnt = 0;
                            for (int i = 1; i <= MAX_LOOP; i++)
                            {
                                if (end_cnt >= rels.Length)
                                {
                                    break;
                                }
                                else
                                {
                                    // 파라미터 초기화
                                    myAdapter.SelectCommand.Parameters.Clear();

                                    // 공통
                                    myAdapter.SelectCommand.Parameters.Add("@SUPPORT_NO", SqlDbType.Int);
                                    myAdapter.SelectCommand.Parameters["@SUPPORT_NO"].Value = support_no;

                                    for (int idx_param = 0; idx_param < arr_params.Length; idx_param++)
                                    {
                                        string[] arr_param_value = Request.Form.GetValues(arr_params[idx_param]);

                                        string var_nm = arr_var[idx_param];
                                        myAdapter.SelectCommand.Parameters.Add(var_nm, arr_col_tp[idx_param]);
                                        myAdapter.SelectCommand.Parameters[var_nm].Value = arr_param_value[end_cnt];
                                    }

                                    myAdapter.SelectCommand.ExecuteNonQuery();

                                    myAdapter.SelectCommand.Parameters.Clear();

                                    end_cnt++;
                                }
                            }
                        }

                        #endregion

                        #region 첨부파일

                        string attach_file_1_path = "";
                        string attach_file_2_path = "";
                        string attach_file_3_path = "";

                        if (CStringUtil.IsNullOrEmpty(attach_file_1.PostedFile.FileName) == false)
                        {
                            attach_file_1_path = UploadFile(attach_file_1, "DIR_RECRUITMENT_USER");
                        }
                        else if (Request["attach_file_path_1"] != null)
                        {
                            attach_file_1_path = Request["attach_file_path_1"].ToString();
                        }

                        if (CStringUtil.IsNullOrEmpty(attach_file_2.PostedFile.FileName) == false)
                        {
                            attach_file_2_path = UploadFile(attach_file_2, "DIR_RECRUITMENT_USER");
                        }
                        else if (Request["attach_file_path_2"] != null)
                        {
                            attach_file_2_path = Request["attach_file_path_2"].ToString();
                        }

                        if (CStringUtil.IsNullOrEmpty(attach_file_3.PostedFile.FileName) == false)
                        {
                            attach_file_3_path = UploadFile(attach_file_3, "DIR_RECRUITMENT_USER");
                        }
                        else if (Request["attach_file_path_3"] != null)
                        {
                            attach_file_3_path = Request["attach_file_path_3"].ToString();
                        }

                        string[] file_arr = { attach_file_1_path, attach_file_2_path, attach_file_3_path };

                        for (int i = 0; i < file_arr.Length; i++)
                        {
                            if (CStringUtil.IsNullOrEmpty(file_arr[i]) == false)
                            {
                                myAdapter.SelectCommand.Parameters.Clear();

                                myAdapter.SelectCommand.CommandText = "USP_HOMEPAGE_1438_RCM_JOINCOMP_FILE_I";
                                myAdapter.SelectCommand.Parameters.Add("@SUPPORT_NO", SqlDbType.Int);
                                myAdapter.SelectCommand.Parameters.Add("@FILE_PATH", SqlDbType.VarChar);

                                myAdapter.SelectCommand.Parameters["@SUPPORT_NO"].Value = support_no;
                                myAdapter.SelectCommand.Parameters["@FILE_PATH"].Value  = file_arr[i];

                                myAdapter.SelectCommand.ExecuteNonQuery();
                                myAdapter.SelectCommand.Parameters.Clear();
                            }
                        }

                        #endregion

                        trans.Commit();

                        result = true;
                    }
                    else
                    {
                        trans.Rollback();

                        result = false;
                    }
                }
                catch (Exception ex)
                {
                    trans.Rollback();
                    result = false;
                    CLog.debug(logger, "job_guide_join_sub.SaveData()|" + ex.Message);
                }
                finally
                {
                    try
                    {
                        myConnection.Close();
                    }
                    catch { }
                }
            }

            if (result)
            {
                // Response.Redirect("job_guide_join_sub_edit.aspx?reg_seq_no=" + RegSeqNo + "&support_no=" + SupportNo + "&load_type=success");
                Response.Redirect("result_list.aspx");
            }
            else
            {
                CWebUtil.jsWrite(this, "입사 지원하지 못했습니다. 처음부터 다시 작성해 주세요.");
            }
        }
示例#18
0
 private void ParserURL()
 {
     parentUri = CWebUtil.GetWebpageParentURI(Request.Url.LocalPath, '/');
     pageName  = CWebUtil.GetLastURI(Request.Url.LocalPath, '/');
 }
示例#19
0
        /// <summary>
        /// 로그인
        /// </summary>
        private void GetLogin()
        {
            string password = string.Empty;

            if (CStringUtil.IsNullOrEmpty(admin_pw.Value) == false)
            {
                string password_enc = CSecureUtil.Encrypt(admin_pw.Value);

                //System.Diagnostics.Trace.WriteLine(password_enc);

                StringBuilder param = new StringBuilder();
                param.Append(admin_id.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(admin_pw.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(password_enc);

                SetDataList(3000, param.ToString());

                if (CStringUtil.IsNullOrEmpty(GetData(0, 0)) == false)
                {
                    // 로그인 설정 및 시작 메뉴 URL을 가져온다.
                    string startupUrl = SetLoginInfo();

                    if (CStringUtil.IsNullOrEmpty(startupUrl))
                    {
                        ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("접근 권한이 없습니다."));
                    }
                    else
                    {
                        Response.Redirect(startupUrl);
                    }
                }
                else
                {
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("아이디 또는 비밀번호가 다릅니다."));
                }
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("비밀번호가 입력되지 않았습니다."));
            }
        }
示例#20
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            string img1 = CStringUtil.IsNullOrEmpty(upload_path_01.Value) == false?UploadFile(upload_01, "DIR_PROMOTION") : "";

            string img2 = CStringUtil.IsNullOrEmpty(upload_path_02.Value) == false?UploadFile(upload_02, "DIR_PROMOTION") : "";

            string img3 = CStringUtil.IsNullOrEmpty(upload_path_03.Value) == false?UploadFile(upload_03, "DIR_PROMOTION") : "";

            string img4 = CStringUtil.IsNullOrEmpty(upload_path_04.Value) == false?UploadFile(upload_04, "DIR_PROMOTION") : "";

            string img5 = CStringUtil.IsNullOrEmpty(upload_path_05.Value) == false?UploadFile(upload_05, "DIR_PROMOTION") : "";

            string menual = CStringUtil.IsNullOrEmpty(upload_path_file.Value) == false?UploadFile(upload_file, "DIR_PROMOTION") : "";

            string open_yn = (open_yn1.Checked) ? "Y" : "N";

            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_cd.Value);
            string catgNo = catg_no.Value.Equals("") ? "0" : catg_no.Value;

            param.Append(CConst.DB_PARAM_DELIMITER).Append(catgNo);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(UPR_CATG_NO);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(catg_no2.SelectedValue);

            string prodType = string.Empty;

            prodType = pdt_human.Checked ? pdt_human.Value : prodType;
            prodType = pdt_ani.Checked ? pdt_ani.Value : prodType;

            param.Append(CConst.DB_PARAM_DELIMITER).Append(prodType); // 제품유형 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img1);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img2);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img3);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img4);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(img5);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(clip_url.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 카달로그 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(menual);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 썸네일 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 효능 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 성분함량 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 성상 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("0"); // 약가 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value.Replace("|", "&#124;"));
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 보험코드 - 수출의약품(인체) 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(pack_mea.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  //주의사항 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 특장점 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 개요 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 보관 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 규격 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");  // 비고 - 인체 의약품 입력 안함
            param.Append(CConst.DB_PARAM_DELIMITER).Append(compt.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_info.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");           // 구분
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");           // 신제품 START
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");           // 신제품 END
            param.Append(CConst.DB_PARAM_DELIMITER).Append(open_yn);      // 노출여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");           // 신제품 여부
            param.Append(CConst.DB_PARAM_DELIMITER).Append("");           // 동의카테고리
            param.Append(CConst.DB_PARAM_DELIMITER).Append(reg_dt.Value); // 등록일

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                // 수정 모드
                result = ExecuteQueryResult(3205, param.ToString());
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3204, param.ToString());
            }

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                // 입력 성공 - 이어서 태그 입력
                AddTag();
            }
        }
示例#21
0
        /// <summary>
        /// 데이터를 저장한다.
        /// VISUAL: 메인 비주얼
        /// QK: 퀵배너
        /// BTM: 하단 배너
        /// PROD: 제품
        /// SRCH: 검색창 텍스트
        /// </summary>
        /// <param name="inputType">저장유형</param>
        private void SaveData(string inputType)
        {
            string result = "";

            if ("VISUAL".Equals(inputType))
            {
                StringBuilder param = new StringBuilder();

                // VISUAL 업데이트
                string vFile1 = CStringUtil.IsNullOrEmpty(visual_value_01.Value) == false?UploadFile(visual_text_01, "DIR_MAIN") : "";

                string checkyn = visual_use_yn_1.Checked ? "Y" : "N";

                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("6");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile1);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(visual_url_01.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(""); // VISUAL 쪽 업데이트이므로 검색텍스트는 공백으로 줌
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("N");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile2 = CStringUtil.IsNullOrEmpty(visual_value_02.Value) == false?UploadFile(visual_text_02, "DIR_MAIN") : "";

                checkyn      = visual_use_yn_2.Checked ? "Y" : "N";
                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("7");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile2);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(visual_url_02.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("N");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile3 = CStringUtil.IsNullOrEmpty(visual_value_03.Value) == false?UploadFile(visual_text_03, "DIR_MAIN") : "";

                checkyn      = visual_use_yn_3.Checked ? "Y" : "N";
                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("8");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile3);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(visual_url_03.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("N");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile4 = CStringUtil.IsNullOrEmpty(visual_value_04.Value) == false?UploadFile(visual_text_04, "DIR_MAIN") : "";

                checkyn      = visual_use_yn_4.Checked ? "Y" : "N";
                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("9");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile4);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(visual_url_04.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("N");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile5 = CStringUtil.IsNullOrEmpty(visual_value_05.Value) == false?UploadFile(visual_text_05, "DIR_MAIN") : "";

                checkyn      = visual_use_yn_5.Checked ? "Y" : "N";
                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("10");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile5);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(visual_url_05.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("N");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");


                ExecuteQuery(3101, param.ToString());

                SearchData();

                visual_value_01.Value = "";
                visual_value_02.Value = "";
                visual_value_03.Value = "";
                visual_value_04.Value = "";
                visual_value_05.Value = "";

                visual_url_01.Value = GetData(0, 0, "LINK_URL");
                visual_url_02.Value = GetData(0, 1, "LINK_URL");
                visual_url_03.Value = GetData(0, 2, "LINK_URL");
                visual_url_04.Value = GetData(0, 3, "LINK_URL");
                visual_url_05.Value = GetData(0, 4, "LINK_URL");
            }
            else if ("QK".Equals(inputType))
            {
                StringBuilder param = new StringBuilder();

                // 퀵배너
                string qkFile1 = CStringUtil.IsNullOrEmpty(quick_value_01.Value) == false?UploadFile(quick_text_01, "DIR_MAIN") : "";

                string checkyn = quick_banner_target_yn.Checked ? "Y" : "N";

                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("2");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(qkFile1);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(quick_url_01.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("Y");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                SearchData();

                quick_value_01.Value = "";
                quick_url_01.Value   = GetData(1, 0, "LINK_URL");
            }
            else if ("BTM".Equals(inputType))
            {
                // 하단 배너
                StringBuilder param = new StringBuilder();

                string btmFile1 = CStringUtil.IsNullOrEmpty(bottom_value_01.Value) == false?UploadFile(bottom_text_01, "DIR_MAIN") : "";

                string checkyn = bottom_banner_target_yn.Checked ? "Y" : "N";

                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("2");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(btmFile1);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(bottom_url_01.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("Y");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                SearchData();

                bottom_value_01.Value = "";
                bottom_url_01.Value   = GetData(2, 0, "LINK_URL");
            }
            else if ("PROD".Equals(inputType))
            {
                // 상품
                string vFile1 = CStringUtil.IsNullOrEmpty(pdt_value_01.Value) == false?UploadFile(pdt_text_01, "DIR_MAIN") : "";

                string prod_icon = "";
                prod_icon = prod_icon_new.Checked ? "NEW" : prod_icon;
                prod_icon = prod_icon_hot.Checked ? "HOT" : prod_icon;

                StringBuilder param = new StringBuilder();
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("6");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile1);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_url_01.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]); // 로그인ID는 나중에 세션값 체크하여 가져오게 변경(일단 admin로 박음)
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_icon);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile2 = CStringUtil.IsNullOrEmpty(pdt_value_02.Value) == false?UploadFile(pdt_text_02, "DIR_MAIN") : "";

                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("7");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile2);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_url_02.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_icon);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile3 = CStringUtil.IsNullOrEmpty(pdt_value_03.Value) == false?UploadFile(pdt_text_03, "DIR_MAIN") : "";

                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("8");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile3);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_url_03.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_icon);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile4 = CStringUtil.IsNullOrEmpty(pdt_value_04.Value) == false?UploadFile(pdt_text_04, "DIR_MAIN") : "";

                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("9");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile4);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_url_04.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_icon);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                string vFile5 = CStringUtil.IsNullOrEmpty(pdt_value_05.Value) == false?UploadFile(pdt_text_05, "DIR_MAIN") : "";

                param.Length = 0;
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("10");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile5);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(pdt_url_05.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(prod_icon);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("0");

                ExecuteQuery(3101, param.ToString());

                SearchData();

                pdt_value_01.Value = "";
                pdt_value_02.Value = "";
                pdt_value_03.Value = "";
                pdt_value_04.Value = "";
                pdt_value_05.Value = "";

                pdt_url_01.Value = GetData(3, 0, "LINK_URL");
                pdt_url_02.Value = GetData(3, 1, "LINK_URL");
                pdt_url_03.Value = GetData(3, 2, "LINK_URL");
                pdt_url_04.Value = GetData(3, 3, "LINK_URL");
                pdt_url_05.Value = GetData(3, 4, "LINK_URL");
            }
            else if ("SRCH".Equals(inputType))
            {
                // 검색 텍스트
                StringBuilder param = new StringBuilder();
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("2");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]); // 로그인ID는 나중에 세션값 체크하여 가져오게 변경(일단 admin로 박음)
                param.Append(CConst.DB_PARAM_DELIMITER).Append(search_txt_01.Value); // VISUAL 쪽 업데이트이므로 검색텍스트는 공백으로 줌
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");

                ExecuteQuery(3101, param.ToString());

                SearchData();

                search_txt_01.Value = GetData(4, 0, "SRCH_TEXT");
            }
            else if ("POP".Equals(inputType))
            {
                // 메인 팝업 배너 등록
                StringBuilder param = new StringBuilder();

                string vFile1 = CStringUtil.IsNullOrEmpty(pop_value_21.Value) == false?UploadFile(pop_text_21, "DIR_MAIN") : "";

                string use_checkyn    = main_pop_use_yn.Checked ? "Y" : "N";
                string target_checkyn = main_pop_target_yn.Checked ? "Y" : "N";

                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(inputType);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("2");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(vFile1);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(main_pop_link_url.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(use_checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(target_checkyn);
                param.Append(CConst.DB_PARAM_DELIMITER).Append("");
                param.Append(CConst.DB_PARAM_DELIMITER).Append(main_pop_width.Value);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(main_pop_height.Value);

                ExecuteQuery(3101, param.ToString());

                SearchData();


                pop_value_21.Value = "";
            }

            if (CStringUtil.IsNullOrEmpty(result) == false)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result));
            }

            SearchData();
        }
示例#22
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(ttl.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(writer_nm.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(tel.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(email.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(cont.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(gubun.SelectedValue);

            string[] result = null;

            // 입력 모드
            result = ExecuteQueryResult(1501, param.ToString());

            if (result == null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("시스템 오류가 발생 했습니다."));
            }
            else if (result[0].Equals("00") == false)
            {
                // 입력 or 수정 실패
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox(result[1]));
            }
            else
            {
                #region Send Mail
                string html = null;               //메일 내용
                string to   = null;               //수신자

                switch (gubun.SelectedValue)
                {
                case ("1"):                         //동물의약품(국내)
                    to = "*****@*****.**";
                    break;

                case ("2"):                         //동물의약품(해외)
                    to = "*****@*****.**";
                    break;

                case ("3"):                         //인체의약품(국내)
                    to = "*****@*****.**";
                    break;

                case ("4"):                         //인체의약품(해외)
                    to = "*****@*****.**";
                    break;

                case ("5"):                         //바이오의약품
                    to = "*****@*****.**";
                    break;

                case ("6"):                         //기타문의
                    to = "*****@*****.**";
                    break;
                }

                html  = " <html>";
                html += " <head>";
                html += " <title>대한뉴팜</title>";
                html += " <meta http-equiv='Content-Type' content='text/html; charset=euc-kr'>";
                html += " </head>";
                html += " <body>";
                html += " <table width='800' border='0' cellspacing='0' cellpadding='0' >";
                html += " 	<tr>";
                html += " 		<td>";
                html += " 			<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
                html += " 				<tr>";
                html += " 					<td valign='top'><a href=\"https://www.dhnp.co.kr\" target=\"_blank\"><img src=\"http://www.dhnp.co.kr/common/images/mail/top.jpg\"  border=\"0\"></a></td>					";
                html += " 				</tr>";
                html += " 			</table>";
                html += " 		</td>";
                html += " 	</tr>";
                html += " 	<tr>";
                html += " 		<td style=\"padding:30px 20px;\">";
                html += " 			<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
                html += " 				<tr>";
                html += " 					<td>안녕하세요. <br>";
                html += " 						<b><font color=\"#ff731e\">"+ writer_nm.Value + "</font></b>님";
                html += " 							문의사항이 접수되었습니다.";
                html += " 						</td>";
                html += " 					</tr>";
                html += " 					<tr>";
                html += " 						<td style=\"padding:20px 0;\">";
                html += " 							<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"ffffff\">";
                html += " 								<tr>";
                html += " 									<td align=\"center\" bgcolor=\"#ffffff\" >";
                html += " 										<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-top:2px solid #04b25a;\">";
                html += " 											<tr>";
                html += " 												<td width=\"25%\" height=\"29\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;border-right:1px solid #dbdbdb;background:#f9faf9;padding-left:20px;\"><b><font color=\"#000\">구분</font></b></td>";
                html += " 												<td width=\"75%\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;padding-left:20px;\">"+ CConst.CODE_INQUIRY[gubun.SelectedValue] + "</td>";
                html += " 											</tr>	";
                html += " 											<tr>";
                html += " 												<td width=\"25%\" height=\"29\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;border-right:1px solid #dbdbdb;background:#f9faf9;padding-left:20px;\"><b><font color=\"#000\">제목</font></b></td>";
                html += " 												<td width=\"75%\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;padding-left:20px;\">"+ ttl.Value + "</td>";
                html += " 											</tr>";
                html += " 											<tr>";
                html += " 												<td width=\"25%\" height=\"29\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;border-right:1px solid #dbdbdb;background:#f9faf9;padding-left:20px;\"><b><font color=\"#000\">이름</font></b></td>";
                html += " 												<td width=\"75%\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;padding-left:20px;\">"+ writer_nm.Value + "</td>";
                html += " 											</tr>	";
                html += " 											<tr>";
                html += " 												<td width=\"25%\" height=\"29\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;border-right:1px solid #dbdbdb;background:#f9faf9;padding-left:20px;\"><b><font color=\"#000\">연락처</font></b></td>";
                html += " 												<td width=\"75%\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;padding-left:20px;\">"+ tel.Value + "</td>";
                html += " 											</tr>	";
                html += " 											<tr>";
                html += " 												<td width=\"25%\" height=\"29\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;border-right:1px solid #dbdbdb;background:#f9faf9;padding-left:20px;\"><b><font color=\"#000\">이메일</font></b></td>";
                html += " 												<td width=\"75%\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;padding-left:20px;\">"+ email.Value + "</td>";
                html += " 											</tr>";
                html += " 											<tr>";
                html += " 												<td width=\"25%\" height=\"29\" style=\"line-height:45px;border-bottom:1px solid #dbdbdb;border-right:1px solid #dbdbdb;background:#f9faf9;padding-left:20px;\"><b><font color=\"#000\">내용</font></b></td>";
                html += " 												<td width=\"75%\" style=\"line-height:30px;border-bottom:1px solid #dbdbdb;padding:20px;\">";
                html += " 												"+ cont.Value;
                html += " 												</td>";
                html += " 											</tr>	";
                html += " 										</table>";
                html += " 									</td>";
                html += " 								</tr>";
                html += " 							</table>";
                html += " 						</td>";
                html += " 					</tr>								";
                html += " 				</table>				";
                html += " 			</td>";
                html += " 		</tr>";
                html += " 		<tr>";
                html += " 			<td style=\"padding:30px 20px;\">";
                html += " 				";
                html += " 				<table width='100%' border='0' cellspacing='0' cellpadding='0' style=\"border-top:1px solid #e5e5e5;\">";
                html += " 					<tr>";
                html += " 						<td style=\"padding-top:20px;vertical-align:top;\"><img src=\"http://www.dhnp.co.kr/common/images/mail/b_logo.jpg\" ></a></td>";
                html += " 						<td style=\"padding-top:20px;font-size:13px;\">경기도 화성시 향남읍 제약공단1길 66  사업자번호 : 229-81-10729 <br/>";
                html += " 						대표자명 : 배건우  대표전화 : (02)581-2333  팩스 : (02)581-1644 <br/><br/>Copyright (c) Daehan New Pharm Co.,Ltd All right reserved.</td>";
                html += " 					</tr>";
                html += " 				</table>";
                html += " 			</td>";
                html += " 		</tr>";
                html += " </table>";
                html += " </body>";
                html += " </html>";


                MailMessage mail = new MailMessage();
                mail.From = new MailAddress("*****@*****.**");
                mail.To.Add(to);
                mail.Subject    = ttl.Value;
                mail.Body       = html;
                mail.IsBodyHtml = true;

                SmtpClient client = new SmtpClient("mail-002.webterhosting.co.kr");
                client.UseDefaultCredentials = true;
                client.Credentials           = new NetworkCredential("*****@*****.**", "leadsun1");

                try
                {
                    client.Send(mail);
                }
                catch (SmtpException ex)
                {
                    throw new Exception(ex.Message, ex);
                }
                #endregion

                //ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("접수 되었습니다."));
                CWebUtil.jsAlertAndRedirect(this, "접수 되었습니다.", Request.ServerVariables["SCRIPT_NAME"]);

                ttl.Value       = "";
                writer_nm.Value = "";
                tel.Value       = "";
                email.Value     = "";
                cont.Value      = "";
            }
        }