반응형
$.ajax({
	type: "POST",
	url: 유알엘(Url),
	dataType: "json",
	data: 데이터,
	success: function (result, status, xhr) {
		//결과 값 
	},
	beforeSend: function (){  
		$("#Progress_Bar").show(); //프로그래스 바
	},
	complete : function (){
		$("#Progress_Bar").hide(); //프로그래스 바
	},
	error: function (xhr, status, error) {
		alert("[Error]관리자에게 문의 해 주세요. " + status);
		return;
	}
});

 

beforeSend는 Ajax를 보내기 전에 쓰는 함수

complete는 ajax 작업이 끝나고 나서 쓰는 함수.

ajax에 async: false 로 되어있다면 프로그래스는 되지 않을 것 입니다.

 

반응형

HTML

 

CSS
/* 프로그래스 바 CSS */

.Progress_Bar {width: 100%;height: 100%;top: 0px;left: 0px;position: fixed;display: block;opacity: 0.7;background-color: #fff;z-index: 99;text-align: center;}
.Progress_Bar_Image {position: absolute;top: 50%;left: 50%;z-index: 100;}

 

JS

$(window).load(function(){
      $("#Progress_Bar").hide();
});

 

$("#Progress_Bar").hide(); 중요.
※Progress_Bar를 버튼 혹은 function에서 Show 시켜주고 마지막에 hide 시켜주면 됨 .

 

 

반응형
[HttpPost]
public ActionResult GetRSSData(JsonData value)
{
	DataTable dt = new DataTable();
	dt = JsonConvert.DeserializeObject(value.vJsonData);
	string str_RssData = "";

	XmlDocument rssXmlDoc = new XmlDocument();
	rssXmlDoc.Load(dt.Rows[0]["Blog_URL"].ToString());

	str_RssData = rssXmlDoc.InnerXml;

	//XmlNodeList rssNodes = rssXmlDoc.SelectNodes("rss/channel/item");
	//StringBuilder rssContent = new StringBuilder();

	return this.Content(str_RssData, "text/xml");
}

 

반응형

EX ) https://img.youtube.com/vi/43wv4zsfngs/maxresdefault.jpg

참조 : https://webdir.tistory.com/472

-직접 다 설정 해야함.

https://img.youtube.com/vi/43wv4zsfngs/hqdefault.jpg 

최대 해상도 썸네일(1920x1080) : maxresdefault.jpg
고해상도 썸네일(1280x720, 1920x1080) : maxresdefault.jpg
중간해상도 썸네일(640x480) : sddefault.jpg
고품질 썸네일(480x360) : hqdefault.jpg
중간품질 썸네일(320x180) : mqdefault.jpg
보통품질 썸네일(120x90) : default.jpg
표준형 썸네일(640x480) : sddefault.jpg

반응형
[HttpGet]
public ActionResult GetCargoInfo(RtnFilesInfo value)
{
string str_crkyCn = value.crkyCn;
string str_cargMtNo = value.cargMtNo;
string str_mblNo = value.mblNo;
string str_hblNo = value.hblNo;
string str_blYy = value.blYy;

//화물관리번호 , BL 사용해서 했는지 확인 여부 필요.

	try
	{
		string url = "https://unipass.customs.go.kr:38010/ext/rest/cargCsclPrgsInfoQry/retrieveCargCsclPrgsInfo?crkyCn=i220k129u161i054w030p040s2&cargMtNo=00ANLU083N59007001";
		//uri = new Uri(url); // string 을 Uri 로 형변환
		string responseText = string.Empty;

		HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
		request.Method = "GET";

		using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse())
		{
			HttpStatusCode status = resp.StatusCode;
			Console.WriteLine(status);  // 정상이면 "OK"


			Stream respStream = resp.GetResponseStream();
			using (StreamReader sr = new StreamReader(respStream))
			{
				responseText = sr.ReadToEnd();
				Console.WriteLine(responseText);
			}
		}
	}
	catch(Exception ex)
	{
		Console.WriteLine(ex.Message);
	}

	string sURL;
	sURL = "https://unipass.customs.go.kr:38010/ext/rest/cargCsclPrgsInfoQry/retrieveCargCsclPrgsInfo?crkyCn=i220k129u161i054w030p040s2&cargMtNo=00ANLU083N59007001";

	WebRequest wrGETURL;
	wrGETURL = WebRequest.Create(sURL);
	WebProxy myProxy = new WebProxy("myproxy", 80);

	myProxy.BypassProxyOnLocal = true;

	wrGETURL.Proxy = WebProxy.GetDefaultProxy();

	Stream objStream;
	objStream = wrGETURL.GetResponse().GetResponseStream();

	StreamReader objReader = new StreamReader(objStream);

	string sLine = "";
	int i = 0;
	string ReadingText = "";
	while (sLine != null)
	{
		i++;
		sLine = objReader.ReadLine();
		ReadingText += sLine;
		//if (sLine != null)
		//    Console.WriteLine("{0}:{1}", i, sLine);
	}
	//MessageBox.Show(ReadingText);
	//Console.WriteLine(ReadingText);
				//Console.ReadLine();
	System.Diagnostics.Debug.WriteLine(ReadingText);

	return this.Content(ReadingText, "text/xml");
}
반응형
select 
        table_name, 
        num_rows,
        num_rows * avg_row_len, 
        avg_row_len,
        round((num_rows * avg_row_len/1024/1024),2) "SIZE(Mb)", 
        round((num_rows * avg_row_len/1024/1024/1024),2) "SIZE(Gb)",
        last_analyzed
from user_tables
where table_name='테이블 네임'
반응형
SELECT 'ALTER TABLE ' || TABLE_NAME || ' MODIFY ' || COLUMN_NAME || ' ' || DATA_TYPE || '(' || DATA_LENGTH  || ' CHAR);' 
FROM ALL_TAB_COLUMNS 
WHERE DATA_TYPE IN ('VARCHAR2') AND OWNER = 'DB사용자이름'

 

반응형

[2021.04.23]
※XML 데이터를 받아오면 데이터를 파싱해서 가져와야 합니다.
<부모이름>
<자식></자식>
<자식></자식>
<자식></자식>
</부모이름>

이런식의 XML이 있을 경우 부모 이름을 먼저 가져온 다음 반복문으로 나머지 자식 데이터를 가져와야 합니다.

EX)

function fnXmlParsing(vXML){

	//AUMEL
	console.log($(vXML).find('XML부모이름').text());

	//alert($(vXML).find('동일한 부모 이름').length);
	//여러개
	$(vXML).find('동일한 부모 이름').each(function(){ // Jquery 반복문인 each를 사용 하였습니다.
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
		console.log($(this).find("xml 자식 이름").text());
	});
}

+ Recent posts