분류없음2016.08.02 15:27

<!DOCTYPE>

<html >

<head>

<title>이벤트 목록 </title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/css/swiper.min.css">

  <!-- Demo styles -->

    <style>

   html, body {

       position: relative;

       height: 100%;

   }

   body {

       background: #eee;

       font-family: Helvetica Neue, Helvetica, Arial, sans-serif;

       font-size: 14px;

       color:#000;

       margin: 0;

       padding: 0;

   }

   .swiper-container {

       width: 100%;

       height: 300px;

   }

   .swiper-slide {

       text-align: center;        

       background: #fff;

       

       /* Center slide text vertically */

       display: -webkit-box;

       display: -ms-flexbox;

       display: -webkit-flex;

       display: flex;

       -webkit-box-pack: center;

       -ms-flex-pack: center;

       -webkit-justify-content: center;

       justify-content: center;

       -webkit-box-align: center;

       -ms-flex-align: center;

       -webkit-align-items: center;

       align-items: center;

   }

    </style>

    

</head>

<body>

<div>이벤트 배너</div>

  <!-- Swiper -->

    <div class="swiper-container">

        <div class="swiper-wrapper">

            <div class="swiper-slide" data-hash="slide1"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide2"><img src="" width="100%" height="100%"></div>         

            <div class="swiper-slide" data-hash="slide3"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide4"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide5"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide6"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide7"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide8"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide9"><img src="" width="100%" height="100%"></div>

            <div class="swiper-slide" data-hash="slide10"><img src="" width="100%" height="100%"></div>

        </div>       

        <!-- Add Arrows -->

        <div class="swiper-button-next"></div>

        <div class="swiper-button-prev"></div>

    </div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/js/swiper.min.js"></script>

  <!-- Initialize Swiper -->

    <script>    

   window.onload = function () {

       //initialize swiper when document ready  

    var swiper = new Swiper('.swiper-container', {         

         slidesPerView: 3,

         paginationClickable: true,

      nextButton: '.swiper-button-next',

        prevButton: '.swiper-button-prev',

         spaceBetween: 30

     });

       

     };   

    </script>

</body>

</html>

저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
분류없음2016.06.10 15:34

===================================

=== ADODB.Command - insert, delete, update ===

===================================

Dim ObjConn_J, ObjCmd_J, ObjRs_J, Rows_J, Index_J


Set ObjConn_J = Server.CreateObject("ADODB.Connection")

ObjConn_J.Open(MEM_CONN_STR)


Set ObjCmd_J = Server.CreateObject("ADODB.Command")    

With ObjCmd_J

.ActiveConnection = ObjConn_J

.CommandType = adCmdStoredProc

.CommandText = "up_AutomaticPayment_Insert"


.Parameters.Append .CreateParameter("@Test", adVarWChar, adParamInput, 50, "TestValue")

.Parameters.Append .CreateParameter("@TestOutput", adVarWChar, adParamOutput, 50, null)


.Execute ,, adExecuteNoRecords


Response.Write(.Parameters("@TestOutput"))


End With    


If ObjConn_J.State = 1 Then 

ObjConn_J.Close  

End if


Set ObjCmd_J = Nothing    

Set ObjConn_J = Nothing



=========================

=== ADODB.Command - select  ===

=========================

