酒店编码解析
#region 酒店编码解析
/**//// <summary>
/// 酒店编码解析.休闲设施
/// </summary>
/// <param name="oType">fallow,service,meal,creditCard,auditmeans,calculateMethod,hotelCategory,netservice,roomservice</param>
/// <param name="oType">休闲设施,服务设施,餐厅设施,信用卡,审计方式,房态计算方式,酒店分类,上网设施,客房设施</param>
/// <returns>游泳池,健身房,桑拿,SPA</returns>
public static string TranHotel(string oSource,string oType)
...{
Hashtable ht=HotelUtil.GetHotelDect(oType.ToLower());
if(ht.Count<=0) return oSource;
//返回结果
string oResult="";
//遍历字典拼成返回结果
foreach(DictionaryEntry de in ht)
...{
//de.Key.ToString();de.Value.ToString();
if(oSource.ToLower().IndexOf(de.Key.ToString().ToLower())>=0)//全部在小写状态写比较
...{
oResult+=de.Value.ToString()+";";
oSource=oSource.Replace(de.Key.ToString(),"");
}
}
return Etmc.Commons.CommonFun.CommUtil.TrimSeparator(oResult+oSource,";");
}
#endregion
返回酒店设施对照字典,#region 返回酒店设施对照字典,
//返回酒店设施对照字典,
/**//// <summary>
/// 返回酒店设施对照字典
/// </summary>
/// <param name="oType">fallow,service,meal,creditCard,auditmeans,calculateMethod,hotelCategory</param>
/// <param name="oType">休闲设施,服务设施,餐厅设施,信用卡,审计方式,房态计算方式,酒店分类</param>
/// <returns>Hashtable</returns>
public static Hashtable GetHotelDect(string oType)
...{
构造字典#region 构造字典
Hashtable ht=new Hashtable ();
switch(oType.ToLower())
...{
休闲设施#region 休闲设施
case "fallow":
ht.Add("AA","游泳池");
ht.Add("AB","健身房");
ht.Add("AC","桑拿");
ht.Add("AD","SPA");
ht.Add("AE","温泉");
ht.Add("AF","网球场");
ht.Add("AG","舞蹈班");
ht.Add("AH","棋牌室");
ht.Add("AL","卡拉OK;");
ht.Add("AJ","夜总会");
ht.Add("AK","儿童娱乐设施");
break;
#endregion
服务设施#region 服务设施
case "service"://服务设施
ht.Add("AA","机场免费接送");
ht.Add("AB","商务中心");
ht.Add("AC","洗衣服务");
ht.Add("AD","礼宾服务");
ht.Add("AE","客房送餐服务");
ht.Add("AF","叫醒服务");
ht.Add("AG","货币兑换");
ht.Add("AH","商场");
ht.Add("AJ","停车场");
ht.Add("AM","票务");
break;
#endregion
餐厅设施#region 餐厅设施
case "meal"://餐厅设施
ht.Add("AA","中餐厅");
ht.Add("AB","西餐厅");
ht.Add("AC","咖啡厅");
ht.Add("AD","酒吧");
break;
#endregion
信用卡#region 信用卡
case "creditcard"://信用卡
ht.Add("AA","VISA");
ht.Add("AB","JCB");
ht.Add("AC","American Express");
ht.Add("AD","Diner's Club");
ht.Add("AE","Master Card");
ht.Add("AF","银联卡");
ht.Add("AG","不可使用");
break;
#endregion
审计方式#region 审计方式
case "auditmeans":
ht.Add("0","电话");
ht.Add("1","传真");
ht.Add("2","email");
break;
#endregion
房态计算方式#region 房态计算方式
case "calculatemethod":
ht.Add("0","在店");
ht.Add("1","当日到店");
break;
酒店分类#region 酒店分类
case "hotelcategory":
ht.Add("1","经济连锁型");
ht.Add("2","酒店公寓型");
ht.Add("3","舒适商务型");
ht.Add("4","豪华商务型");
ht.Add("5","普通旅游型");
ht.Add("6","豪华旅游型");
ht.Add("7","乡村度假型");
ht.Add("8","会议娱乐型");
ht.Add("9","特色型");
break;
客房设施#region 客房设施
case "roomservice":
ht.Add("AAA","电视机");
ht.Add("AAB","卫星电视");
ht.Add("AAC","有线电视");
ht.Add("AAD","收费频道");
ht.Add("AAE","电话机");
ht.Add("AAF","电脑");
ht.Add("AAJ","传真机");
ht.Add("AAK","迷你吧");
ht.Add("AAL","免费饮料");
ht.Add("AAM","冰箱");
ht.Add("AAN","洗衣机");
ht.Add("AAO","微波炉");
ht.Add("AAP","小厨房");
ht.Add("AAQ","电熨斗");
ht.Add("AAR","熨衣板");
ht.Add("AAS","独立空调");
ht.Add("AAT","中央空调");
ht.Add("AAU","电热水壶");
ht.Add("AAV","电吹风");
ht.Add("AAW","雨伞");
ht.Add("AAX","保险箱");
ht.Add("AAY","淋浴");
ht.Add("ABP","浴缸");
ht.Add("AAZ","浴袍");
ht.Add("ABA","拖鞋");
ht.Add("ABB","毛巾");
ht.Add("ABC","牙膏");
ht.Add("ABD","牙刷");
ht.Add("ABE","香皂");
ht.Add("ABF","洗发水");
ht.Add("ABG","护发素");
ht.Add("ABH","淋浴露");
ht.Add("ABI","润肤露");
ht.Add("ABJ","绵签");
ht.Add("ABK","指甲挫");
ht.Add("ABL","浴帽");
ht.Add("ABM","剃须刀");
break;
#endregion
上网设施#region 上网设施
case "netservice":
ht.Add("AAG","拨号上网");
ht.Add("AAH","宽带上网");
ht.Add("AAI","无线上网");
ht.Add("ABN","上网收费");
ht.Add("ABO","上网免费");
break;
#endregion
#endregion
#endregion
default:
break;
}
#endregion
return ht;
}
#endregion
转载于:https://www.cnblogs.com/pbwf/archive/2007/05/26/761120.html