示例#1
0
        /// <summary>
        /// 데이터 삭제
        /// </summary>
        private void RemoveData()
        {
            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(ProdCd);

                string[] result = ExecuteQueryResult(3206, 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("입력모드에서는 지원하지 않습니다."));
            }
        }
示例#2
0
        protected string UploadFile(FileUpload upload, string dirKey)
        {
            string saveFileName = "";

            if (upload.HasFile)
            {
                string sourceDir = DirUtil.GetUploadDir(dirKey);
                string newFile   = CStringUtil.GetNewFileName(upload.FileName);
                saveFileName = sourceDir + newFile;

                // 물리파일 전체 경로
                string physicalPath = CConst.DIR_ROOT_IMAGE_PATH + saveFileName;

                // 디렉토리 존재 유무 검사 후 디렉토리 생성
                DirUtil.MakeDir(CConst.DIR_ROOT_IMAGE_PATH + sourceDir);

                // 파일 저장
                upload.SaveAs(physicalPath);

                string fileUrl = CConst.DOMAIN_IMAGE + saveFileName;
                //string fileUrl = DirUtil.CopyRemoteServer(sourceDir, newFile);

                if (CStringUtil.IsNullOrEmpty(fileUrl))
                {
                    // 실패한 경우에 파일 명 공백
                    saveFileName = "";
                }
                else
                {
                    saveFileName = fileUrl;
                }
            }

            return(saveFileName);
        }
示例#3
0
        private void ReadIndex(FileStream file)
        {
            var arr     = new byte[header.directorySize];
            int readLen = file.Read(arr, 0, header.directorySize);

            if (readLen != header.directorySize)
            {
                Debug.WriteLine(String.Format(
                                    "ERROR: File reading: Expecting length {0}, got {1}.",
                                    header.directorySize, readLen));
                throw new VpkException(VpkException.ExceptionReason.Unknown);
            }
            try {
                for (int i = 0; i < readLen;)
                {
                    // Ahh, ref.Cannot imagine whatif it's in java.
                    // https://www.c-sharpcorner.com/article/ref-keyword-in-c-sharp/
                    // https://stackoverflow.com/questions/186891/why-use-the-ref-keyword-when-passing-an-object
                    var extensionName = CStringUtil.ReadCString(arr, ref i);
                    if (extensionName.Length == 0)
                    {
                        break;
                    }
                    var extensionNode = new Dictionary <string, Dictionary <string, VpkContainedFileDescription> >();
                    Vindex[extensionName] = extensionNode;
                    i = ReadUnderExtensionName(arr, i, extensionNode);
                }
            } catch (InvalidOperationException) {
                Debug.WriteLine(
                    "ERROR: File index parsing: Reading null-terminated string out of bound."
                    );
                throw new VpkException(VpkException.ExceptionReason.Unknown);
            }
        }
示例#4
0
        /// <summary>
        /// ID에 해당하는 매뉴 권한을 가져온다.
        /// </summary>
        /// <param name="adminId"></param>
        /// <returns></returns>
        private List <string> GetMenuAuth(string adminId)
        {
            List <string> list = null;

            if (CStringUtil.IsNullOrEmpty(adminId) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(adminId);

                DataSet ds = GetDataSet(3001, param.ToString());

                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    list = new List <string>();

                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        list.Add(ds.Tables[0].Rows[i]["MENU_NO"].ToString());
                    }
                }
                else
                {
                    ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("접근 권한이 없습니다."));
                    Response.Redirect("index.aspx");
                }
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "test", CWebUtil.MsgBox("접근 권한이 없습니다."));
                Response.Redirect("index.aspx");
            }

            return(list);
        }
示例#5
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            string img1 = CStringUtil.IsNullOrEmpty(upload_path_01.Value) == false?UploadFile(upload_01, "DIR_PROMOTION") : "";

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

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

            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD); // 언어코드
            param.Append(CConst.DB_PARAM_DELIMITER).Append(ttl.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(intro.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value);
            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(catalog);

            string[] result = null;

            string prodCd = string.Empty;

            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                // 수정 모드 - prodcd 추가
                param.Append(CConst.DB_PARAM_DELIMITER).Append(ProdCd);

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

                prodCd = ProdCd;
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3214, param.ToString());

                if (result != null && result.Length == 3)
                {
                    prodCd = result[2];
                }
            }

            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(prodCd);
            }
        }
