private void FrmInputs_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.Font = UI_FontUtil.SetControlFont(); } } txtCustoNo.Text = CustoManager.GetRandomCustoNo(); #region 加载客户类型信息 List <CustoType> lstSourceGrid = CustoTypeManager.SelectCustoTypesAll(); this.cbCustoType.DataSource = lstSourceGrid; this.cbCustoType.DisplayMember = "TypeName"; this.cbCustoType.ValueMember = "UserType"; this.cbCustoType.SelectedIndex = 0; this.cbCustoType.ReadOnly = true; #endregion #region 加载证件类型信息 List <PassPortType> passPorts = CustoTypeManager.SelectPassPortTypeAll(); this.cbPassportType.DataSource = passPorts; this.cbPassportType.DisplayMember = "PassportName"; this.cbPassportType.ValueMember = "PassportId"; this.cbPassportType.SelectedIndex = 0;
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 ucBaseInformation_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.Font = UI_FontUtil.SetRoomControlsFont(); } } }
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 FrmMain_Load(object sender, EventArgs e) { SetClassLong(this.Handle, GCL_STYLE, GetClassLong(this.Handle, GCL_STYLE) | CS_DropSHADOW); //API函数加载,实现窗体边框阴影效果 foreach (Control label in this.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.Font = UI_FontUtil.SetMainFont(); } } DateTime tmCur = DateTime.Now; if (tmCur.Hour < 8 || tmCur.Hour > 18) {//晚上 label3.Text = "(*´▽`)ノノ晚上好,"; label5.Text = LoginInfo.WorkerName; } else if (tmCur.Hour > 8 && tmCur.Hour < 12) {//上午 label3.Text = "上午好,"; label5.Text = LoginInfo.WorkerName; } else {//下午 label3.Text = "下午好,"; label5.Text = LoginInfo.WorkerName; } int n = Convert.ToInt32(WorkerCheckManager.SelectToDayCheckInfoByWorkerNo(LoginInfo.WorkerNo)); if (n > 0) { linkLabel1.Text = "已打卡"; linkLabel1.ForeColor = Color.Green; linkLabel1.LinkColor = Color.Green; } notifyIcon1.Text = "TS酒店管理系统-版本号:" + System.Windows.Forms.Application.ProductVersion.ToString(); wk_WorkerName = LoginInfo.WorkerName; //Opacity = 0.0; //窗体透明度为0 //fadeTimer.Start(); //计时开始 picRoom.BackgroundImage = Resources.预订管理ab; picExtend.BackgroundImage = Resources.扩展功能_ib; picCustomer.BackgroundImage = Resources.用户管理_ib; //CheckUpdate(); pnlMID.Controls.Clear(); FrmRoomManager frm1 = new FrmRoomManager(); frm1.TopLevel = false; pnlMID.Controls.Add(frm1); frm1.Show(); }
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 ucRoomList_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.Font = UI_FontUtil.SetRoomControlsFont(); } } this.CanPenetrate(); this.Region = new Region(GetRoundRectPath(new RectangleF(0, 0, this.Width, this.Height), 8f)); lblCustoNo.Text = romCustoInfo.CustoNo; lblRoomNo.Text = romCustoInfo.RoomNo; lblRoomType.Text = romCustoInfo.typeName; co_CheckTime = romCustoInfo.CheckTime.ToString(); us_CustoNo = romRoomInfo.CustoNo; us_CustoName = romRoomInfo.CustoName; us_CustoSex = romRoomInfo.CustoSex == 1 ? "男" : "女"; us_CustoTel = romRoomInfo.CustoTel; us_CustoID = romRoomInfo.CustoID; us_CustoBirthday = Convert.ToDateTime(romRoomInfo.CustoBirth).ToString(); us_CustoPassportType = romRoomInfo.PassportType; us_CustoType = romRoomInfo.CustoType; us_CustoAddress = romRoomInfo.CustoAdress; if (lblCustoNo.Text != "") { BackgroundImage = Resources.已入住; //lblState.Text = "▲"; //lblState.ForeColor = Color.Blue; } if (romCustoInfo.RoomStateId == 3) { BackgroundImage = Resources.脏房; } if (romCustoInfo.RoomStateId == 2) { BackgroundImage = Resources.维修中221; } if (romCustoInfo.RoomStateId == 4) { BackgroundImage = Resources.已预约; } }
private void FrmInputs_Load(object sender, EventArgs e) { foreach (Control label in this.Controls) { if (label.GetType().ToString() == "System.Windows.Forms.Label") { label.Font = UI_FontUtil.SetControlFont(); } } string cardId = new CounterHelper().GetNewId("CustoId"); txtCustoNo.Text = cardId; #region 加载客户类型信息 List <CustoType> lstSourceGrid = new BaseService().SelectCustoTypeAll(); this.cbCustoType.DataSource = lstSourceGrid; this.cbCustoType.DisplayMember = "TypeName"; this.cbCustoType.ValueMember = "UserType"; this.cbCustoType.SelectedIndex = 0; this.cbCustoType.ReadOnly = true; #endregion #region 加载证件类型信息 List <PassPortType> passPorts = new BaseService().SelectPassPortTypeAll(); this.cbPassportType.DataSource = passPorts; this.cbPassportType.DisplayMember = "PassportName"; this.cbPassportType.ValueMember = "PassportId"; this.cbPassportType.SelectedIndex = 0; #endregion #region 加载性别信息 List <SexType> listSexType = new BaseService().SelectSexTypeAll(); this.cbSex.DataSource = listSexType; this.cbSex.DisplayMember = "sexName"; this.cbSex.ValueMember = "sexId"; this.cbSex.SelectedIndex = 0; #endregion }
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 = "不 打 折"; } }