Dim ObjConn_J, ObjCmd_J, ObjRs_J, Rows_J, Index_J

    

    Set ObjConn_J = Server.CreateObject("ADODB.Connection")

    ObjConn_J.Open(MEM_CONN_STR)

    

    Set ObjCmd_J = Server.CreateObject("ADODB.Command")

    With ObjCmd_J

        .ActiveConnection = ObjConn_J

        .CommandType = adCmdStoredProc

        .CommandText = "up_AutomaticPayment_SelectList"

        

        '.Parameters.Append .CreateParameter("@ResultCD", adVarWChar, adParamInput, 50, Resultcd)

        '.Parameters.Append .CreateParameter("@ResultMSG", adVarWChar, adParamInput, 50, Resultmsg)

        '.Parameters.Append .CreateParameter("@AutoBillKey", adVarWChar, adParamInput, 50, AutoBillKey)

        '.Parameters.Append .CreateParameter("@CommId", adVarWChar, adParamInput, 50, Commid)

        '.Parameters.Append .CreateParameter("@MobilId", adVarWChar, adParamInput, 50, Mobilid)

        '.Parameters.Append .CreateParameter("@MrchId", adVarWChar, adParamInput, 50, Mrchid)

        '.Parameters.Append .CreateParameter("@MSTR", adVarWChar, adParamInput, 50, MSTR)

        '.Parameters.Append .CreateParameter("@MobileNumber", adVarWChar, adParamInput, 50, No)

        '.Parameters.Append .CreateParameter("@ProductName", adVarWChar, adParamInput, 50, Prdtnm)

        '.Parameters.Append .CreateParameter("@ProductPrice", adInteger, adParamInput, 4, Prdtprice)

        '.Parameters.Append .CreateParameter("@SignDate", adVarWChar, adParamInput, 50, Signdate)

        '.Parameters.Append .CreateParameter("@SvcId", adVarWChar, adParamInput, 50, Svcid)

        '.Parameters.Append .CreateParameter("@TradeId", adVarWChar, adParamInput, 50, Tradeid)

        '.Parameters.Append .CreateParameter("@UserId", adVarWChar, adParamInput, 50, Userid)

        '.Parameters.Append .CreateParameter("@UserKey", adVarWChar, adParamInput, 50, UserKey)

        '.Parameters.Append .CreateParameter("@AutoYN", adWChar, adParamInput, 1, AutoYN)

        '.Parameters.Append .CreateParameter("@PaymentType", adInteger, adParamInput, 4, 1)

        '.Parameters.Append .CreateParameter("@PaymentMethod", adVarWChar, adParamInput, 50, "a")

        '.Parameters.Append .CreateParameter("@ProductInfoId", adBigInt, adParamInput, 8, arrMSTR(2))

    End With

    

    Set ObjRs_J = Server.CreateObject("ADODB.Recordset")

    ObjRs_J.Open ObjCmd_J, , adOpenStatic, adLockPessimistic, adCmdUnknown

    

    If Not ObjRs_J.EOF And Not ObjRs_J.BOF Then

        Rows_J = ObjRs_J.GetRows()

    End If

    

    If ObjRs_J.State = 1 Then 

        ObjRs_J.Close  

    End if

    If ObjConn_J.State = 1 Then 

        ObjConn_J.Close  

    End if    

    

    Set ObjCmd_J = Nothing

    Set ObjRs_J = Nothing

    Set ObjConn_J = Nothing    

    

    

    

    If isArray(Rows_J) then

        For Index_J = 0 To UBound(Rows_J, 2)

            Response.Write Rows_J(0, Index_J) &"<br>"

        Next    

    End If

저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
C#/.NET MVC2016.05.08 16:43

도구 -> NuGet 패키지 관리자 -> 패키지 관리자 콘솔

* 패키지는 프로젝트 단위로 설치가된다. 

A 프로젝트에 entityframework를 설치했다고해서 B 프로젝트에도 entityframework가 설치되는것은 아니다.



PM> install-package ninject


PM> install-package ninject.web.common


PM> install-package ninject.mvc3

저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
C#/Entity FrameWork2016.04.29 16:38


데이터 생성]


using (var ctx = new SchoolContext())

{

Student stud = new Student() { StudentName = "jangjeonghun" };

Standard standard = new Standard() { StandardName = "standardName" };                


ctx.Students.Add(stud);

ctx.Standards.Add(standard);


ctx.SaveChanges();

}




데이터 호출]


//Querying with LINQ to Entities 
using (var context = new SchoolDBEntities())
{
    var L2EQuery = context.Students.where(s => s.StudentName == "Bill");
        
    var student = L2EQuery.FirstOrDefault<Student>();

}


using (var context = new SchoolDBEntities())
{
    var L2EQuery = from st in context.Students
                    where st.StudentName == "Bill"
                    select st;
   
    var student = L2EQuery.FirstOrDefault<Student>();
    }


//Querying with Object Services and Entity SQL
string sqlString = "SELECT VALUE st FROM SchoolDBEntities.Students " +
                    "AS st WHERE st.StudentName == 'Bill'";
    
var objctx = (ctx as IObjectContextAdapter).ObjectContext;
                
ObjectQuery<Student> student = objctx.CreateQuery<Student>(sqlString);
                Student newStudent = student.First<Student>();


using (var con = new EntityConnection("name=SchoolDBEntities"))
{
    con.Open();
    EntityCommand cmd = con.CreateCommand();
    cmd.CommandText = "SELECT VALUE st FROM SchoolDBEntities.Students as st where st.StudentName='Bill'";
    Dictionary<int, string> dict = new Dictionary<int, string>();
    using (EntityDataReader rdr = cmd.ExecuteReader(CommandBehavior.SequentialAccess | CommandBehavior.CloseConnection))
    {
            while (rdr.Read())
            {
                int a = rdr.GetInt32(0);
                var b = rdr.GetString(1);
                dict.Add(a, b);
            }
    }               
}