示例#6
0
        // 이미지 파일을 서버에 저장하고 저장한 정보를 클라이언트에 보내줌.
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HttpFileCollection uploadedFiles = Request.Files;

                string callback_func = Request.Form["callback_func"];

                // 다수의 파일을 다운로드 하여 파일을 저장함
                for (int j = 0; j < uploadedFiles.Count; j++)
                {
                    HttpPostedFile userPostedFile = uploadedFiles[j];

                    // 파일 내용이 있을경우
                    if (userPostedFile.ContentLength > 0)
                    {
                        string sourceDir    = DirUtil.GetUploadDir("DIR_SMARTEDITOR");
                        string newFile      = CStringUtil.GetNewFileName(new FileInfo(userPostedFile.FileName).Name);
                        string saveFileName = sourceDir + newFile;

                        // 물리파일 전체 경로
                        string physicalPath = CConst.DIR_ROOT_IMAGE_PATH + saveFileName;

                        //logger.Debug("physicalPath:" + physicalPath);

                        // 디렉토리 존재 유무 검사 후 디렉토리 생성
                        DirUtil.MakeDir(CConst.DIR_ROOT_IMAGE_PATH + sourceDir);

                        // 파일 저장
                        userPostedFile.SaveAs(physicalPath);

                        string fileUrl = saveFileName;

                        if (CStringUtil.IsNullOrEmpty(fileUrl))
                        {
                            // 실패한 경우에 파일 명 공백
                            saveFileName = "";
                        }
                        else
                        {
                            saveFileName = fileUrl;
                        }

                        // 클라이언트에 저장한 파일 정보를 보내 줌
                        string returnUrl = string.Format("callback.html?callback_func={0}&bNewLine=true&sFileName={1}&sFileURL={2}",
                                                         callback_func, newFile, fileUrl);

                        Response.Redirect(returnUrl);
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('첨부파일 등록중 에러발생');", true);
                    }
                }
            }
        }
示例#7
0
        /// <summary>
        /// 데이터 조회
        /// </summary>
        private void SearchData()
        {
            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(Seq);

                SetDataList(3518, param.ToString());
            }
        }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HttpFileCollection uploadedFiles = Request.Files;

                // 다수의 파일을 다운로드 하여 파일을 저장함
                for (int j = 0; j < uploadedFiles.Count; j++)
                {
                    HttpPostedFile userPostedFile = uploadedFiles[j];

                    // 파일 내용이 있을경우
                    if (userPostedFile.ContentLength > 0)
                    {
                        string sourceDir = DirUtil.GetUploadDir("DIR_RECRUITMENT_USER");
                        string newFile   = CStringUtil.GetNewFileName(userPostedFile.FileName);
                        if (newFile.Contains(@"\"))
                        {
                            string[] arr_newfile = newFile.Split(new char[] { '\\' });
                            newFile = arr_newfile[arr_newfile.Length - 1];
                        }
                        string saveFileName = sourceDir + newFile;

                        // 물리파일 전체 경로
                        string physicalPath = CConst.DIR_ROOT_IMAGE_PATH + saveFileName;

                        // 디렉토리 존재 유무 검사 후 디렉토리 생성
                        DirUtil.MakeDir(CConst.DIR_ROOT_IMAGE_PATH + sourceDir);

                        // 파일 저장
                        userPostedFile.SaveAs(physicalPath);

                        string fileUrl = saveFileName;

                        if (CStringUtil.IsNullOrEmpty(fileUrl))
                        {
                            // 실패한 경우에 파일 명 공백
                            saveFileName = "";
                        }
                        else
                        {
                            saveFileName = fileUrl;
                        }

                        //CXmlMaker xmlMaker = new CXmlMaker();
                        //xmlMaker.StartXml();
                        //xmlMaker.Tag("file_path", saveFileName);

                        Response.Write(saveFileName);
                        Response.Flush();
                        Response.End();
                    }
                }
            }
        }
