【摘要】 .net core酒店管理 例考必过小编为大家整理了关于.net core酒店管理 例的信息,希望可以帮助到大家!
.net core酒店管理 例
标签:pdontasummary--注册endomdrowmicrosoft
Api:
数据访问层:
pubpc interface Iromdal
{
//显示房间信息表
List<Room> GetRooms();
//显示房间类别
List<Roomtype> Roomtypes();
//详情反填
Room Fant(int uid);
//登录token
UserInfo LoginTok(UserInfo u);
//用户登录
int UserLogin(string Name, string Pwd);
//员工登录
int JobLogin(string Name, string Pwd);
//
List<JobInfo> JobInfoShow();
//显示用户
List<UserInfo> GetShow();
//删除用户
int UserDelete(int cid);
//反填用户信息
UserInfo UserFan(int aid);
//修改用户信息
int UserUpdate(UserInfo u);
//修改房间表
int RoomUpdate(Room r);
//管理员登录
int ManagerLogin(string Name, string Pwd);
//员工反填
JobInfo fanJob(int qid);
//删除房间
int RoomDelete(int rid);
//添加员工
int JobAdd(JobInfo j);
//删除员工
int jobDelete(int fid);
//修改员工信息
int JobUpdate(JobInfo j);
//cookie传值
UserInfo GetUser(int uid);
//显示订单
List<RoomReservation> getReser();
//注册(添加)用户8
int AddUser(UserInfo u);
//删除订单
int DeleteUser(int eid);
//结算
int FK(int Id, int RoomId, int WId);
//添加房间
int AddRoom(Room r);
//订单(3表)
List<Room> ShowRoom();
//显示留言
List<CaLiu> showCaLiu();
//添加留言
int AddCaLiu(CaLiu c);
//删除留言
int DeleteCaLiu(int gid);
//财务
List<CwMoeny> GetMoney();
using Model;
using System;
using System.Collections.Generic;
using Dapper;
using System.Data.SqlCpent;
using System.Linq;
namespace DAL
{
pubpc class romdal : Iromdal
{
//详情
pubpc Room Fant(int uid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
var pst = GetRooms();
var mod = pst.Where(m => m.RoomId == uid).FirstOrDefapt();
return mod;
}
}
//显示房间信息
pubpc List<Room> GetRooms()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<Room>("select r.*,s.* from Room r join Roomtype s on r.ORStatId = s.ORStatId ").ToList();
}
}
//下拉框显示房间类型
pubpc List<Roomtype> Roomtypes()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<Roomtype>("select * from Roomtype ").ToList();
}
}
//用户登录
pubpc int UserLogin(string Name, string Pwd)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return Convert.ToInt32(conn.ExecuteScalar($"select * from UserInfo where Phone=‘{Name}‘ and pass=‘{Pwd}‘"));
}
}
//显示员工信息
pubpc List<JobInfo> JobInfoShow()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<JobInfo>("select * from JobInfo ").ToList();
}
}
//显示用户
pubpc List<UserInfo> GetShow()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<UserInfo>($"select * from UserInfo").ToList();
}
}
/// <summary>
/// cookie传值
/// </summary>
/// <param name="uid"></param>
/// <returns></returns>
pubpc UserInfo GetUser(int uid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<UserInfo>($"select * from UserInfo where Id={uid}").FirstOrDefapt();
}
}
//员工登录
pubpc int JobLogin(string Name, string Pwd)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return Convert.ToInt32(conn.ExecuteScalar($"select * from JobInfo where Jtatu=‘{Name}‘ and JPass=‘{Pwd}‘"));
}
}
//修改房间表
pubpc int RoomUpdate(Room r)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"update Room set RoId=‘{r.RoId}‘, ORStatId=‘{r.ORStatId}‘,RoShu=‘{r.RoShu}‘,Romney=‘{r.Romney}‘ where RoomId=‘{r.RoomId}‘");
}
}
//管理员登录
pubpc int ManagerLogin(string Name, string Pwd)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return Convert.ToInt32(conn.ExecuteScalar($"select * from Manager where ManagerName=‘{Name}‘ and ManagerPass=‘{Pwd}‘"));
}
}
//员工反填
pubpc JobInfo fanJob(int qid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
var pst = JobInfoShow();
var mod = pst.Where(m => m.JId == qid).FirstOrDefapt();
return mod;
}
}
//删除房间
pubpc int RoomDelete(int rid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"delete from Room where RoomId=‘{rid}‘");
}
}
//员工添加
pubpc int JobAdd(JobInfo j)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"insert into JobInfo values(‘{j.JName}‘,‘{j.JSex}‘,‘{j.Jtatu}‘,‘{j.JPass}‘,‘{j.JJob}‘,‘{j.JMoeny}‘)");
}
}
//删除员工
pubpc int jobDelete(int fid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"delete from JobInfo where JId=‘{fid}‘");
}
}
//修改员工信息
pubpc int JobUpdate(JobInfo j)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"update JobInfo set JName=‘{j.JName}‘,JSex=‘{j.JSex}‘,Jtatu=‘{j.Jtatu}‘,JPass=‘{j.JPass}‘,JJob=‘{j.JJob}‘,JMoeny=‘{j.JMoeny}‘ where JId={j.JId}");
}
}
//删除用户
pubpc int UserDelete(int cid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"delete from UserInfo where Id=‘{cid}‘");
}
}
//反填用户信息
pubpc UserInfo UserFan(int aid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
var pst = GetShow();
var mod = pst.Where(m => m.Id == aid).FirstOrDefapt();
return mod;
}
}
//修改用户信息
pubpc int UserUpdate(UserInfo u)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"update UserInfo set UserId=‘{u.UserId}‘,UName=‘{u.UName}‘,Sex=‘{u.Sex}‘,statu=‘{u.statu}‘,HeiId=‘{u.HeiId}‘,BTime=‘{u.BTime}‘,OTime=‘{u.OTime}‘,pass=‘{u.pass}‘,Email=‘{u.Email}‘,sites=‘{u.sites}‘,Phone=‘{u.Phone}‘,SMoney=‘{u.SMoney}‘ where Id=‘{u.Id}‘ ");
}
}
//显示订单
pubpc List<RoomReservation> getReser()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<RoomReservation>($"select r.*,u.UName from RoomReservation r join UserInfo u on r.ORUserId = u.Id").ToList();
}
}
//注册(添加)用户
pubpc int AddUser(UserInfo u)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"insert into UserInfo values(‘{u.UserId}‘,‘{u.UName}‘,‘{u.Sex}‘,‘{u.statu}‘,‘{u.HeiId}‘,‘{u.BTime}‘,‘{u.OTime}‘,‘{u.pass}‘,‘{u.Email}‘,‘{u.Phone}‘,‘{u.SMoney}‘) ");
}
}
//删除订单
pubpc int DeleteUser(int eid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"delete from RoomReservation where ORId=‘{eid}‘");
}
}
//房间添加
pubpc int AddRoom(Room r)
{
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"insert into Room values(‘{r.RoId}‘,‘{r.ORStatId}‘,‘{r.RoShu}‘,‘{r.Romney}‘)");
}
}
////结算
//pubpc int JIeShuan(int id, int ORId)
//{
// using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
// {
// object b=conn.Execute("")
// }
//}
}
/// <summary>
/// 还款
/// </summary>
/// <param name="Id">客户Id</param>
/// <param name="RoomId">房间Id</param>
/// <returns></returns>
pubpc int FK(int Id, int RoomId, int WId)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
object ud = conn.ExecuteScalar($"select SMoney from UserInfo where Id={Id}");
object rd = conn.ExecuteScalar($"select Romney from Room where RoomId={RoomId}");
object sl = conn.ExecuteScalar($"select RoShu from Room where RoomId={RoomId}");
if (Convert.ToInt32(ud) >= Convert.ToInt32(rd))
{
int n = conn.Execute($"update UserInfo set SMoney=SMoney-{rd} where Id={Id} ");
if (n > 0)
{
if (Convert.ToInt32(sl) > 0)
{
int m = conn.Execute($"update Room set RoShu=RoShu-{1} where RoomId={RoomId} ");
if (m > 0)
{
conn.Execute($"update CwMoeny set Wmoney=Wmoney+{rd} where WId={WId} ");
}
return m;
}
else
{
return -1;
}
}
return n;
}
else
{
return -1;
}
}
}
//订单(3表)
pubpc List<Room> ShowRoom()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<Room>($"select u.Id,r.RoomId,r.RoId,r.RoId,r.RoShu,r.Romney,c.WId,u.UName,u.BTime,u.OTime from UserInfo u join Room r on u.Id = r.RoomId join CwMoeny c on c.WId = r.RoomId").ToList();
}
}
//留言显示
pubpc List<CaLiu> showCaLiu()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<CaLiu>($"select * from CaLiu").ToList();
}
}
//添加留言
pubpc int AddCaLiu(CaLiu c)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"insert into CaLiu values(‘{c.Lleave}‘);");
}
}
//删除留言
pubpc int DeleteCaLiu(int gid)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Execute($"delete from CaLiu where LId=‘{gid}‘");
}
}
//登录token
pubpc UserInfo LoginTok(UserInfo u)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<UserInfo>($"select * from UserInfo where Phone=‘{u.Phone}‘ and pass=‘{u.pass}‘").FirstOrDefapt();
}
}
//财务
pubpc List<CwMoeny> GetMoney()
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=hotel;Integrated Security=True"))
{
return conn.Query<CwMoeny>($"select * from CwMoeny").ToList();
}
}
}
}
controller:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Threading.Tasks;
using DAL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;
using WebApppcation1.Models;
namespace WebApppcation1.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
pubpc class ValuesController : ControllerBase
{
private Iromdal _bll;
pubpc ValuesController(Iromdal Iromdal)
{
_bll = Iromdal;
}
[HttpGet]
//显示房间信息
pubpc async Task<pageRoom> GetRooms(int pageIndex = 1, int pageSize = 3)
{
List<Room> rooms = await Task.Run(() => { return _bll.GetRooms(); });
pageRoom fanrom = new pageRoom();
fanrom.TotalCount = rooms.Count / pageSize + (rooms.Count % pageSize > 0 ? 1 : 0);
fanrom.Rooms = rooms.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
return fanrom;
}
[HttpGet]
//下拉框房间类型
pubpc List<Roomtype> Roomtypes()
{
return _bll.Roomtypes();
}
//显示房间类型
[HttpGet]
//详情
pubpc Room Fant(int uid)
{
return _bll.Fant(uid);
}
//用户登录
[HttpGet]
pubpc int UserLogin(string Name, string Pwd)
{
return _bll.UserLogin(Name, Pwd);
}
//员工登录
[HttpGet]
pubpc int JobLogin(string Name, string Pwd)
{
return _bll.JobLogin(Name, Pwd);
}
[HttpGet]
//显示员工信息
pubpc async Task<PageTouZi> JobInfoShow(int pageIndex = 1, int pagSize = 3)
{
List<JobInfo> pst = await Task.Run(() => { return _bll.JobInfoShow(); });
PageTouZi touZi = new PageTouZi();
touZi.TotalCount = pst.Count / pagSize + (pst.Count % pagSize > 0 ? 1 : 0);
touZi.List = pst.Skip((pageIndex - 1) * pagSize).Take(pagSize).ToList();
return touZi;
}
[HttpGet]
//显示用户
pubpc List<UserInfo> GetShow()
{
return _bll.GetShow();
}
[HttpPost]
//删除用户
pubpc int UserDelete(int cid)
{
return _bll.UserDelete(cid);
}
[HttpGet]
//反填用户信息
pubpc UserInfo UserFan(int aid)
{
return _bll.UserFan(aid);
}
[HttpPost]
//修改房间表
pubpc int RoomUpdate([FromForm] Room r)
{
return _bll.RoomUpdate(r);
}
[HttpGet]
//管理员登录
pubpc int ManagerLogin(string Name, string Pwd)
{
return _bll.ManagerLogin(Name, Pwd);
}
//员工反填
[HttpGet]
pubpc JobInfo fanJob(int qid)
{
return _bll.fanJob(qid);
}
//删除房间
[HttpPost]
pubpc int RoomDelete(int rid)
{
return _bll.RoomDelete(rid);
}
//员工添加
[HttpPost]
pubpc int JobAdd([FromForm] JobInfo j)
{
return _bll.JobAdd(j);
}
//删除员工
[HttpPost]
pubpc int jobDelete(int fid)
{
return _bll.jobDelete(fid);
}
[HttpPost]
//修改员工信息
pubpc int JobUpdate([FromForm] JobInfo j)
{
return _bll.JobUpdate(j);
}
//cookie传值
[HttpGet]
pubpc UserInfo GetUser(int uid)
{
return _bll.GetUser(uid);
}
[HttpGet]
//显示订单
pubpc List<RoomReservation> getReser()
{
return _bll.getReser();
}
[HttpPost]
//注册(添加)用户
pubpc int AddUser(UserInfo u)
{
return _bll.AddUser(u);
}
//退订单
[HttpPost]
pubpc int DeleteUser(int eid)
{
return _bll.DeleteUser(eid);
}
[HttpPost]
//房间添加
pubpc int AddRoom([FromForm]Room r)
{
return _bll.AddRoom(r);
}
[HttpPost]
//修改用户信息
pubpc int UserUpdate([FromForm]UserInfo u)
{
return _bll.UserUpdate(u);
}
[HttpPost]
/// <summary>
/// 还款
/// </summary>
/// <param name="Id">客户Id</param>
/// <param name="RoomId">房间Id</param>
/// <returns></returns>
pubpc int FK(int Id, int RoomId, int WId)
{
return _bll.FK(Id, RoomId, WId);
}
[HttpGet]
//显示房间xin
pubpc List<Room> ShowRoom()
{
return _bll.ShowRoom();
}
//留言显示
[HttpGet]
pubpc List<CaLiu> showCaLiu()
{
return _bll.showCaLiu();
}
//添加留言
[HttpPost]
pubpc int AddCaLiu([FromForm]CaLiu c)
{
return _bll.AddCaLiu(c);
}
//删除留言
[HttpPost]
pubpc int DeleteCaLiu(int gid)
{
return _bll.DeleteCaLiu(gid);
}
//登录Token
pubpc string LoginTok(UserInfo u)
{
UserInfo user = _bll.LoginTok(u);
if (user!=npl)
{
JWTHelper jwt = new JWTHelper();
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("Phone", user.Phone);
dic.Add("Id", user.Id);
dic.Add("pass", user.pass);
string token = jwt.GetToken(dic, 3000);
return token;
}
else
{
return npl;
}
}
//发送邮箱
[HttpPost]
pubpc int SendMailMethod([FromForm]EmailModel model)
{
try
{
string[] arr = npl;
if (model.RecMails.Contains(","))
{
arr = model.RecMails.Sppt(‘,‘);
}
else
{
arr = new string[] { model.RecMails };
}
SendMail mail = new SendMail(arr, "31900477@qq.com", model.BodyContent, model.Title, "sfeamvgjafykbgdh");
mail.Send();
return 1;
}
catch (Exception)
{
return 0;
}
}
//财务
[HttpGet]
pubpc List<CwMoeny> GetMoney()
{
return _bll.GetMoney();
}
}
}
MVC:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace WebApppcation1.Controllers
{
pubpc class jobController2 : Controller
{
//员工登录
pubpc IActionRespt LoginJob()
{
return View();
}
//员工显示
pubpc IActionRespt ShowJob()
{
return View();
}
//所有房间信息
pubpc IActionRespt RoomShowN()
{
return View();
}
//详情修改房间信息
pubpc IActionRespt RoomUp(int RoomId)
{
ViewBag.Sid = RoomId;
return View();
}
//预订单
pubpc IActionRespt YVDing()
{
return View();
}
//注册
pubpc IActionRespt AddJobInfo()
{
return View();
}
//留言板
pubpc IActionRespt LIYYan()
{
return View();
}
//邮箱
pubpc IActionRespt YXian()
{
return View();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace WebApppcation1.Controllers
{
pubpc class ManaController : Controller
{
//管理员登录
pubpc IActionRespt HuanLogin()
{
return View();
}
//显示员工页面
pubpc IActionRespt HuanShow()
{
return View();
}
//显示员工页面
pubpc IActionRespt FangShow()
{
return View();
}
//修改员工信息
pubpc IActionRespt XiuJob(int JId)
{
ViewBag.Cid = JId;
return View();
}
//添加改员工信息
pubpc IActionRespt AddJob()
{
return View();
}
//修改房间
pubpc IActionRespt XiuRoom(int RoomId)
{
ViewBag.Sid = RoomId;
return View();
}
//添加房间
pubpc IActionRespt AddRoom()
{
return View();
}
//显示客户页面
pubpc IActionRespt UserShow()
{
return View();
}
//修改客户信息
pubpc IActionRespt XiuUser(int id)
{
ViewBag.cid = id;
return View();
}
//订单信息表
pubpc IActionRespt DingDan()
{
return View();
}
//财务表
pubpc IActionRespt CMoney()
{
return View();
}
}
}
view://显示发送邮箱
@{
ViewData["Title"] = "ShowJob";
}
<script src="~/layui/layui.js"></script>
<pnk href="~/layui/css/layui.css" rel="stylesheet" />
<p class="layui-nav" lay-filter="">
<p class="layui-nav-item layui-this"><a href="">首页</a></p>
<p class="layui-nav-item "><a href="JavaScript:da()">所有房间信息</a></p>
<p class="layui-nav-item "><a href="JavaScript:stsrr()">订单信息</a></p>
<p class="layui-nav-item "><a href="JavaScript:pyt()">留言板</a></p>
<p class="layui-nav-item">
<a href="javascript:;">更多服务</a>
<dl class="layui-nav-child">
<!-- 二级菜单 -->
<dd><a href="JavaScript:eamil()">发送邮件</a></dd>
<dd><a href="">服务2</a></dd>
<dd><a href="">服务3</a></dd>
</dl>
</p>
<p class="layui-nav-item"><a href="">社区</a></p>
</p>
<html>
<head>
<meta charset="utf-8">
<title>carousel模块快速使用</title>
<pnk rel="stylesheet" href="/layui/css/layui.css" media="all">
</head>
<p>
<p class="layui-nav layui-bg-cyan" lay-filter="">
<p class="layui-nav-item layui-this"><a href="">用户信息</a></p>
<p class="layui-nav-item" style="float:right">
<a href="">我</a>
<dl class="layui-nav-child">
<dd><a href="javascript:;">安全管理</a></dd>
<dd><a href="javascript:sd();">退出</a></dd>
</dl>
</p>
</p>
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use(‘element‘, function () {
var element = layui.element;
//&helpp;
});
function sd() {
if (confirm("确认退出吗?")) {
location.href = ‘/jobController2/LoginJob.cshtml‘;
}
else {
return;
}
}
</script>
<br />
<br />
<br />
<br />
<p>
<table class="layui-table">
<colgroup>
<col width="150">
<col width="200">
<col>
</colgroup>
<thead>
<tr class="layui-bg-blue">
<td>客户编号</td>
<td>姓名</td>
<td>客户性别</td>
<td>身份证号</td>
<td>客户类型</td>
<td>入住时间</td>
<td>结束时间</td>
<td>邮箱</td>
<td>联系地址</td>
<td>联系电话</td>
</tr>
</thead>
<tbody id="tbod">
</tbody>
</table>
</p>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<!-- 条目中可以是任意内容,如:<img src=""> -->
<script src="/layui/layui.js"></script>
<script>
layui.use(‘carousel‘, function () {
var carousel = layui.carousel;
//建造实例
carousel.render({
elem: ‘#test1‘
, width: ‘100%‘ //设置容器宽度
, arrow: ‘always‘ //始终显示箭头
//,anim: ‘updown‘ //切换动画方式
});
});
</script>
</p>
</html>
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use(‘element‘, function () {
var element = layui.element;
//&helpp;
});
function da() {
location.href = ‘/jobController2/RoomShowN‘;
}
//退出账号
function sd() {
location.href = ‘/jobController2/LoginJob‘;
}
$(function () {
gshow();
});
function gshow() {
$.ajax({
url: "https://localhost:44342/api/values/GetShow",
dataType: "json",
type: "get",
success: function (data) {
$("#tbod").empty();
$(data).each(function () {
var str = ‘<tr>‘ +
‘<td>‘ + this.userId + ‘</td>‘ +
‘<td>‘ + this.uName + ‘</td>‘ +
‘<td>‘ + (this.sex?"男":"女") + ‘</td>‘ +
‘<td>‘ + this.statu + ‘</td>‘ +
‘<td>‘ + this.heiId + ‘</td>‘ +
‘<td>‘ + (this.bTime.substring(0, this.bTime.indexOf("T"))) + ‘</td>‘ +
‘<td>‘ + (this.oTime.substring(0, this.oTime.indexOf("T"))) + ‘</td>‘ +
‘<td>‘ + this.email + ‘</td>‘ +
‘<td>‘ + this.sites + ‘</td>‘ +
‘<td>‘ + this.phone + ‘</td>‘ +
‘</tr>‘;
$("#tbod").append(str);
})
}
})
}
function stsrr() {
location.href = ‘/jobController2/YVDing‘;
}
function pyt() {
location.href = ‘/jobController2/YVDing‘;
}
//发送邮箱
function eamil() {
location.href = ‘/jobController2/YXian‘;
}
</script>
.net core酒店管理 例
标签:pdontasummary--注册endomdrowmicrosoft
以上就是.net core酒店管理 例的内容,更多资讯请及时关注考必过网站,最新消息小编会第一时间发布,大家考试加油!