using (var ctx = new SchoolDBEntities())
{
    var studentName = ctx.Students.SqlQuery("Select studentid, studentname, standardId from Student where studentname='Bill'").FirstOrDefault<Student>();
}


using (var ctx = new SchoolDBEntities())
{
    var studentList = ctx.Students.SqlQuery("Select * from Student").ToList<Student>();
  
}





자료출처: http://www.entityframeworktutorial.net/Querying-with-EDM.aspx

             http://www.entityframeworktutorial.net/EntityFramework4.3/raw-sql-query-in-entity-framework.aspx

저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
C#/.NET MVC2016.04.29 16:28

도구 -> NuGet 패키지 관리자 -> 패키지 관리자 콘솔

* 패키지는 프로젝트 단위로 설치가된다. 

A 프로젝트에 entityframework를 설치했다고해서 B 프로젝트에도 entityframework가 설치되는것은 아니다.



PM> Install-Package EntityFramework

설명 : 엔티티 프레임워크를 설치한다.


PM> enable-migrations

설명 : 엔티티 프레임워크를 이용한 DataBase 마이그레이션을 허용한다.


PM> add-migration editDBinfo(별칭)

설명 : DataBase 마이그레이션을 위한 정보를 생성한다.


PM> update-database

설명 : "add-migration"을 이용하여 생성한 정보를 DataBase에 반영한다.


PM> update-database -targetmigration: "editDBinfo(별칭)"

설명 : 특정 버전의 마이그레이션으로 롤백한다.

저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
C#/Web API2016.04.27 11:12


aspnet-web-api-poster.pdf


저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
Android/Error2016.04.20 13:05

Rendering Problems 

Exception raised during rendering: 

com.android.ide.common.rendering.api.LayoutlibCallback.getXmlFileParser(Ljava/lang/String;)Lorg/xmlpull/v1/XmlPullParser; (Details)




저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
C#/.NET2016.04.18 17:55


// 텍스트 박스에서 엔터키 입력시 버튼 클릭 이벤트 호출

$("#<%=SearchKeyword.ClientID%>").keydown(function(event) {

                var keypressed = event.keyCode || event.which;

                if (keypressed == 13) {

                    $("#<%=SearchByKeywordBtn.ClientID%>").focus();

                    $("#<%=SearchByKeywordBtn.ClientID%>").click();                    

                }

            });

저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun






1389778520wpdm_Nextree-A2-Role-based-roadmap-for-SW-engineers-ve


Nextree-A2-Role-based-roadmap-for-SW-engineers-ver-KR-SI-1501.pd



저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun
Language/ASP2016.03.29 16:33