示例#9
0
        /// <summary>
        /// 데이터 조회
        /// </summary>
        private void SearchData()
        {
            if (CStringUtil.IsNullOrEmpty(ProdCd) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(LANG_CD);
                param.Append(CConst.DB_PARAM_DELIMITER).Append(ProdCd);

                // DataSet타입으로 Set
                SetDataTableList(3203, param.ToString());
            }
        }
示例#10
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)
        /// </summary>
        private void SaveData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(rcm_ttl.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(StartDate);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(EndDate);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(rcm_cd_reg.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(Request["duty_no"]);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"].ToString());

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(Seq) == false && Seq.Equals("0") == false)
            {
                // 수정모드 - SEQ 파라미터로 판단
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Seq);

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

                if (result != null && result.Length == 3)
                {
                    param.Length = 0;
                    param.Append(Seq);

                    ExecuteQueryResult(3527, param.ToString());

                    SaveRcmCode(Seq);
                }
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3523, param.ToString());

                if (result != null && result.Length == 3)
                {
                    string reg_seq_no = result[2];

                    SaveRcmCode(reg_seq_no);
                }
            }

            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]));
            }
        }
示例#11
0
        /// <summary>
        /// 데이터 조회
        /// </summary>
        private void SearchData()
        {
            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(Seq);

                SetDataList(3623, param.ToString());

                lang_cd.Value = GetData(0, "LANG_CD");
            }
        }
示例#12
0
        /// <summary>
        /// Top 네비 상단 사용자 이름
        /// </summary>
        /// <returns></returns>
        protected string GetUserName()
        {
            string result = (string)Session["admin_nm"];

            if (CStringUtil.IsNullOrEmpty(result))
            {
                // session null이면 session이 만료되었거나 서버 재시작이 있었기 때문에 logout시킴
                Logout();
            }

            return(result);
        }
示例#13
0
        /// <summary>
        /// DB를 통해 동적으로 셋팅해야 되는 컨트롤
        /// 분류관련 selectbox류들
        /// </summary>
        private void SetControls()
        {
            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CATG_NO1);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(PROD_TYPE_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CStringUtil.GetInitial(LANG_CD, "S", ProdInitial));
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CStringUtil.GetInitial(LANG_CD, "E", ProdInitial));
            param.Append(CConst.DB_PARAM_DELIMITER).Append(search_text.Value);

            catgDs = GetDataSet(1100, param.ToString());
        }
示例#14
0
        /// <summary>
        /// 데이터 체크
        /// </summary>
        private void CheckData()
        {
            if (CStringUtil.IsNullOrEmpty(lastDate) == false)
            {
                int diff = CDateUtil.GetDiffDate(lastDate, CDateUtil.getYYYYMMDDHHMMSS());

                if (diff >= CConst.MAX_DATA_FILE_TIME)
                {
                    // MAX_DATA_FILE_TIME(분) 이상 데이터를 못가져오고 있는 경우: 커넥션을 다시 맺음(서버접속 및 로그인)
                    ReConnection();
                }
            }
        }
示例#15
0
        /// <summary>
        /// 글자수 제한(len)이 있는 줄단위 정보 출력 by 줄번호, 컬럼명
        /// </summary>
        /// <param name="rowNum">줄번호</param>
        /// <param name="colName">컬럼명</param>
        /// <param name="len">제한길이</param>
        /// <returns>데이터</returns>
        protected string GetData(int rowNum, string colName, int len)
        {
            string data = GetData(rowNum, colName);

            if (CStringUtil.IsNullOrEmpty(data) == false && Encoding.Default.GetByteCount(data) > len)
            {
                byte[] buf = Encoding.Default.GetBytes(data);
                data = Encoding.Default.GetString(buf, 0, len) + "...";
                buf  = null;
            }

            return(data);
        }
