/// <summary> /// 根据房间编号查询截止到今天住了多少天 /// </summary> /// <param name="roomno"></param> /// <returns></returns> public static object DayByRoomNo(string roomno) { return(RoomService.DayByRoomNo(roomno)); }
private void FrmCheckOutForm_Load(object sender, EventArgs e) { txtCustoNo.Text = ucRoomList.rm_CustoNo; CustoNo.Text = ucRoomList.rm_CustoNo; txtRoomNo.Text = ucRoomList.rm_RoomNo; CmpSetDgv(); try { dtpCheckTime.Value = DateTime.Now; } catch { dtpCheckTime.Value = Convert.ToDateTime(ucRoomList.rm_CheckTime); } lblDay.Text = Convert.ToString(Convert.ToInt32(RoomService.DayByRoomNo(txtRoomNo.Text).ToString())); #region 加载客户信息 Custo cto = CustoService.SelectCustoByCustoNo(CustoNo.Text.ToString()); CustoName.Text = cto.CustoName; txtCustoName.Text = cto.CustoName; txtTel.Text = cto.CustoTel; cboCustoSex.Text = cto.CustoSex; cboCustoType.SelectedIndex = cto.CustoType; cboPassportType.SelectedIndex = cto.PassportType; dtpBirth.Value = cto.CustoBirth; txtPassportNum.Text = cto.CustoID; #endregion #region 加载消费信息 string RoomNo = txtRoomNo.Text; dgvSpendList.DataSource = SpendService.SelectSpendInfoRoomNo(RoomNo); dgvSpendList.AutoGenerateColumns = false; lblGetReceipts.Text = SpendService.SelectMoneyByRoomNoAndTime(RoomNo).ToString(); #endregion if (cboCustoType.Text == "钻石会员") { double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text)); lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.60)); lblVIP.Text = "六折"; } else if (cboCustoType.Text == "白金会员") { double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text)); lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.80)); lblVIP.Text = "八折"; } else if (cboCustoType.Text == "黄金会员") { double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text)); lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.90)); lblVIP.Text = "九折"; } else if (cboCustoType.Text == "普通会员") { double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text)); lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m * 0.95)); lblVIP.Text = "九五折"; } else if (cboCustoType.Text == "普通用户") { double m = Convert.ToDouble(Convert.ToDecimal(lblGetReceipts.Text)); lblVIPPrice.Text = Convert.ToString(Convert.ToDecimal(m)); lblVIP.Text = "不 打 折"; } }