<%

    Class MsSQL        

        

        '생성자

        Private Sub Class_Initialize()

            

        END Sub

        

        

        '소멸자

        Private Sub Class_Terminate()

            

        END Sub

        

        

        'Command 실행

        'return : 영향을 받은 rows 수 

        '         영향을 받은 rows 수가 없다면 -1

        Public Function executeCommandInput(ByVal connectionString, ByVal storedProcedure, ByVal arrParams)

            

            Dim connectionCommand

            Set connectionCommand = Server.CreateObject("ADODB.Connection")

            connectionCommand.Open connectionString

            

            Dim command

            Set command = Server.CreateObject("ADODB.Command")            

            

       command.ActiveConnection = connectionCommand

       command.CommandText = storedProcedure

       command.CommandType = adCmdStoredProc        

       

       Set command = collectParams(command, arrParams)

       Dim queryResult : queryResult = empty

       command.Execute queryResult, , adExecuteNoRecords

       

       executeCommand = queryResult

       

       If Not connectionCommand Is Nothing Then

   If connectionCommand.State = adStateOpen Then connectionCommand.Close

   Set connectionCommand = Nothing

   End If        

   

   If Not command Is Nothing Then

   If command.State = adStateOpen Then command.Close

   Set command.ActiveConnection = Nothing

           Set command = Nothing

   End If


        End Function

        

        

        'Command 실행

        'return : 영향을 받은 rows 수 

        '         영향을 받은 rows 수가 없다면 -1

        'outputParameter : 쿼리문 실행시 output으로 설정한 값(ex : outputParameter.Parameters(3).Value)

        Public Function executeCommandInputOutput(ByVal connectionString, ByVal storedProcedure, ByVal arrParams, ByRef outputParameter)

            

            Dim connectionCommand

            Set connectionCommand = Server.CreateObject("ADODB.Connection")

            connectionCommand.Open connectionString

            

            Dim command

            Set command = Server.CreateObject("ADODB.Command")            

            

       command.ActiveConnection = connectionCommand

       command.CommandText = storedProcedure

       command.CommandType = adCmdStoredProc        

       

       Set command = collectParams(command, arrParams)

       Dim queryResult : queryResult = empty

       command.Execute queryResult, , adExecuteNoRecords

       

       set outputParameter = command        

       executeCommandInputOutput = queryResult

       

       If Not connectionCommand Is Nothing Then

   If connectionCommand.State = adStateOpen Then connectionCommand.Close

   Set connectionCommand = Nothing

   End If        

   

   If Not command Is Nothing Then

   If command.State = adStateOpen Then command.Close

   Set command.ActiveConnection = Nothing

           Set command = Nothing

   End If


        End Function

        

        

        'RecordSet 실행

        'return : Array

        Public Function executeRecordSetArray(connectionString, storedProcedure)

            

            Dim connectionRecordSet : connectionRecordSet = empty

            Dim recoredSet : recoredSet = empty

            

            Set connectionRecordSet = Server.CreateObject("ADODB.Connection")

            connectionRecordSet.Open connectionString

            

            Set recoredSet = Server.CreateObject("ADODB.RecordSet")

            recoredSet.Open storedProcedure, connectionRecordSet

            

            if recoredSet.State = adStateOpen then

                if not (recoredSet.bof or recoredSet.eof) then

                    executeRecordSetArray = recoredSet.GetRows(-1)

                end if

            else

                executeRecordSetArray = empty

            end if

            

            If Not connectionRecordSet Is Nothing Then

   If connectionRecordSet.State = adStateOpen Then connectionRecordSet.Close

   Set connectionRecordSet = Nothing

   End If        

   

   If Not recoredSet Is Nothing Then

   If recoredSet.State = adStateOpen Then recoredSet.Close

   Set recoredSet = Nothing

   End If            

            

       '실행 결과 출력 샘플 - 단수

       'if (IsArray(recordSetArray)) then 

            '    Response.Write recordSetArray(0, 0)

            'end if

       

       '실행 결과 출력 샘플 - 복수

       'if (IsArray(recordSetArray)) then 

            '    Dim iCnt : iCnt = 0

' Do While(iCnt <= UBound(recordSetArray,2))

' Response.Write recordSetArray(0, iCnt)

' iCnt = iCnt + 1