示例#16
0
        protected string GetFileName(string path, int len)
        {
            string filename = CStringUtil.GetOrgFileName(path);

            if (CStringUtil.IsNullOrEmpty(filename) == false && Encoding.Default.GetByteCount(filename) > len)
            {
                byte[] buf = Encoding.Default.GetBytes(filename);
                filename = Encoding.Default.GetString(buf, 0, len) + "...";
                buf      = null;
            }

            return(filename);
        }
示例#17
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") : "";

            StringBuilder param = new StringBuilder();

            param.Append(writerNm.Value);
            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");
            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(mv_path_story.Value);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(reg_date.Value);

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                // 수정모드 - SEQ 파라미터로 판단
                param.Append(CConst.DB_PARAM_DELIMITER).Append(Seq);

                result = ExecuteQueryResult(3225, param.ToString());
            }
            else
            {
                // 입력 모드
                result = ExecuteQueryResult(3224, 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]));
            }
        }
示例#18
0
        /// <summary>
        /// 데이터 조회
        /// </summary>
        private void SearchData()
        {
            StringBuilder param = new StringBuilder();

            param.Append(LANG_CD);
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CATG_NO1);     // 1차 카테고리(동물의약품)
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CatgNo2);      // 2차 카테고리 (항생.소독제)
            param.Append(CConst.DB_PARAM_DELIMITER).Append(PROD_TYPE_CD); // 제품유형 코드
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CStringUtil.GetInitial(LANG_CD, "S", ProdInitial));
            param.Append(CConst.DB_PARAM_DELIMITER).Append(CStringUtil.GetInitial(LANG_CD, "E", ProdInitial));
            param.Append(CConst.DB_PARAM_DELIMITER).Append(SearchText); // 태그명으로 검색

            SetDataList(2001, param.ToString());
        }
示例#19
0
        /// <summary>
        /// 데이터를 저장한다. (추가 or 수정)   param.Append(CConst.DB_PARAM_DELIMITER).Append(hdnContent.Value.Replace("|", "&#124;"));
        /// </summary>
        private void SaveData()
        {
            string IMG_TITLE = CStringUtil.IsNullOrEmpty(IMG_TITLE_VALUE.Value) == false?UploadFile(IMG_TITLE_TEXT, "DIR_EVENT") : "";

            IMG_TITLE = CStringUtil.IsNullOrEmpty(IMG_TITLE) == true ? IMG_TITLE_VALUE.Value : IMG_TITLE;

            string IS_SHOW = IS_SHOW_Y.Checked ? "Y" : "N";

            StringBuilder param = new StringBuilder();

            // WRITER_ID.Value = (string)Session["admin_id"];

            param.Append(" ").Append("'").Append(WRITER_ID.Value).Append("'");
            param.Append(",'").Append(EVT_TTL.Value).Append("'");
            param.Append(",'").Append(START_DATE).Append("'");
            param.Append(",'").Append(END_DATE).Append("'");
            param.Append(",'").Append(IMG_TITLE).Append("'");
            param.Append(",'").Append(CONT_T.Value).Append("'");
            param.Append(",'").Append(CONT_B.Value).Append("'");
            param.Append(",'").Append(IS_SHOW).Append("'");
            param.Append(",'").Append(ITEMS.Value).Append("'");

            string[] result = null;

            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                // 수정모드 - SEQ 파라미터로 판단
                param.Append(",").Append(Seq);
                System.Diagnostics.Debug.WriteLine("1 proc_nm:" + "USP_ADMIN_4000_EVT_EVENT_DETAIL_U" + param.ToString());

                result = ExecuteQueryResult("USP_ADMIN_4000_EVT_EVENT_DETAIL_U" + param.ToString());
            }
            else
            {
                // 입력 모드
                System.Diagnostics.Debug.WriteLine("1 proc_nm:" + "USP_ADMIN_4000_EVT_EVENT_DETAIL_I" + param.ToString());

                result = ExecuteQueryResult("USP_ADMIN_4000_EVT_EVENT_DETAIL_I" + 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]));
            }
        }
