YNICTE/BO/Views/Shared/Partial/Post.cshtml

45 lines
1.9 KiB
Plaintext

@model int
@{
var post = new string[] { (string)ViewData["post1"], (string)ViewData["post2"], (string)ViewData["post3"] };
var _id = ViewData["id"].ToString();
var w0 = (ViewData["w0"] ?? "100").ToString();
var w1 = (ViewData["w1"] ?? "300").ToString();
var w2 = (ViewData["w2"] ?? "500").ToString();
var name = (ViewData["name"] ?? "adr").ToString();
}
@if (Model > 2)
{
<div>
@Html.TextBox(_id + "1", post[0], new { @readonly = "readonly", @class = "read", @style = "width: " + @w0 + "px;", @name = name + "PostNumber" })
<span class="btn_pack medium"><button type="button" onclick="javascript:daumpost();" title="우편번호검색">우편번호검색</button></span>
</div>
}
else
{
@Html.TextBox(_id + "1", post[0], new { @readonly = "readonly", @class = "read", @style = "width: " + @w0 + "px;", @name = name + "PostNumber" })
<span class="btn_pack medium"><button type="button" onclick="javascript:daumpost();" title="우편번호검색">우편번호검색</button></span>
}
@if (Model > 2)
{
<div style="margin-top: 5px;">
@Html.TextBox(_id + "2", post[1], new { @readonly = "readonly", @class = "read", @style = "width: " + @w1 + "px;", @name = name + "PostAdr" })
</div>
}
else
{
@Html.TextBox(_id + "2", post[1], new { @readonly = "readonly", @class = "read", @style = "width: " + @w1 + "px;", @name = name + "PostAdr" })
}
@if (Model > 1)
{
<div class="item-line" style="margin-top: 5px;">
@Html.TextBox(_id + "3", post[2], new { @style = "width: " + @w2 + "px;", @name = name + "PostAdrSub", @placeholder="상세주소" })
</div>
}
else
{
@Html.TextBox(_id + "3", post[2], new { @style = "width: " + @w2 + "px;", @name = name + "PostAdrSub", @placeholder="상세주소" })
}