Exemplo n.º 1
0
    public void DownLoadCSVFile()
    {
        string out_msg   = string.Empty;
        string proc_name = xmlCommonUtil.PROCEDURE_TITLE;

        SqlParameter[] sqlparams = xmlCommonUtil.SQLPARAMETERS;
        DataSet        ds        = null;

        try
        {
            ds = xmlCommonUtil.ReturnDataSet_Common(proc_name, sqlparams, false, out out_msg);
        }
        catch (Exception ex)
        {
            out_msg = xmlCommonUtil.returnErrorMSGXML("DownLoadCSVFile", ex);
        }

        if (!string.IsNullOrEmpty(out_msg))
        {
            xmlCommonUtil.ResponseWrite(out_msg);
            return;
        }

        if (ds == null || ds.Tables.Count == 0)
        {
            xmlCommonUtil.ResponseWriteErrorMSG("DownLoadCSVFile 리턴 데이터에 오류가 있습니다.");
            return;
        }

        this.MakeCSVFile(ds);
    }
Exemplo n.º 2
0
    /// <summary>
    /// 파일 존재여부 확인
    /// </summary>
    #endregion
    public void GetFileInfo()
    {
        /*
         * gubun = file_info
         * attachment_key = string
         */

        _httpContext.Response.ClearHeaders();
        _httpContext.Response.ClearContent();
        _httpContext.Response.Clear();

        string xmldata = XMLCommonUtil.XMLHeader;

        try
        {
            string fileFullPath = this.ReturnFileFullPath(ATTACHMENT_KEY);

            //가져온 파일정보에 맞는 파일을 리턴한다.
            if (File.Exists(fileFullPath))
            {
                xmldata += xmlCommonUtil.returnMSGXML("1", "서버상에 해당 파일이 존재합니다.");
            }
            else
            {
                xmldata += xmlCommonUtil.returnErrorMSGXML("서버상에 해당 파일이 존재하지 않습니다.");
            }
        }
        catch (Exception ex)
        {
            xmldata += xmlCommonUtil.returnErrorMSGXML("httpservice(GetFileInfo).Error check", ex);
        }
        finally
        {
            _httpContext.Response.Write(xmldata);
            _httpContext.Response.End();
        }
    }