示例#20
0
        private void SaveData()
        {
            if (CStringUtil.IsNullOrEmpty(Upr_catg_no) == false)
            {
                string repFile = CStringUtil.IsNullOrEmpty(path_value_01.Value) == false?UploadFile(file_01, "DIR_PRODUCT") : "";

                string repFileEng = CStringUtil.IsNullOrEmpty(path_value_02.Value) == false?UploadFile(file_02, "DIR_PRODUCT") : "";

                string[] result = null;

                if (CStringUtil.IsNullOrEmpty(repFile) == false)
                {
                    StringBuilder param = new StringBuilder();
                    param.Append(Upr_catg_no);
                    param.Append(CConst.DB_PARAM_DELIMITER).Append("KOR");
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(repFile);
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);

                    result = ExecuteQueryResult(3232, param.ToString());
                }

                if (CStringUtil.IsNullOrEmpty(repFileEng) == false)
                {
                    StringBuilder param = new StringBuilder();
                    param.Append(Upr_catg_no);
                    param.Append(CConst.DB_PARAM_DELIMITER).Append("ENG");
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(repFileEng);
                    param.Append(CConst.DB_PARAM_DELIMITER).Append(Session["admin_id"]);

                    result = ExecuteQueryResult(3232, param.ToString());
                }

                if (result == null)
                {
                    CWebUtil.jsAlertAndRedirect(this, "시스템 오류가 발생 했습니다.", "pdt_catalog_list.aspx?upr_catg_no=" + Upr_catg_no);
                }
                else if (result[0].Equals("00") == false)
                {
                    CWebUtil.jsAlertAndRedirect(this, result[1], "pdt_catalog_list.aspx?upr_catg_no=" + Upr_catg_no);
                }
                else
                {
                    Response.Redirect("pdt_catalog_list.aspx?upr_catg_no=" + Upr_catg_no);
                }
            }
            else
            {
                CWebUtil.jsAlertAndRedirect(this, "카테고리가 선택되지 않았습니다.", "pdt_catalog_list.aspx?upr_catg_no=" + Upr_catg_no);
            }
        }
示例#21
0
        protected void btnDel_Click1(object sender, EventArgs e)
        {
            StringBuilder param = new StringBuilder();

            param.Append(" ").Append(Seq);

            //WRITER_ID.Value = (string)Session["admin_id"];
            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                System.Diagnostics.Debug.WriteLine("1 proc_nm:" + "USP_ADMIN_4000_EVT_EVENT_DETAIL_U" + param.ToString());

                ExecuteQueryResult("USP_ADMIN_4000_EVT_EVENT_DETAIL_D" + param.ToString());

                Response.Redirect("./event_list.aspx");
            }
        }
示例#22
0
        /// <summary>
        /// 데이터 조회
        /// </summary>
        private void SearchData()
        {
            if (CStringUtil.IsNullOrEmpty(Seq) == false)
            {
                StringBuilder param = new StringBuilder();
                param.Append(" ").Append(Seq);

                // 데이터 카운트 조회
                String proc_nm = "USP_ADMIN_4000_EVT_EVENT_DETAIL_S";

                System.Diagnostics.Debug.WriteLine("1 proc_nm:" + proc_nm + param.ToString());

                DataSet ds = GetDataSet(proc_nm + param.ToString());
                this.SetDataRow(ds); // by renamaster
            }
        }
示例#23
0
        /// <summary>
        /// 글자수 제한(len)이 있는 줄단위 정보 출력 by 줄번호, 컬럼명
        /// </summary>
        /// <param name="rowNum">줄번호</param>
        /// <param name="colName">컬럼명</param>
        /// <param name="len">제한길이</param>
        /// <returns>데이터</returns>
        protected string GetData(int rowNum, string colName, int len)
        {
            string data = GetData(rowNum, colName);

            if (CStringUtil.IsNullOrEmpty(data) == false && Encoding.Default.GetByteCount(data) > len)
            {
                // 성능에 영향은 있으나 아래 방식으로 처리함
                data = CStringUtil.StringTransfer(data, len);

                // 이전 로직 주석
                //byte[] buf = Encoding.Default.GetBytes(data);
                //data = Encoding.Default.GetString(buf, 0, len) + "...";
                //buf = null;
            }

            return(data);
        }