' Loop 

            'end if

            

        End Function

        

        

        '파라미터 파싱

        Private Function collectParams(ByRef Cmd, ByRef arrParams)

   Dim f

   Dim startPos, endPos

   Dim value


   If IsArray(arrParams) Then

   startPos = LBound(arrParams)

   endPos = UBound(arrParams)


   For f = startPos To endPos

   If IsArray(arrParams(f)) Then

   If UBound(arrParams(f)) = 4 Then

   If VarType(arrParams(f)(4)) = vbString Then

   If arrParams(f)(4) = "" Then

   value = Null

   Else

   value = Replace(Replace(Replace(Replace(Replace(arrParams(f)(4) _

   , "&#39;" , "'") _

   , "&quot;" , """") _

   , "&gt;" , ">") _

   , "&lt;" , "<") _

   , "&amp;" , "&")

   End If

   Else

   value = arrParams(f)(4)

   End If


   If Not IsNull(value) Then

   Select Case arrParams(f)(1)

   Case adChar, adVarchar

   If Len(value) > arrParams(f)(3) Then value = Left(value, arrParams(f)(3))

   Case adInteger

   If CDbl(value) > 2147483647 Then value = 0

   Case adBigInt

   If CDbl(value) > 9223372036854775807 Then value = 0

   End Select

   End If


   Cmd.Parameters.Append Cmd.CreateParameter(arrParams(f)(0), arrParams(f)(1), arrParams(f)(2), arrParams(f)(3), value)

   End If

       End If

       Next


       Set collectParams = Cmd

       Exit Function

       Else

       Set collectParams = Cmd

       End If

        End Function    

        

        

        '클래스 해제

        Public Sub CloseClass(instances)

       If Not instances Is Nothing Then Set instances = Nothing

        End Sub

        

    End Class

%>



<!--#include virtual="config/config.asp"//-->
<!--#include virtual="common/classes/class.MsSQL.asp"//-->

 
<%
    ' MsSQL 인스턴스 생성
    Dim MsSqlClass : MsSqlClass = empty
    Set MsSqlClass = new MsSQL
    
    
    
    ' 추천코드를 등록한다.
    Sub InsertRecommendationCode(ByVal userID, ByVal recommendationCode, ByVal registrationDate, Byval result)
    
        Dim jsonData
        Set jsonData = Server.CreateObject("Scripting.Dictionary")
        jsonData.Add "Result", false
        jsonData.Add "ResultCode", ""
        
        ' 로그인 상태 확인
        if IsLogin() = false then
            jsonData.Item("Result") = false
            jsonData.Item("ResultCode") = "M0001"
            
            Response.Write("{""Result"" : """& jsonData.Item("Result") &""", ""ResultCode"" : """& jsonData.Item("ResultCode") &"""}")
            Response.End()            
        end if        
        
        ' 본인 인증 + 성인 확인
        Dim authArray : authArray = MsSqlClass.executeRecordSetArray(MEM_CONN_STR, "up_is_member_authentication '" & GetUserId() & "'")        
        Dim isAuth : isAuth = empty
        Dim isAdult : isAdult = empty    
        
        if (IsArray(authArray)) then 
            isAuth = authArray(0, 0)
            isAdult = authArray(1, 0)
        end if
        
        if isAuth = "N" then
            jsonData.Item("Result") = false
            jsonData.Item("ResultCode") = "M0002"
           
            Response.Write("{""Result"" : """& jsonData.Item("Result") &""", ""ResultCode"" : """& jsonData.Item("ResultCode") &"""}")
            Response.End()
        end if
        
        ' 추천 코드 입력 확인
        if recommendationCode = "" then
            jsonData.Item("Result") = false
            jsonData.Item("ResultCode") = "M0003"
           
            Response.Write("{""Result"" : """& jsonData.Item("Result") &""", ""ResultCode"" : """& jsonData.Item("ResultCode") &"""}")
            Response.End()
        end if
        
        Dim arrParams : arrParams = Array(_
       Array("@UserID", adVarchar, adParamInput, 24, GetUserId()), _
       Array("@RecommendationCode", adVarchar, adParamInput, 50, recommendationCode), _
       Array("@RegistrationDate", adDate, adParamInput, , registrationDate), _
       Array("@Result", adVarchar, adParamInputOutput, 20, ""))
     
        Dim outputParameter
        Dim queryResult : queryResult = MsSqlClass.executeCommandInputOutput(MEM_CONN_STR, "up_tb_st_event2016_recommendationCodeRegistration_insert", arrParams, outputParameter)
        
        if queryResult > -1 then
            jsonData.Item("Result") = true
        else
            jsonData.Item("ResultCode") = outputParameter.Parameters(3).Value        
            Response.Write("{""Result"" : """& jsonData.Item("Result") &""", ""ResultCode"" : """& jsonData.Item("ResultCode") &"""}")
        end if
        
    End Sub
    
    ' 추천 코드 정보를 조회한다.
    Sub GetRecommendationCodeInfo(ByVal userID)
        
        Dim jsonData
        Set jsonData = Server.CreateObject("Scripting.Dictionary")
        jsonData.Add "Score", 0
        jsonData.Add "Code", empty
        
        if userID = "" then
            Response.Write("{""Score"" : """& jsonData.Item("Score") &""", ""Code"" : """& jsonData.Item("Code") &"""}")
            Response.End()
        end if
        
        Dim recordSetArray : recordSetArray = MsSqlClass.executeRecordSetArray(MEM_CONN_STR, "up_tb_st_event2016_recommendationCodeIssuance_select '"& userID &"'")
                
        if (IsArray(recordSetArray)) then 
            jsonData.Item("Score") = recordSetArray(1, 0)
            jsonData.Item("Code") = recordSetArray(2, 0)
        end if
        
        Response.Write("{""Score"" : """& jsonData.Item("Score") &""", ""Code"" : """& jsonData.Item("Code") &"""}")
        
    End Sub    
    
    ' Delegate
    Dim delegateName : delegateName = Request("delegateName")
    
    if delegateName = "getRecommendationCodeInfo" then
        Call GetRecommendationCodeInfo(GetUserId())
    end if
    
    if delegateName = "insert" then        
        Dim userID:userID = Request("userID")
   Dim recommendationCode:recommendationCode = Request("recommendationCode")
   Dim registrationDate:registrationDate = now()
   Dim result:result = ""               
   
        Call InsertRecommendationCode(userID, recommendationCode, registrationDate, result)
    end if
    
    
    
    ' MsSQL 인스턴스 해제
    Call MsSqlClass.CloseClass(MsSqlClass)
%>


저작자 표시 비영리 동일 조건 변경 허락
신고

Posted by jangjeonghun

티스토리 툴바