posted by 준치 2011. 9. 2. 10:43

자바와 인터페이스 하는데 웹서비스로 구현하기로 했다..

그래서 궁금해서 찾다보니 자바로 생성하는것과 닷넷에서 가져다 쓰는 방법이 나왔다...ㅎㅎ

닷넷으로는 많이 해봤지만.. 자바와는 이렇게 되는군..^^

즐거운 하루~

출처 : http://www.codeproject.com/KB/java/Invoke_Java_WS_In_CS.aspx

posted by ekfn 2011. 4. 1. 18:30

참고 URL : http://blogs.msdn.com/b/bharry/archive/2010/06/04/vs-2010-and-sourcesafe.aspx

1. Tools menu

2. Select Options from the Tools menu

3. Select Source Control from the tree view in the Options dialog

4. Select the Plug-in Selection

5. Finally set the source control plug-in from the drop down that is label Current source control plug-in:

You should see an option for Microsoft Visual SourceSafe. Please select that option and you should be good.

If later you decide to use Team foundation server just follow the same steps and select the option for TFS.

posted by ekfn 2011. 3. 9. 14:12
 cs code

dropdownlist.Attributes.Add("OnChange", "fnSelect();");

aspx code

    <script type="text/javascript">
        function fnSelect() {
           
            //ChangeSelect();
        }
    </script>
posted by 준치 2010. 7. 19. 14:56
int aaa = 123456789;
string money = String.Format("{0:#,###}", aaa);
writer.WriteLine(money);

저렇게해서 찍으면...ㅎㅎ

123,456,789  이렇게 나와요..ㅎㅎㅎ
posted by ekfn 2009. 8. 26. 11:25

참조 : http://blog.naver.com/oojuk?Redirect=Log&logNo=100019320017


데이터 형식 매핑

프록시에서 데이터 변환을 처리하지만 프록시 프로그래머는 변수를 선언하기 위해 해당 정보를 매핑해야 합니다. 다음 예제는 SAP와 .Net 간의 단순 데이터 형식 매핑을 보여 줍니다.

단순 데이터 형식

SAP 데이터 형식 .Net 형식
C (String) String
I (integer)F Int32
F (float) Double
D (date) String
T (time) String
P (BCD Packed, Currency, Decimal, Qty) Decimal
N (Numc) String
X (Binary and Raw) Byte[]
RFC String String
XString Byte[]
표 1. SAP 및 .Net 간의 단순 데이터 형식 매핑

복잡한 데이터 형식

SAP 형식 .Net 형식
구조 C# 클래스: SAPStructure
일반 ITAB C# 클래스: SAPTable
Type I 테이블 버전 1에서 지원되지 않음
Type II 테이블 C# 클래스

 

posted by 준치 2009. 5. 28. 23:25

내가 볼때 이양반들 쵝오입니다..ㅎㅎㅎ
다행이 문제는 해결됐으나...제설치가 되어야 할꺼 같네여...

암튼 감사합니다..ㅎㅎㅎ

http://kin.naver.com/detail/detail.php?d1id=1&dir_id=10201&eid=zBqcvPZ4v4X+8X21uSdfsVCadSYUGoqj&qb=bXNpZXhlYw==&enc=utf8&pid=fmIk8soi5TVsssPJdXssss--180798&sid=Sh6NV@ZSHkoAAFcVdz0

http://blog.naver.com/dashtoss/60039293095

posted by 준치 2009. 3. 11. 01:59
수치 소수점 이하 값을 버리려면 Math클래스의 정적 메소드 Floor를 사용하고 반올림할 경우에는 Ceiling을 사용합니다. 즉, Floor는 마지막 수가 작은 값이면 잘라버리고 Ceiling은 보다 큰 값이면 반올림한다는 것입니다.

사용방법은 아래와 같습니다.

   Math.Floor(Decimal)
   Math.Ceiling(Decimal)

파라미터에 Decimal형을 사용하는데 이는 .NET Framework 2.0이후부터 지원하게 되었고 Double형도 사용할 수 있습니다.

using System;
using System.Collections.Generic;
using System.Text;

namespace Math1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Math메소드로 소수점 처리 방법");
            decimal pf = Math.Floor(1.7m);
            Console.WriteLine(pf);

            decimal pc = Math.Ceiling(1.7m);
            Console.WriteLine(pc);
        }
    }


<결과>
Math메소드로 소수점 처리 방법
1
2

[참고] 소수점 2자리단위로 정리하고 싶은 경우

using System;
using System.Collections.Generic;
using System.Text;

namespace Math2
{
    class Program
    {
        static void Main(string[] args)
        {
            decimal v = 1.34m;

            v *= 10;
            Console.WriteLine("1.34m *= 10 = {0}", v);

            v = Math.Floor(v);
            v /= 10;
            Console.WriteLine("Result = {0}", v);
        }
    }


출처 : http://www.01kim.kr/bbs/cstips/page/3
posted by 준치 2009. 2. 10. 13:09

HttpBrowserCapabilities brow;

brow = HttpContext.Current.Request.Browser;

public browser()
{
if (brow.Browser == "IE")
{
if (brow.MajorVersion >= 8)
{
            }
 else if (brow.MajorVersion == 7)
            {
                s = brow.MajorVersion.ToString();
             }
             else if (brow.MajorVersion <= 6)
             {
                s = brow.MajorVersion.ToString();
             }
}

else if (brow.Browser == "Firefox")
{
if (brow.MajorVersion >= 3)
            {
                s = brow.MajorVersion.ToString();
             }
   
}
}
posted by 준치 2008. 11. 7. 22:24
현재 도메인을 찾을하고 하다가 찾은거...될랑가..아직 한해봤는데..ㅋㅋㅋㅋㅋ
  1. ///Get the sub-domain from the provided URL
  2. /// </summary>
  3. /// <param name="url">URL to retrieve sub-domain from</param>
  4. /// <returns></returns>
  5. public static string RetrieveSubDomain(Uri url)
  6. {
  7.     string subDomain = "";
  8.     if (url.HostNameType == UriHostNameType.Dns && (!(url.HostNameType == UriHostNameType.Unknown)))
  9.     {
  10.         string host = url.Host;
  11.         int length = host.Split('.').Length;
  12.         if (length > 2)
  13.         {
  14.             int last = host.LastIndexOf(".");
  15.             int idx = host.LastIndexOf(".", last - 1);
  16.             subDomain = host.Substring(0, idx);
  17.         }
  18.     }
  19.  
  20.     return subDomain;
  21. }


///Get the sub-domain from the provided URL
/// </summary>
/// <param name="url">URL to retrieve sub-domain from</param>
/// <returns></returns>
public static string RetrieveSubDomain(Uri url)
{
    string subDomain = "";
    if (url.HostNameType == UriHostNameType.Dns && (!(url.HostNameType == UriHostNameType.Unknown)))
    {
        string host = url.Host;
        int length = host.Split('.').Length;
        if (length > 2)
        {
            int last = host.LastIndexOf(".");
            int idx = host.LastIndexOf(".", last - 1);
            subDomain = host.Substring(0, idx);
        }
    }

    return subDomain;
}

posted by 준치 2008. 10. 31. 17:09

public ICredentials Credentials { get; set; }


 public static void Main()
    {          
        try {

            WebClient client = new WebClient();

              client.Credentials = CredentialCache.DefaultCredentials;
   
            Byte[] pageData = client.DownloadData("http://www.contoso.com");
            string pageHtml = Encoding.ASCII.GetString(pageData);
            Console.WriteLine(pageHtml);

        } catch (WebException webEx) {
            Console.Write(webEx.ToString());
        }
    }