示例#24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CStringUtil.IsNullOrEmpty(RegSeqNo))
                {
                    CWebUtil.jsAlertAndRedirect(this, "잘못된 경로로 진입하였습니다.", "/recruit/job_guide_list.aspx");
                }

                SearchData();

                if (CStringUtil.IsNullOrEmpty(GetData(0, "IS_PROCESSING")) || GetData(0, "IS_PROCESSING").Equals("N"))
                {
                    CWebUtil.jsAlertAndRedirect(this, "채용완료된 공고이거나 없는 채용공고 입니다.", "/recruit/job_guide_list.aspx");
                }
            }
        }
示例#25
0
        private int ReadUnderPath(byte[] buffer, int offset, Dictionary <string, VpkContainedFileDescription> pathNode)
        {
            int maxLen = buffer.Length;

            while (offset < maxLen)
            {
                var name = CStringUtil.ReadCString(buffer, ref offset);
                if (name.Length == 0)
                {
                    break;
                }
                //name = JoinPath(path, name, extensionName);
                var fileNode = new VpkContainedFileDescription(name);
                pathNode[name] = fileNode;
                offset         = ReadFileIndexerOfName(buffer, offset, fileNode);
            }
            return(offset);
        }
示例#26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CStringUtil.IsNullOrEmpty(DutyNo) == false && "S".Equals(CRUD))
                {
                    SetDetail();
                }
                else if (CStringUtil.IsNullOrEmpty(DutyNo) == false && "D".Equals(CRUD))
                {
                    DelData();
                }

                SearchData();

                SetControls();
            }
        }
示例#27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CStringUtil.IsNullOrEmpty(VCatgNo) == false && "S".Equals(CRUD))
                {
                    // 수정 모드일때, 버튼 텍스트 수정으로 변경
                    hSaveMode.Value = "U";

                    SearchDetail();
                }
                else if (CStringUtil.IsNullOrEmpty(VCatgNo) == false && "D".Equals(CRUD))
                {
                    RemoveData();
                }

                SearchData();
            }
        }
示例#28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CStringUtil.IsNullOrEmpty(AdminId) == false && "S".Equals(CRUD))
                {
                    // 관리자 수정 모드일때, 동적으로 readonly 속성 추가
                    sys_insert_member_id.Attributes.Add("readonly", "readonly");

                    SetDetailAdmin();
                }
                else if (CStringUtil.IsNullOrEmpty(AdminId) == false && "D".Equals(CRUD))
                {
                    RemoveAdminData(AdminId);
                }

                SearchData();
            }
        }
示例#29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CStringUtil.IsNullOrEmpty(DutyNo) == false && "S".Equals(CRUD))
                {
                    // 수정 모드일때, 동적으로 readonly 속성 추가
                    duty_no.Attributes.Add("readonly", "readonly");

                    SetDetail();
                }
                else if (CStringUtil.IsNullOrEmpty(DutyNo) == false && "D".Equals(CRUD))
                {
                    DelData();
                }

                SearchData();
            }
        }
示例#30
0
        private void SetControls()
        {
            DataSet ds = GetDataSet(3811, null);

            upr_duty_no.Items.Add(new ListItem("선택", ""));

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    upr_duty_no.Items.Add(new ListItem(ds.Tables[0].Rows[i]["DUTY_NM"].ToString(), ds.Tables[0].Rows[i]["DUTY_NO"].ToString()));

                    if (CStringUtil.IsNullOrEmpty(m_upr_duty_no) == false && m_upr_duty_no.Equals(ds.Tables[0].Rows[i]["DUTY_NO"].ToString()))
                    {
                        upr_duty_no.SelectedIndex = i + 1;
                    }
                }
            }
        }