Hotel/Core/SM/Bll/HotelBll.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.SM.Dal;
using Common.Provider;
using Common;
using Core.SM.Model;
namespace Core.SM.Bll
{
public class HotelBll
{
public static HotelBll Instance
{
get { return SingletonProvider<HotelBll>.Instance; }
}
/// <summary>
/// 列出館別treeToJson
/// </summary>
/// <returns></returns>
public string HotelJson()
{
return JSONhelper.ToJson(HotelDal.Instance.GetAll().ToList().OrderBy(n => n.Sortnum)
.Select(n => new
{
id = n.KeyId,
text = n.HotelName + " [" + n.HotelCode + "]",
iconCls = "icon-home1",
attributes = new { n.Sortnum, n.Remark, n.HotelCode }
})
);
}
/// <summary>
/// 判斷館別是否存在
/// </summary>
/// <param name="hotelcode">館別代號</param>
/// <param name="hotelid">館別KeyId</param>
/// <returns></returns>
public static bool HasHotelBy(string hotelcode, int hotelid = 0)
{
var Hotels = HotelDal.Instance.GetAll().ToList();
return Hotels.Any(n => n.HotelCode == hotelcode && n.KeyId != hotelid);
}
/// <summary>
/// 取得館別代號
/// </summary>
/// <param name="hotelId">館別KeyId</param>
/// <returns></returns>
public static string GetHotelCode(int hotelId)
{
var hotelList = HotelDal.Instance.GetHotelBy(hotelId);
后面还有 15 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。