mirror of
https://e.coding.net/circlecloud/CitySunlight.git
synced 2024-12-04 12:58:46 +00:00
移除模态窗口...
This commit is contained in:
parent
b081641231
commit
2d7826865f
Binary file not shown.
@ -37,7 +37,7 @@ namespace CitySunlight
|
||||
int id = int.Parse(ProductManager.GetProductInfo(item, ProductManager.Info.ID));
|
||||
String name = ProductManager.GetProductInfo(item, ProductManager.Info.ItemName);
|
||||
String url = ProductManager.GetProductInfo(item, ProductManager.Info.PicUrl);
|
||||
String picurl = String.Format("<img src=\"/Picture/{0}\"alt=\"\" width=\"64\" height=\"64\"/>", url);
|
||||
String picurl = String.Format("<img src=\"/Picture/{0}\" alt=\"\" width=\"64\" height=\"64\"/>", url);
|
||||
String price = ProductManager.GetProductInfo(item, ProductManager.Info.Price);
|
||||
String amount = ProductManager.GetProductInfo(item, ProductManager.Info.Amount);
|
||||
String edit = "<a href=\"/Product/ProductEdit.aspx?id=" + id + "&type=edit\" >编辑</a>";
|
||||
|
@ -17,6 +17,11 @@
|
||||
|
||||
<title>都市阳光销售系统</title>
|
||||
</head>
|
||||
<script>
|
||||
function login_Click() {
|
||||
$('#loginModal').modal('hide')
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<!-- Fixed navbar -->
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
@ -55,79 +60,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- /container -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal" aria-hidden="true">
|
||||
×
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">都市阳光登录
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
在这里添加一些文本
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary">
|
||||
登录
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
</div>
|
||||
|
||||
<%-- <!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close"
|
||||
data-dismiss="modal" aria-hidden="true">
|
||||
×
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">都市阳光登录
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-control">
|
||||
<%= getAlert(msg) %>
|
||||
<label for="UserNameTx" class="col-sm-3"><a class="glyphicon glyphicon-user">用户名</a></label>
|
||||
<input type="text" id="UserNameTx" name="UserNameTx" class="form-control col-sm-7" placeholder="请输入账号" />
|
||||
<label for="PassWordTx" class="col-sm-3"><a class="glyphicon glyphicon-th">密 码</a></label>
|
||||
<input type="password" id="PassWordTx" name="PassWordTx" class="form-control col-sm-7" placeholder="请输入密码" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary">
|
||||
提交更改
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal -->--%>
|
||||
|
||||
|
||||
<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.js"></script>
|
||||
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.js"></script>
|
||||
</body>
|
||||
|
@ -36,5 +36,48 @@ namespace CitySunlight
|
||||
html += "{1}</div>";
|
||||
return (msg == null || msg == "") ? "" : String.Format(html, "danger", msg);
|
||||
}
|
||||
|
||||
protected void login_Click(object sender, EventArgs e)
|
||||
{
|
||||
//String username = UserNameTx.Value;
|
||||
String password = HttpUtils.getElementsbyName("PassWordTx");
|
||||
String username = HttpUtils.getElementsbyName("UserNameTx");
|
||||
login(username, password);
|
||||
}
|
||||
public bool login(String username, String password)
|
||||
{
|
||||
if ((username == null) || (password == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((username.Length == 0) || (password.Length == 0))
|
||||
{
|
||||
msg = "请填写完整的账号和密码!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UserManager.isExist(username))
|
||||
{
|
||||
msg = "当前用户不存在!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (UserManager.GetTimes(username) > 2)
|
||||
{
|
||||
msg = "登录错误超过3次,已被锁定,请联系管理员!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (UserManager.LoginUser(username, password))
|
||||
{
|
||||
Session["username"] = username;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "账号密码错误,还可以尝试" + (4 - UserManager.GetTimes(username)) + "次..!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ namespace CitySunlight
|
||||
int id = int.Parse(ProductManager.GetProductInfo(item, ProductManager.Info.ID));
|
||||
String name = ProductManager.GetProductInfo(item, ProductManager.Info.ItemName);
|
||||
String url = ProductManager.GetProductInfo(item, ProductManager.Info.PicUrl);
|
||||
String picurl = String.Format("<img src=\"../Picture/{0}\"alt=\"\" width=\"64\" height=\"64\"/>", url);
|
||||
String picurl = String.Format("<img src=\"../Picture/{0}\" alt=\"\" width=\"64\" height=\"64\"/>", url);
|
||||
String price = ProductManager.GetProductInfo(item, ProductManager.Info.Price);
|
||||
String amount = ProductManager.GetProductInfo(item, ProductManager.Info.Amount);
|
||||
String user = ProductManager.GetProductInfo(item, ProductManager.Info.UserName);
|
||||
|
Loading…
Reference in New Issue
Block a user