1、C#編程技巧總結:編程
1.list查詢條件及查詢結果數組
ResRoomResourceModel roomResourceModel = new ResRoomResourceModel();//ResRoomResourceModel 是新類
roomResourceModel.GroupCode = baseEntityModel.GroupCode;
roomResourceModel.HotelCode = baseEntityModel.HotelCode;
roomResourceModel.UnionAccountNo = roomUniteModel.AccountNo;
roomResourceModel.BatchContent = new Dictionary<string, string>() { { "AccountNo@!=", roomUniteModel.AccountNo } };//roomUniteModel 這是方法中傳入的一個類
var oldAccountNoList = _commonService.GetAllRoomResourceList(roomResourceModel, sortModel, new[] { Res_RoomResource_.AccountNo }).Select(m => m.AccountNo).ToArray();//查詢條件 Res_RoomResource_.AccountNo;字體
從查詢結果中查詢AccountNo,再轉化爲ToArray();spa
tempOldValue = model.AccountNo + "|" + string.Join(",", oldAccountNoList);//使用Join鏈接List類型字符串,最後list類型字符串被,鏈接成長串字符串。blog
string[] tempAccountNos = roomResourceList.Where(m => m.AccountNo != model.AccountNo).Select(m => m.AccountNo).ToArray();//從list中查詢AccountNo
string tempOldValue = model.AccountNo + "|" + string.Join(",", tempAccountNos);//Join鏈接數組
string tempNewValue = model.AccountNo + "|" + string.Join(",", tempAccountNos.Except(model.AccountNoList));//兩個list集合tempAccountNos 與model.AccountNoList取差集
string itemValue = ComTools.GetEnumDescription(OperateLogEnum.CancelRoomUnite, false);
var mainRoomResourceModel = roomResourceList.Where(p => p.AccountNo == model.AccountNo).First();//從全部訂單中查主單索引
var resBreakfastTicketList = new List<ResBreakfastTicketVModel>();//
var breakfastCoupon = _printSheet.GetPrintBreakfastCouponData(model.AccountNo);
if (model.BreakfastCoupons != null)
{
var breakfastCouponArray = model.BreakfastCoupons.ToObject<List<string>>();//
resBreakfastTicketList.AddRange(breakfastCouponArray.Select(item => item.Split('|')).Select((array,index)=> new ResBreakfastTicketVModel() //按照索引查詢
{
RoomNo = string.IsNullOrEmpty(model.AllAccountNos) ? breakfastCoupon.ResRoomResourceData.RoomNo : _printSheet.GetPrintBreakfastCouponData(model.AllAccountNos.Split(',')[index]).ResRoomResourceData.RoomNo,
TicketNo = array[0],
Time = breakfastTime,
QRCode = QRCodeHelper.CreateQRCodeByteArray(_workContext.HotelCode + "|" + array[0], 1, 100),
EffectiveDate = Convert.ToDateTime(array[1]),
Paymoney = Convert.ToDecimal(model.BreakfastPrice),
Address = dineAdress
}));
}
model.DataSource.Add(HotelDataSource());
model.DataSource.Add(new ReportDataSource("DataSet_BreakfastCoupon", resBreakfastTicketList));
return model;ip
2、Jquery編程技巧總結:ci
1.字符串問題字符串
3、CSS總結:string
1.字體大小調整 : VW pt px em