private void FrmRoomManager_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { if (label.GetType().ToString() == "Sunny.UI.UIButton") { label.Font = UI_FontUtil.SetChildControlsFont(); } } foreach (Control item in this.pnlRoomInfo.Controls) { if (item.GetType().ToString() == "System.Windows.Forms.Label") { item.Font = UI_FontUtil.SetChildControlsFont(); } } romsty = RoomService.SelectRoomAll(); for (int i = 0; i < romsty.Count; i++) { romt = new ucRoomList(this); romt.Tag = romsty[i].RoomNo; romt.romCustoInfo = romsty[i]; flpRoom.Controls.Add(romt); } }
private void FrmCustomerManager_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { label.Font = UI_FontUtil.SetChildControlsFont(); } LoadCustomer(); }
private void FrmCustomerManager_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { label.Font = UI_FontUtil.SetChildControlsFont(); } LoadCustomer(); LoadCustoType(); //txtCustoNo.ReadOnly = true; //cboSex.SelectedIndex = 0; //cboCustoType.SelectedIndex = 0; }
private void FrmSellThing_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { label.Font = UI_FontUtil.SetChildControlsFont(); } List <Room> roms = new RoomService().SelectRoomByStateAll(); for (int i = 0; i < roms.Count; i++) { txtRoomNo.AutoCompleteCustomSource.Add(roms[i].RoomNo); } LoadSellThingInfo(); }
private void FrmCheckOutForm_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { if (label.GetType().ToString() == "Sunny.UI.UITabControlMenu") { label.Font = UI_FontUtil.SetChildControlsFont(); } } #region 加载客户类型信息 List <CustoType> lstSourceGrid = new BaseService().SelectCustoTypeAll(); this.cboCustoType.DataSource = lstSourceGrid; this.cboCustoType.DisplayMember = "TypeName"; this.cboCustoType.ValueMember = "UserType"; this.cboCustoType.SelectedIndex = 0; this.cboCustoType.ReadOnly = true; #endregion #region 加载证件类型信息 List <PassPortType> passPorts = new BaseService().SelectPassPortTypeAll(); this.cboPassportType.DataSource = passPorts; this.cboPassportType.DisplayMember = "PassportName"; this.cboPassportType.ValueMember = "PassportId"; this.cboPassportType.SelectedIndex = 0; #endregion #region 加载性别信息 List <SexType> listSexType = new BaseService().SelectSexTypeAll(); this.cboCustoSex.DataSource = listSexType; this.cboCustoSex.DisplayMember = "sexName"; this.cboCustoSex.ValueMember = "sexId"; this.cboCustoSex.SelectedIndex = 0; #endregion double sum = 0; txtCustoNo.Text = ucRoomList.rm_CustoNo; CustoNo.Text = ucRoomList.rm_CustoNo; txtRoomNo.Text = ucRoomList.rm_RoomNo; string rn = txtRoomNo.Text.ToString(); string rs = rn.Substring(0, 2); if (ucRoomList.co_CheckTime == null) { dtpCheckTime.Text = DateTime.Now.ToString("yyyy年MM月dd日"); } else { dtpCheckTime.Text = Convert.ToDateTime(ucRoomList.co_CheckTime).ToString("yyyy年MM月dd日"); } if (rs == "BD") { sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 300)); } if (rs == "BS") { sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 425)); } if (rs == "HD") { sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 625)); } if (rs == "HS") { sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 660)); } if (rs == "QL") { sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 845)); } if (rs == "ZT") { sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 1080)); } lblDay.Text = Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString())); w = new Wti() { CustoNo = txtCustoNo.Text, EndDate = Convert.ToDateTime(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))), PowerUse = Convert.ToDecimal(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 3 * 1), WaterUse = Convert.ToDecimal(Convert.ToDouble(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 80 * 0.002), RoomNo = txtRoomNo.Text, Record = "admin", UseDate = Convert.ToDateTime(DateTime.Parse(dtpCheckTime.Text)), }; #region 加载客户信息 Custo cto = new CustoService().SelectCardInfoByCustoNo(CustoNo.Text.ToString()); try { CustoName.Text = cto.CustoName; txtCustoName.Text = cto.CustoName; txtTel.Text = cto.CustoTel; cboCustoSex.SelectedIndex = cto.CustoSex; cboCustoType.SelectedIndex = cto.CustoType; cboPassportType.SelectedIndex = cto.PassportType; dtpBirth.Value = cto.CustoBirth; txtPassportNum.Text = cto.CustoID; } catch { } #endregion #region 加载消费信息 string RoomNo = txtRoomNo.Text; dgvSpendList.DataSource = new SpendService().SelectSpendInfoRoomNo(RoomNo); dgvSpendList.AutoGenerateColumns = false; double result = 0; if (dgvSpendList.Rows.Count == 0) { result = 0; } else { result = Convert.ToDouble(new SpendService().SelectMoneyByRoomNoAndTime(RoomNo, CustoNo.Text.ToString())); } #endregion #region 加载水电费信息 var listWti = new WtiService().SelectWtiInfoAll(); dgvWti.DataSource = listWti; dgvWti.AutoGenerateColumns = false; #endregion if (cboCustoType.Text == "钻石会员") { double m = result + sum; lblGetReceipts.Text = m.ToString(); lblVIPPrice.Text = Convert.ToString(m * 0.60); lblVIP.Text = "六折"; } else if (cboCustoType.Text == "白金会员") { double m = result + sum; lblGetReceipts.Text = m.ToString(); lblVIPPrice.Text = Convert.ToString(m * 0.80); lblVIP.Text = "八折"; } else if (cboCustoType.Text == "黄金会员") { double m = result + sum; lblGetReceipts.Text = m.ToString(); lblVIPPrice.Text = Convert.ToString(m * 0.90); lblVIP.Text = "九折"; } else if (cboCustoType.Text == "普通会员") { double m = result + sum; lblGetReceipts.Text = m.ToString(); lblVIPPrice.Text = Convert.ToString(m * 0.95); lblVIP.Text = "九五折"; } else if (cboCustoType.Text == "普通用户") { //39525 double m = result + sum; lblGetReceipts.Text = m.ToString(); lblVIPPrice.Text = Convert.ToString(m); lblVIP.Text = "不 打 折"; } }