From ba147cb9cff3e97b462f50a41191e626958ab5bb Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Fri, 2 May 2025 14:57:31 +0800 Subject: [PATCH] QC Testing, Passed! --- .../BackendApi/ApiConstants.cs | 6 +- .../Helper/DiscountConverter.cs | 45 + .../Util/ApplicationUtil.cs | 29 +- .../AppFunction/FrmAboutUs.Designer.cs | 24 +- .../AppFunction/FrmAboutUs.cs | 5 + .../AppFunction/FrmChangeRoom.cs | 135 +-- .../AppFunction/FrmCheckIn.cs | 7 +- .../AppFunction/FrmCheckOutForm.Designer.cs | 943 +++++------------- .../AppFunction/FrmCheckOutForm.cs | 379 +++---- .../AppFunction/FrmCheckOutForm.resx | 84 -- .../AppFunction/FrmCustomerManagement.cs | 3 - .../AppFunction/FrmEditInputs.cs | 23 +- .../AppFunction/FrmMySpace.Designer.cs | 13 + .../AppFunction/FrmMySpace.cs | 10 +- .../AppFunction/FrmRoomManagement.cs | 2 - .../AppFunction/FrmRoomStateManagement.cs | 8 +- .../AppFunction/FrmSellThing.Designer.cs | 8 +- .../AppFunction/FrmSellThing.cs | 51 +- .../AppInterface/FrmLogin.cs | 4 +- .../AppMain/FrmMain.Designer.cs | 2 +- .../AppMain/FrmMain.cs | 6 +- .../AppUserControls/ucRoom.Designer.cs | 48 +- .../AppUserControls/ucRoom.cs | 23 +- .../AppUserControls/ucRoom.resx | 4 +- .../TableComponent/TableComHelper.cs | 10 +- topsky-hotel-management-system-web-api | 2 +- 26 files changed, 629 insertions(+), 1245 deletions(-) create mode 100644 EOM.TSHotelManagement.Common/Helper/DiscountConverter.cs diff --git a/EOM.TSHotelManagement.Common/BackendApi/ApiConstants.cs b/EOM.TSHotelManagement.Common/BackendApi/ApiConstants.cs index 171ff6b..cfc9123 100644 --- a/EOM.TSHotelManagement.Common/BackendApi/ApiConstants.cs +++ b/EOM.TSHotelManagement.Common/BackendApi/ApiConstants.cs @@ -31,7 +31,7 @@ public const string Room_SelectRoomAll = "Room/SelectRoomAll"; public const string Room_SelectRoomByRoomNo = "Room/SelectRoomByRoomNo"; public const string Room_DayByRoomNo = "Room/DayByRoomNo"; - public const string Room_UpdateRoomByRoomNo = "Room/UpdateRoomByRoomNo"; + public const string Room_CheckoutRoomByRoomNo = "Room/CheckoutRoomByRoomNo"; public const string Room_SelectCanUseRoomAll = "Room/SelectCanUseRoomAll"; public const string Room_UpdateRoomInfo = "Room​/UpdateRoomInfo"; public const string Room_UpdateRoomInfoWithReser = "Room​/UpdateRoomInfoWithReser"; @@ -43,6 +43,8 @@ public const string Room_SelectNotClearRoomAllByRoomState = "Room/SelectNotClearRoomAllByRoomState"; public const string Room_SelectFixingRoomAllByRoomState = "Room/SelectFixingRoomAllByRoomState"; public const string Room_SelectReservedRoomAllByRoomState = "Room/SelectReservedRoomAllByRoomState"; + public const string Room_TransferRoom = "Room/TransferRoom"; + public const string Room_CheckoutRoom = "Room/CheckoutRoom"; // Reser URLs public const string Reser_SelectReserAll = "Reser/SelectReserAll"; @@ -83,7 +85,7 @@ public const string NavBar_NavBarList = "NavBar/NavBarList"; // VipLevelRule URLs - public const string VipLevelRule_SelectVipRuleList = "VipLevelRule/SelectVipRuleList"; + public const string VipLevelRule_SelectVipRuleList = "VipRule/SelectVipRuleList"; // SellThing public const string Sellthing_SelectSellThingAll = "Sellthing/SelectSellThingAll"; diff --git a/EOM.TSHotelManagement.Common/Helper/DiscountConverter.cs b/EOM.TSHotelManagement.Common/Helper/DiscountConverter.cs new file mode 100644 index 0000000..193a5a9 --- /dev/null +++ b/EOM.TSHotelManagement.Common/Helper/DiscountConverter.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common +{ + public static class DiscountConverter + { + /// + /// 将 decimal 类型的折扣转换为中文xx折表示 + /// 例如:0.8m → "八折", 0.85m → "八五折" + /// + public static string ToZheString(this decimal discount) + { + int percentage = (int)(discount * 100); + + return percentage switch + { + 100 => "无折扣", + var x when x % 10 == 0 => $"{ConvertDigit(x / 10)}折", + _ => $"{ConvertDigit(percentage / 10)}{ConvertDigit(percentage % 10)}折" + }; + } + + /// + /// 数字转中文大写(0-9) + /// + private static string ConvertDigit(int num) => num switch + { + 0 => "〇", + 1 => "一", + 2 => "二", + 3 => "三", + 4 => "四", + 5 => "五", + 6 => "六", + 7 => "七", + 8 => "八", + 9 => "九", + _ => throw new ArgumentOutOfRangeException(nameof(num), "仅支持0-9数字转换") + }; + } +} diff --git a/EOM.TSHotelManagement.Common/Util/ApplicationUtil.cs b/EOM.TSHotelManagement.Common/Util/ApplicationUtil.cs index 7c1d100..d7e274e 100644 --- a/EOM.TSHotelManagement.Common/Util/ApplicationUtil.cs +++ b/EOM.TSHotelManagement.Common/Util/ApplicationUtil.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Common.Contract; +using jvncorelib.EntityLib; using System.Diagnostics; using System.Reflection; @@ -30,19 +31,25 @@ namespace EOM.TSHotelManagement.Common { return new Card { message = "SelectCardCode+接口服务异常,请提交Issue或尝试更新版本!" }; } - var address = $"{response.Source.Province}{response.Source.City}{response.Source.District}"; - var birthday = code.Substring(6, 4) + "-" + code.Substring(10, 2) + "-" + code.Substring(12, 2); - var sex = code.Substring(14, 3); - //性别代码为偶数是女性奇数为男性 - if (int.Parse(sex) % 2 == 0) - { - sex = "女"; - } - else + + if (!response.Source.IsNullOrEmpty()) { - sex = "男"; + var address = $"{response.Source.Province}{response.Source.City}{response.Source.District}"; + var birthday = code.Substring(6, 4) + "-" + code.Substring(10, 2) + "-" + code.Substring(12, 2); + var sex = code.Substring(14, 3); + //性别代码为偶数是女性奇数为男性 + if (int.Parse(sex) % 2 == 0) + { + sex = "女"; + } + else + { + sex = "男"; + } + return new Card { message = string.Empty, sex = sex, address = address, birthday = birthday }; } - return new Card { message = string.Empty, sex = sex, address = address, birthday = birthday }; + + return new Card(); } /// diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.Designer.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.Designer.cs index 013268a..b5acdea 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.Designer.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.Designer.cs @@ -30,6 +30,7 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAboutUs)); uiRichTextBox1 = new Sunny.UI.UIRichTextBox(); + btnOk = new AntdUI.Button(); SuspendLayout(); // // uiRichTextBox1 @@ -38,7 +39,7 @@ uiRichTextBox1.FillColor = Color.White; uiRichTextBox1.Font = new Font("微软雅黑", 12F); uiRichTextBox1.HideSelection = false; - uiRichTextBox1.Location = new Point(4, 32); + uiRichTextBox1.Location = new Point(3, 2); uiRichTextBox1.Margin = new Padding(3, 4, 3, 4); uiRichTextBox1.MinimumSize = new Size(1, 1); uiRichTextBox1.Name = "uiRichTextBox1"; @@ -47,23 +48,35 @@ uiRichTextBox1.ReadOnly = true; uiRichTextBox1.ScrollBarStyleInherited = false; uiRichTextBox1.ShowText = false; - uiRichTextBox1.Size = new Size(377, 146); + uiRichTextBox1.Size = new Size(385, 146); uiRichTextBox1.Style = Sunny.UI.UIStyle.Custom; uiRichTextBox1.TabIndex = 0; uiRichTextBox1.TextAlignment = ContentAlignment.MiddleCenter; // + // btnOk + // + btnOk.Font = new Font("Microsoft YaHei UI", 12F); + btnOk.Location = new Point(145, 152); + btnOk.Name = "btnOk"; + btnOk.Size = new Size(93, 36); + btnOk.TabIndex = 129; + btnOk.Text = "知道了!"; + btnOk.Type = AntdUI.TTypeMini.Primary; + btnOk.Click += btnOk_Click; + // // FrmAboutUs // AutoScaleDimensions = new SizeF(7F, 17F); AutoScaleMode = AutoScaleMode.Font; BackColor = Color.FromArgb(235, 243, 255); ClientSize = new Size(390, 192); + Controls.Add(btnOk); Controls.Add(uiRichTextBox1); + FormBorderStyle = FormBorderStyle.SizableToolWindow; Icon = (Icon)resources.GetObject("$this.Icon"); - Margin = new Padding(2, 2, 2, 2); - MaximizeBox = false; - MinimizeBox = false; + Margin = new Padding(2); Name = "FrmAboutUs"; + StartPosition = FormStartPosition.CenterScreen; Text = "关于我们"; Load += FrmAboutUs_Load; MouseDown += FrmAboutUs_MouseDown; @@ -74,5 +87,6 @@ #endregion private Sunny.UI.UIRichTextBox uiRichTextBox1; + private AntdUI.Button btnOk; } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.cs index 777390e..3eb87da 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmAboutUs.cs @@ -62,5 +62,10 @@ namespace EOM.TSHotelManagement.FormUI { uiRichTextBox1.Text = " 我们团队一直都致力于打造一款人机交互方便,操作简单的管理软件,我们的愿景是“用技术创造易用的开源软件/组件”,一路心怀愿景去制作软件,我们的团队充满活力、激情!\r\n 关于我们团队,您可以浏览:https://www.oscode.top了解更多! \r\n 关于本软件的详细信息,您可以浏览:https://gitee.com/java-and-net/TopskyHotelManagerSystem 了解更多!另外仍会提供后续的版本升级支持!"; } + + private void btnOk_Click(object sender, EventArgs e) + { + this.Close(); + } } } diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmChangeRoom.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmChangeRoom.cs index b451bb9..7fa67a5 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmChangeRoom.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmChangeRoom.cs @@ -26,6 +26,7 @@ using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Shared; +using jvncorelib.CodeLib; using Sunny.UI; using System.Transactions; @@ -51,7 +52,7 @@ namespace EOM.TSHotelManagement.FormUI UIMessageBox.ShowError($"{ApiConstants.Room_SelectCanUseRoomAll}+接口服务异常,请提交Issue或尝试更新版本!"); return; } - cboRoomList.DataSource = datas; + cboRoomList.DataSource = datas.listSource; cboRoomList.DisplayMember = nameof(ReadRoomOutputDto.RoomNumber); cboRoomList.ValueMember = nameof(ReadRoomOutputDto.RoomNumber); firstLoad = false; @@ -59,116 +60,42 @@ namespace EOM.TSHotelManagement.FormUI private void btnChangeRoom_Click(object sender, EventArgs e) { - double sum = 0; - string lbu = LoginInfo.WorkerName; string rno = ucRoom.co_RoomNo.ToString(); string nrno = cboRoomList.Text; - using (TransactionScope scope = new TransactionScope()) + try { - try - { - #region 发起转房和转移消费以及添加消费的请求 - - dic = new Dictionary() - { - { nameof(ReadRoomInputDto.RoomNumber) , rno } - }; - - result = HttpHelper.Request(ApiConstants.Room_SelectRoomByRoomNo, dic); - var data = HttpHelper.JsonToModel>(result.message); - if (data.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Room_SelectRoomByRoomNo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - var room = data.Source; - var checkInRoom = new UpdateRoomInputDto() - { - RoomNumber = nrno, - CustomerNumber = ucRoom.co_CustoNo, - RoomStateId = (int)RoomState.Occupied, - LastCheckInTime = Convert.ToDateTime(DateTime.Now), - DataChgUsr = LoginInfo.WorkerNo, - DataChgDate = DateTime.Now - }; - result = HttpHelper.Request(ApiConstants.Room_DayByRoomNo, dic); - data = HttpHelper.JsonToModel>(result.message); - if (data.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Room_DayByRoomNo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(data.Source.StayDays) * room.RoomRent)); - - var insertSpend = new CreateSpendInputDto() - { - RoomNumber = cboRoomList.Text, - ProductName = "居住" + rno + "共" + Convert.ToInt32(result.message) + "天", - ConsumptionQuantity = Convert.ToInt32(result.message), - CustomerNumber = ucRoom.co_CustoNo, - ProductPrice = room.RoomRent, - ConsumptionAmount = Convert.ToDecimal(sum), - ConsumptionTime = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss")), - SettlementStatus = SpendConsts.UnSettle, - }; - - result = HttpHelper.Request(ApiConstants.Room_UpdateRoomInfo, HttpHelper.ModelToJson(checkInRoom)); - var httpResult = HttpHelper.JsonToModel(result.message); - if (httpResult.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Room_UpdateRoomInfo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - result = HttpHelper.Request(ApiConstants.Room_UpdateRoomByRoomNo, dic); - httpResult = HttpHelper.JsonToModel(result.message); - if (httpResult.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Room_UpdateRoomByRoomNo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - result = HttpHelper.Request(ApiConstants.Spend_SelectSpendByCustoNo, dic); - var datas = HttpHelper.JsonToModel>(result.message); - if (datas.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Spend_SelectSpendByCustoNo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - var result3 = datas.listSource; - if (result3.Count != 0) - { - var spend = new UpdateSpendInputDto() { RoomNumber = nrno, CustomerNumber = ucRoom.CustoNo }; - result = HttpHelper.Request(ApiConstants.Spend_UpdateSpendInfoByRoomNo, HttpHelper.ModelToJson(spend)); - httpResult = HttpHelper.JsonToModel(result.message); - if (httpResult.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Spend_UpdateSpendInfoByRoomNo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - } - - #endregion + #region 发起转房和转移消费以及添加消费的请求 - UIMessageBox.ShowSuccess("转房成功"); - result = HttpHelper.Request(ApiConstants.Spend_InsertSpendInfo, HttpHelper.ModelToJson(insertSpend)); - httpResult = HttpHelper.JsonToModel(result.message); - if (httpResult.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Spend_InsertSpendInfo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - FrmRoomManager.Reload(""); - FrmRoomManager._RefreshRoomCount(); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(LoginInfo.WorkerNo + "-" + LoginInfo.WorkerName + "在" + Convert.ToDateTime(DateTime.Now) + "位于" + LoginInfo.SoftwareVersion + "执行:" + ucRoom.CustoNo + "于" + Convert.ToDateTime(DateTime.Now) + "进行了换房!", 2); - #endregion - scope.Complete(); - this.Close(); - } - catch (Exception) + var transferRoom = new TransferRoomDto + { + OriginalRoomNumber = rno, + TargetRoomNumber = nrno, + CustomerNumber = ucRoom.CustoNo, + DataChgUsr = LoginInfo.WorkerNo, + DataChgDate = Convert.ToDateTime(DateTime.Now) + }; + result = HttpHelper.Request(ApiConstants.Room_TransferRoom, HttpHelper.ModelToJson(transferRoom)); + var response = HttpHelper.JsonToModel(result.message!); + if (response.StatusCode != StatusCodeConstants.Success) { - UIMessageBox.ShowError("转房失败"); + UIMessageBox.ShowError($"{ApiConstants.Room_TransferRoom}+接口服务异常,请提交Issue或尝试更新版本!"); + return; } + + #endregion + + FrmRoomManager.Reload(""); + FrmRoomManager._RefreshRoomCount(); + #region 获取添加操作日志所需的信息 + RecordHelper.Record(LoginInfo.WorkerNo + "-" + LoginInfo.WorkerName + "在" + transferRoom.DataChgDate + "位于" + LoginInfo.SoftwareVersion + "执行:" + transferRoom.CustomerNumber + "于" + transferRoom.DataChgDate + "进行了换房!", 2); + #endregion + UIMessageBox.ShowSuccess("转房成功"); + this.Close(); + } + catch (Exception) + { + UIMessageBox.ShowError("转房失败"); } } diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckIn.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckIn.cs index ea8d0b5..ee628c6 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckIn.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckIn.cs @@ -150,12 +150,7 @@ namespace EOM.TSHotelManagement.FormUI // 如果会员等级有变,更新会员等级 if (new_type != 0) { - user = new Dictionary - { - { nameof(UpdateCustomerInputDto.CustomerNumber), txtCustoNo.Text.Trim() }, - { nameof(UpdateCustomerInputDto.CustomerType), new_type.ToString() } - }; - result = HttpHelper.Request(ApiConstants.Customer_UpdCustomerTypeByCustoNo, user); + result = HttpHelper.Request(ApiConstants.Customer_UpdCustomerTypeByCustoNo, HttpHelper.ModelToJson(new UpdateCustomerInputDto { CustomerNumber = txtCustoNo.Text.Trim(), CustomerType = new_type })); var updateResponse = HttpHelper.JsonToModel(result.message!); if (updateResponse.StatusCode != StatusCodeConstants.Success) { diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.Designer.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.Designer.cs index 171709c..0a26a0d 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.Designer.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.Designer.cs @@ -28,60 +28,23 @@ /// private void InitializeComponent() { - DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle(); - DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCheckOutForm)); - btnBalance = new Sunny.UI.UIButton(); lblVIPPrice = new Label(); label15 = new Label(); - dgvSpendList = new Sunny.UI.UIDataGridView(); - dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn(); - clPrice = new DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn3 = new DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn4 = new DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn5 = new DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn6 = new DataGridViewTextBoxColumn(); - dataGridViewTextBoxColumn7 = new DataGridViewTextBoxColumn(); - clSpendNo = new DataGridViewTextBoxColumn(); - Column1 = new DataGridViewTextBoxColumn(); - Column2 = new DataGridViewTextBoxColumn(); - Column3 = new DataGridViewTextBoxColumn(); - Column4 = new DataGridViewTextBoxColumn(); - Column8 = new DataGridViewTextBoxColumn(); lblDay = new Label(); lable00 = new Label(); label29 = new Label(); lblVIP = new Label(); - dtpCheckTime = new Sunny.UI.UITextBox(); label25 = new Label(); - txtRoomNo = new Sunny.UI.UITextBox(); label27 = new Label(); label28 = new Label(); lblChange = new Label(); - CustoNo = new Sunny.UI.UITextBox(); label21 = new Label(); - CustoName = new Sunny.UI.UITextBox(); lblGetReceipts = new Label(); label1 = new Label(); label24 = new Label(); label17 = new Label(); label18 = new Label(); - cboCustoType = new Sunny.UI.UIComboBox(); - cboPassportType = new Sunny.UI.UIComboBox(); - cboCustoSex = new Sunny.UI.UIComboBox(); - txtCustoNo = new Sunny.UI.UITextBox(); - txtCustoName = new Sunny.UI.UITextBox(); - txtPassportNum = new Sunny.UI.UITextBox(); - txtTel = new Sunny.UI.UITextBox(); - dtpBirth = new Sunny.UI.UIDatePicker(); - txtAddress = new Sunny.UI.UITextBox(); label2 = new Label(); label3 = new Label(); label4 = new Label(); @@ -91,54 +54,39 @@ label30 = new Label(); label31 = new Label(); label32 = new Label(); - dgvWti = new Sunny.UI.UIDataGridView(); uiTabControlMenu2 = new Sunny.UI.UITabControlMenu(); tabPage1 = new TabPage(); - txtReceipts = new Sunny.UI.UITextBox(); + dtpCheckTime = new AntdUI.Input(); + txtRoomNo = new AntdUI.Input(); + CustoName = new AntdUI.Input(); + CustoNo = new AntdUI.Input(); + btnBalance = new AntdUI.Button(); + txtReceipts = new AntdUI.Input(); + btnPg = new AntdUI.Pagination(); + dgvSpendList = new AntdUI.Table(); tabPage2 = new TabPage(); + txtCustomerAddress = new AntdUI.Input(); + txtDateOfBirth = new AntdUI.Input(); + txtCustomerGender = new AntdUI.Input(); + txtCustomerName = new AntdUI.Input(); + txtCustomerNumber = new AntdUI.Input(); + txtTel = new AntdUI.Input(); + txtIdCardNumber = new AntdUI.Input(); + txtPassportName = new AntdUI.Input(); + txtCustomerType = new AntdUI.Input(); tabPage3 = new TabPage(); - Column11 = new DataGridViewTextBoxColumn(); - token = new DataGridViewTextBoxColumn(); - clRoomNo = new DataGridViewTextBoxColumn(); - clCustoNo = new DataGridViewTextBoxColumn(); - clStartTime = new DataGridViewTextBoxColumn(); - clDealTime = new DataGridViewTextBoxColumn(); - clWater = new DataGridViewTextBoxColumn(); - clElectric = new DataGridViewTextBoxColumn(); - clMarkUser = new DataGridViewTextBoxColumn(); - Column5 = new DataGridViewTextBoxColumn(); - Column6 = new DataGridViewTextBoxColumn(); - Column7 = new DataGridViewTextBoxColumn(); - Column9 = new DataGridViewTextBoxColumn(); - Column10 = new DataGridViewTextBoxColumn(); - ((System.ComponentModel.ISupportInitialize)dgvSpendList).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dgvWti).BeginInit(); + dgvWti = new AntdUI.Table(); uiTabControlMenu2.SuspendLayout(); tabPage1.SuspendLayout(); tabPage2.SuspendLayout(); tabPage3.SuspendLayout(); SuspendLayout(); // - // btnBalance - // - btnBalance.Cursor = Cursors.Hand; - btnBalance.Font = new Font("微软雅黑", 12F); - btnBalance.Location = new Point(459, 486); - btnBalance.MinimumSize = new Size(1, 1); - btnBalance.Name = "btnBalance"; - btnBalance.Radius = 30; - btnBalance.Size = new Size(162, 46); - btnBalance.Style = Sunny.UI.UIStyle.Custom; - btnBalance.TabIndex = 116; - btnBalance.Text = "结 算"; - btnBalance.TipsFont = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); - btnBalance.Click += btnBalance_Click; - // // lblVIPPrice // lblVIPPrice.AutoSize = true; lblVIPPrice.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - lblVIPPrice.Location = new Point(549, 389); + lblVIPPrice.Location = new Point(517, 396); lblVIPPrice.Name = "lblVIPPrice"; lblVIPPrice.Size = new Size(40, 20); lblVIPPrice.TabIndex = 28; @@ -155,166 +103,6 @@ label15.TabIndex = 11; label15.Text = "Tips:请提醒客人不要忘记带齐行李哦~"; // - // dgvSpendList - // - dgvSpendList.AllowUserToAddRows = false; - dgvSpendList.AllowUserToDeleteRows = false; - dgvSpendList.AllowUserToResizeColumns = false; - dgvSpendList.AllowUserToResizeRows = false; - dataGridViewCellStyle1.BackColor = Color.FromArgb(235, 243, 255); - dgvSpendList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - dgvSpendList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dgvSpendList.BackgroundColor = Color.White; - dgvSpendList.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.BackColor = Color.FromArgb(80, 160, 255); - dataGridViewCellStyle2.Font = new Font("微软雅黑", 12F); - dataGridViewCellStyle2.ForeColor = Color.White; - dataGridViewCellStyle2.SelectionBackColor = SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = DataGridViewTriState.True; - dgvSpendList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - dgvSpendList.ColumnHeadersHeight = 32; - dgvSpendList.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dgvSpendList.Columns.AddRange(new DataGridViewColumn[] { dataGridViewTextBoxColumn1, clPrice, dataGridViewTextBoxColumn2, dataGridViewTextBoxColumn3, dataGridViewTextBoxColumn4, dataGridViewTextBoxColumn5, dataGridViewTextBoxColumn6, dataGridViewTextBoxColumn7, clSpendNo, Column1, Column2, Column3, Column4, Column8 }); - dgvSpendList.EnableHeadersVisualStyles = false; - dgvSpendList.Font = new Font("微软雅黑", 12F); - dgvSpendList.GridColor = Color.FromArgb(80, 160, 255); - dgvSpendList.Location = new Point(10, 113); - dgvSpendList.Name = "dgvSpendList"; - dgvSpendList.ReadOnly = true; - dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = Color.FromArgb(235, 243, 255); - dataGridViewCellStyle3.Font = new Font("微软雅黑", 12F); - dataGridViewCellStyle3.ForeColor = Color.FromArgb(48, 48, 48); - dataGridViewCellStyle3.SelectionBackColor = Color.FromArgb(80, 160, 255); - dataGridViewCellStyle3.SelectionForeColor = Color.White; - dataGridViewCellStyle3.WrapMode = DataGridViewTriState.True; - dgvSpendList.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; - dgvSpendList.RowHeadersVisible = false; - dataGridViewCellStyle4.BackColor = Color.White; - dgvSpendList.RowsDefaultCellStyle = dataGridViewCellStyle4; - dgvSpendList.RowTemplate.Height = 29; - dgvSpendList.SelectedIndex = -1; - dgvSpendList.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dgvSpendList.ShowRowErrors = false; - dgvSpendList.Size = new Size(648, 202); - dgvSpendList.StripeOddColor = Color.FromArgb(235, 243, 255); - dgvSpendList.Style = Sunny.UI.UIStyle.Custom; - dgvSpendList.TabIndex = 115; - // - // dataGridViewTextBoxColumn1 - // - dataGridViewTextBoxColumn1.DataPropertyName = "RoomNo"; - dataGridViewTextBoxColumn1.FillWeight = 102.6831F; - dataGridViewTextBoxColumn1.HeaderText = "房号"; - dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; - dataGridViewTextBoxColumn1.ReadOnly = true; - // - // clPrice - // - clPrice.DataPropertyName = "SpendPriceStr"; - clPrice.HeaderText = "单价(元)"; - clPrice.Name = "clPrice"; - clPrice.ReadOnly = true; - // - // dataGridViewTextBoxColumn2 - // - dataGridViewTextBoxColumn2.DataPropertyName = "CustoNo"; - dataGridViewTextBoxColumn2.FillWeight = 102.6831F; - dataGridViewTextBoxColumn2.HeaderText = "客户编号"; - dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - dataGridViewTextBoxColumn2.ReadOnly = true; - // - // dataGridViewTextBoxColumn3 - // - dataGridViewTextBoxColumn3.DataPropertyName = "SpendName"; - dataGridViewTextBoxColumn3.FillWeight = 102.6831F; - dataGridViewTextBoxColumn3.HeaderText = "商品"; - dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; - dataGridViewTextBoxColumn3.ReadOnly = true; - // - // dataGridViewTextBoxColumn4 - // - dataGridViewTextBoxColumn4.DataPropertyName = "SpendAmount"; - dataGridViewTextBoxColumn4.FillWeight = 60F; - dataGridViewTextBoxColumn4.HeaderText = "数量"; - dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; - dataGridViewTextBoxColumn4.ReadOnly = true; - // - // dataGridViewTextBoxColumn5 - // - dataGridViewTextBoxColumn5.DataPropertyName = "SpendPrice"; - dataGridViewTextBoxColumn5.FillWeight = 102.6831F; - dataGridViewTextBoxColumn5.HeaderText = "单价(元)"; - dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; - dataGridViewTextBoxColumn5.ReadOnly = true; - dataGridViewTextBoxColumn5.Visible = false; - // - // dataGridViewTextBoxColumn6 - // - dataGridViewTextBoxColumn6.DataPropertyName = "SpendMoneyStr"; - dataGridViewTextBoxColumn6.FillWeight = 102.6831F; - dataGridViewTextBoxColumn6.HeaderText = "总额"; - dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; - dataGridViewTextBoxColumn6.ReadOnly = true; - // - // dataGridViewTextBoxColumn7 - // - dataGridViewTextBoxColumn7.DataPropertyName = "SpendTime"; - dataGridViewTextBoxColumn7.FillWeight = 102.6831F; - dataGridViewTextBoxColumn7.HeaderText = "消费时间"; - dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; - dataGridViewTextBoxColumn7.ReadOnly = true; - // - // clSpendNo - // - clSpendNo.DataPropertyName = "IsDelete"; - clSpendNo.HeaderText = "Column1"; - clSpendNo.Name = "clSpendNo"; - clSpendNo.ReadOnly = true; - clSpendNo.Visible = false; - // - // Column1 - // - Column1.DataPropertyName = "DataInsUsr"; - Column1.HeaderText = "Column1"; - Column1.Name = "Column1"; - Column1.ReadOnly = true; - Column1.Visible = false; - // - // Column2 - // - Column2.DataPropertyName = "DataInsDate"; - Column2.HeaderText = "Column2"; - Column2.Name = "Column2"; - Column2.ReadOnly = true; - Column2.Visible = false; - // - // Column3 - // - Column3.DataPropertyName = "DataChgUsr"; - Column3.HeaderText = "Column3"; - Column3.Name = "Column3"; - Column3.ReadOnly = true; - Column3.Visible = false; - // - // Column4 - // - Column4.DataPropertyName = "DataChgDate"; - Column4.HeaderText = "Column4"; - Column4.Name = "Column4"; - Column4.ReadOnly = true; - Column4.Visible = false; - // - // Column8 - // - Column8.DataPropertyName = "MoneyState"; - Column8.HeaderText = "Column8"; - Column8.Name = "Column8"; - Column8.ReadOnly = true; - Column8.Visible = false; - // // lblDay // lblDay.AutoSize = true; @@ -329,7 +117,7 @@ // lable00.AutoSize = true; lable00.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - lable00.Location = new Point(456, 388); + lable00.Location = new Point(422, 396); lable00.Name = "lable00"; lable00.Size = new Size(89, 20); lable00.TabIndex = 26; @@ -349,61 +137,22 @@ // lblVIP.AutoSize = true; lblVIP.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - lblVIP.Location = new Point(549, 361); + lblVIP.Location = new Point(517, 364); lblVIP.Name = "lblVIP"; lblVIP.Size = new Size(73, 20); lblVIP.TabIndex = 24; lblVIP.Text = "不 打 折"; // - // dtpCheckTime - // - dtpCheckTime.Cursor = Cursors.IBeam; - dtpCheckTime.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - dtpCheckTime.Location = new Point(376, 18); - dtpCheckTime.Margin = new Padding(4, 5, 4, 5); - dtpCheckTime.MinimumSize = new Size(1, 1); - dtpCheckTime.Name = "dtpCheckTime"; - dtpCheckTime.Padding = new Padding(5); - dtpCheckTime.Radius = 20; - dtpCheckTime.ReadOnly = true; - dtpCheckTime.ShowText = false; - dtpCheckTime.Size = new Size(168, 35); - dtpCheckTime.Style = Sunny.UI.UIStyle.Custom; - dtpCheckTime.StyleCustomMode = true; - dtpCheckTime.Symbol = 559683; - dtpCheckTime.TabIndex = 111; - dtpCheckTime.TextAlignment = ContentAlignment.MiddleLeft; - dtpCheckTime.Watermark = ""; - // // label25 // label25.AutoSize = true; label25.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - label25.Location = new Point(456, 359); + label25.Location = new Point(422, 364); label25.Name = "label25"; label25.Size = new Size(89, 20); label25.TabIndex = 23; label25.Text = "会员折扣:"; // - // txtRoomNo - // - txtRoomNo.Cursor = Cursors.IBeam; - txtRoomNo.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtRoomNo.Location = new Point(376, 70); - txtRoomNo.Margin = new Padding(4, 5, 4, 5); - txtRoomNo.MinimumSize = new Size(1, 1); - txtRoomNo.Name = "txtRoomNo"; - txtRoomNo.Padding = new Padding(5); - txtRoomNo.Radius = 20; - txtRoomNo.ReadOnly = true; - txtRoomNo.ShowText = false; - txtRoomNo.Size = new Size(168, 35); - txtRoomNo.Style = Sunny.UI.UIStyle.Custom; - txtRoomNo.StyleCustomMode = true; - txtRoomNo.TabIndex = 112; - txtRoomNo.TextAlignment = ContentAlignment.MiddleLeft; - txtRoomNo.Watermark = ""; - // // label27 // label27.AutoSize = true; @@ -428,65 +177,27 @@ // lblChange.AutoSize = true; lblChange.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - lblChange.Location = new Point(548, 445); + lblChange.Location = new Point(516, 460); lblChange.Name = "lblChange"; lblChange.Size = new Size(40, 20); lblChange.TabIndex = 21; lblChange.Text = "0.00"; // - // CustoNo - // - CustoNo.Cursor = Cursors.IBeam; - CustoNo.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - CustoNo.Location = new Point(117, 18); - CustoNo.Margin = new Padding(4, 5, 4, 5); - CustoNo.MinimumSize = new Size(1, 1); - CustoNo.Name = "CustoNo"; - CustoNo.Padding = new Padding(5); - CustoNo.Radius = 20; - CustoNo.ReadOnly = true; - CustoNo.ShowText = false; - CustoNo.Size = new Size(144, 35); - CustoNo.Style = Sunny.UI.UIStyle.Custom; - CustoNo.StyleCustomMode = true; - CustoNo.TabIndex = 107; - CustoNo.TextAlignment = ContentAlignment.MiddleLeft; - CustoNo.Watermark = ""; - // // label21 // label21.AutoSize = true; label21.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - label21.Location = new Point(455, 446); + label21.Location = new Point(421, 460); label21.Name = "label21"; label21.Size = new Size(89, 20); label21.TabIndex = 20; label21.Text = "找 零:"; // - // CustoName - // - CustoName.Cursor = Cursors.IBeam; - CustoName.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - CustoName.Location = new Point(117, 70); - CustoName.Margin = new Padding(4, 5, 4, 5); - CustoName.MinimumSize = new Size(1, 1); - CustoName.Name = "CustoName"; - CustoName.Padding = new Padding(5); - CustoName.Radius = 20; - CustoName.ReadOnly = true; - CustoName.ShowText = false; - CustoName.Size = new Size(144, 35); - CustoName.Style = Sunny.UI.UIStyle.Custom; - CustoName.StyleCustomMode = true; - CustoName.TabIndex = 108; - CustoName.TextAlignment = ContentAlignment.MiddleLeft; - CustoName.Watermark = ""; - // // lblGetReceipts // lblGetReceipts.AutoSize = true; lblGetReceipts.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - lblGetReceipts.Location = new Point(548, 417); + lblGetReceipts.Location = new Point(516, 428); lblGetReceipts.Name = "lblGetReceipts"; lblGetReceipts.Size = new Size(40, 20); lblGetReceipts.TabIndex = 19; @@ -516,7 +227,7 @@ // label17.AutoSize = true; label17.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - label17.Location = new Point(455, 330); + label17.Location = new Point(421, 334); label17.Name = "label17"; label17.Size = new Size(89, 20); label17.TabIndex = 14; @@ -526,197 +237,12 @@ // label18.AutoSize = true; label18.Font = new Font("Microsoft Sans Serif", 12F, FontStyle.Regular, GraphicsUnit.Point, 0); - label18.Location = new Point(455, 417); + label18.Location = new Point(421, 428); label18.Name = "label18"; label18.Size = new Size(89, 20); label18.TabIndex = 15; label18.Text = "应收金额:"; // - // cboCustoType - // - cboCustoType.DataSource = null; - cboCustoType.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; - cboCustoType.FillColor = Color.White; - cboCustoType.Font = new Font("微软雅黑", 15.75F); - cboCustoType.ItemHoverColor = Color.FromArgb(155, 200, 255); - cboCustoType.ItemSelectForeColor = Color.FromArgb(235, 243, 255); - cboCustoType.Location = new Point(437, 19); - cboCustoType.Margin = new Padding(4, 5, 4, 5); - cboCustoType.MinimumSize = new Size(63, 0); - cboCustoType.Name = "cboCustoType"; - cboCustoType.Padding = new Padding(0, 0, 30, 2); - cboCustoType.Radius = 20; - cboCustoType.ReadOnly = true; - cboCustoType.Size = new Size(203, 35); - cboCustoType.Style = Sunny.UI.UIStyle.Custom; - cboCustoType.SymbolSize = 24; - cboCustoType.TabIndex = 125; - cboCustoType.TextAlignment = ContentAlignment.MiddleLeft; - cboCustoType.Watermark = ""; - // - // cboPassportType - // - cboPassportType.DataSource = null; - cboPassportType.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; - cboPassportType.FillColor = Color.White; - cboPassportType.Font = new Font("微软雅黑", 15.75F); - cboPassportType.ItemHoverColor = Color.FromArgb(155, 200, 255); - cboPassportType.ItemSelectForeColor = Color.FromArgb(235, 243, 255); - cboPassportType.Location = new Point(437, 70); - cboPassportType.Margin = new Padding(4, 5, 4, 5); - cboPassportType.MinimumSize = new Size(63, 0); - cboPassportType.Name = "cboPassportType"; - cboPassportType.Padding = new Padding(0, 0, 30, 2); - cboPassportType.Radius = 20; - cboPassportType.ReadOnly = true; - cboPassportType.Size = new Size(203, 35); - cboPassportType.Style = Sunny.UI.UIStyle.Custom; - cboPassportType.SymbolSize = 24; - cboPassportType.TabIndex = 124; - cboPassportType.TextAlignment = ContentAlignment.MiddleLeft; - cboPassportType.Watermark = ""; - // - // cboCustoSex - // - cboCustoSex.DataSource = null; - cboCustoSex.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; - cboCustoSex.FillColor = Color.White; - cboCustoSex.Font = new Font("微软雅黑", 15.75F); - cboCustoSex.ItemHoverColor = Color.FromArgb(155, 200, 255); - cboCustoSex.ItemSelectForeColor = Color.FromArgb(235, 243, 255); - cboCustoSex.Location = new Point(134, 124); - cboCustoSex.Margin = new Padding(4, 5, 4, 5); - cboCustoSex.MinimumSize = new Size(63, 0); - cboCustoSex.Name = "cboCustoSex"; - cboCustoSex.Padding = new Padding(0, 0, 30, 2); - cboCustoSex.Radius = 20; - cboCustoSex.ReadOnly = true; - cboCustoSex.Size = new Size(203, 35); - cboCustoSex.Style = Sunny.UI.UIStyle.Custom; - cboCustoSex.SymbolSize = 24; - cboCustoSex.TabIndex = 123; - cboCustoSex.TextAlignment = ContentAlignment.MiddleLeft; - cboCustoSex.Watermark = ""; - // - // txtCustoNo - // - txtCustoNo.Cursor = Cursors.IBeam; - txtCustoNo.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtCustoNo.Location = new Point(134, 20); - txtCustoNo.Margin = new Padding(4, 5, 4, 5); - txtCustoNo.MinimumSize = new Size(1, 1); - txtCustoNo.Name = "txtCustoNo"; - txtCustoNo.Padding = new Padding(5); - txtCustoNo.Radius = 20; - txtCustoNo.ReadOnly = true; - txtCustoNo.ShowText = false; - txtCustoNo.Size = new Size(203, 35); - txtCustoNo.Style = Sunny.UI.UIStyle.Custom; - txtCustoNo.StyleCustomMode = true; - txtCustoNo.TabIndex = 122; - txtCustoNo.TextAlignment = ContentAlignment.MiddleLeft; - txtCustoNo.Watermark = ""; - // - // txtCustoName - // - txtCustoName.Cursor = Cursors.IBeam; - txtCustoName.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtCustoName.Location = new Point(134, 72); - txtCustoName.Margin = new Padding(4, 5, 4, 5); - txtCustoName.MinimumSize = new Size(1, 1); - txtCustoName.Name = "txtCustoName"; - txtCustoName.Padding = new Padding(5); - txtCustoName.Radius = 20; - txtCustoName.ReadOnly = true; - txtCustoName.ShowText = false; - txtCustoName.Size = new Size(203, 35); - txtCustoName.Style = Sunny.UI.UIStyle.Custom; - txtCustoName.StyleCustomMode = true; - txtCustoName.TabIndex = 121; - txtCustoName.TextAlignment = ContentAlignment.MiddleLeft; - txtCustoName.Watermark = ""; - // - // txtPassportNum - // - txtPassportNum.Cursor = Cursors.IBeam; - txtPassportNum.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtPassportNum.Location = new Point(437, 121); - txtPassportNum.Margin = new Padding(4, 5, 4, 5); - txtPassportNum.MinimumSize = new Size(1, 1); - txtPassportNum.Name = "txtPassportNum"; - txtPassportNum.Padding = new Padding(5); - txtPassportNum.Radius = 20; - txtPassportNum.ReadOnly = true; - txtPassportNum.ShowText = false; - txtPassportNum.Size = new Size(203, 35); - txtPassportNum.Style = Sunny.UI.UIStyle.Custom; - txtPassportNum.StyleCustomMode = true; - txtPassportNum.TabIndex = 120; - txtPassportNum.TextAlignment = ContentAlignment.MiddleLeft; - txtPassportNum.Watermark = ""; - // - // txtTel - // - txtTel.Cursor = Cursors.IBeam; - txtTel.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtTel.Location = new Point(437, 172); - txtTel.Margin = new Padding(4, 5, 4, 5); - txtTel.MinimumSize = new Size(1, 1); - txtTel.Name = "txtTel"; - txtTel.Padding = new Padding(5); - txtTel.Radius = 20; - txtTel.ReadOnly = true; - txtTel.ShowText = false; - txtTel.Size = new Size(203, 35); - txtTel.Style = Sunny.UI.UIStyle.Custom; - txtTel.StyleCustomMode = true; - txtTel.TabIndex = 119; - txtTel.TextAlignment = ContentAlignment.MiddleLeft; - txtTel.Watermark = ""; - // - // dtpBirth - // - dtpBirth.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; - dtpBirth.FillColor = Color.White; - dtpBirth.Font = new Font("Microsoft Sans Serif", 15.75F); - dtpBirth.Location = new Point(134, 176); - dtpBirth.Margin = new Padding(4, 5, 4, 5); - dtpBirth.MaxLength = 10; - dtpBirth.MinimumSize = new Size(63, 0); - dtpBirth.Name = "dtpBirth"; - dtpBirth.Padding = new Padding(0, 0, 30, 2); - dtpBirth.Radius = 20; - dtpBirth.ReadOnly = true; - dtpBirth.Size = new Size(203, 31); - dtpBirth.Style = Sunny.UI.UIStyle.Custom; - dtpBirth.SymbolDropDown = 61555; - dtpBirth.SymbolNormal = 61555; - dtpBirth.SymbolSize = 24; - dtpBirth.TabIndex = 118; - dtpBirth.Text = "2020-11-24"; - dtpBirth.TextAlignment = ContentAlignment.MiddleLeft; - dtpBirth.Value = new DateTime(2020, 11, 24, 22, 50, 36, 791); - dtpBirth.Watermark = ""; - // - // txtAddress - // - txtAddress.Cursor = Cursors.IBeam; - txtAddress.Font = new Font("微软雅黑", 15.75F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtAddress.Location = new Point(132, 224); - txtAddress.Margin = new Padding(4, 5, 4, 5); - txtAddress.MinimumSize = new Size(1, 1); - txtAddress.Name = "txtAddress"; - txtAddress.Padding = new Padding(5); - txtAddress.Radius = 20; - txtAddress.ReadOnly = true; - txtAddress.ShowText = false; - txtAddress.Size = new Size(508, 35); - txtAddress.Style = Sunny.UI.UIStyle.Custom; - txtAddress.StyleCustomMode = true; - txtAddress.TabIndex = 117; - txtAddress.TextAlignment = ContentAlignment.MiddleLeft; - txtAddress.Watermark = ""; - // // label2 // label2.AutoSize = true; @@ -807,52 +333,6 @@ label32.TabIndex = 107; label32.Text = "客户编号"; // - // dgvWti - // - dgvWti.AllowUserToAddRows = false; - dgvWti.AllowUserToDeleteRows = false; - dgvWti.AllowUserToResizeColumns = false; - dgvWti.AllowUserToResizeRows = false; - dataGridViewCellStyle5.BackColor = Color.FromArgb(235, 243, 255); - dgvWti.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; - dgvWti.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dgvWti.BackgroundColor = Color.White; - dgvWti.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle6.BackColor = Color.FromArgb(80, 160, 255); - dataGridViewCellStyle6.Font = new Font("微软雅黑", 12F); - dataGridViewCellStyle6.ForeColor = Color.White; - dataGridViewCellStyle6.SelectionBackColor = SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = DataGridViewTriState.True; - dgvWti.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; - dgvWti.ColumnHeadersHeight = 32; - dgvWti.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dgvWti.Columns.AddRange(new DataGridViewColumn[] { Column11, token, clRoomNo, clCustoNo, clStartTime, clDealTime, clWater, clElectric, clMarkUser, Column5, Column6, Column7, Column9, Column10 }); - dgvWti.EnableHeadersVisualStyles = false; - dgvWti.Font = new Font("微软雅黑", 12F); - dgvWti.GridColor = Color.FromArgb(80, 160, 255); - dgvWti.Location = new Point(3, 3); - dgvWti.Name = "dgvWti"; - dataGridViewCellStyle7.Alignment = DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = Color.FromArgb(235, 243, 255); - dataGridViewCellStyle7.Font = new Font("微软雅黑", 12F); - dataGridViewCellStyle7.ForeColor = Color.FromArgb(48, 48, 48); - dataGridViewCellStyle7.SelectionBackColor = Color.FromArgb(80, 160, 255); - dataGridViewCellStyle7.SelectionForeColor = Color.White; - dataGridViewCellStyle7.WrapMode = DataGridViewTriState.True; - dgvWti.RowHeadersDefaultCellStyle = dataGridViewCellStyle7; - dgvWti.RowHeadersVisible = false; - dataGridViewCellStyle8.BackColor = Color.White; - dgvWti.RowsDefaultCellStyle = dataGridViewCellStyle8; - dgvWti.RowTemplate.Height = 29; - dgvWti.SelectedIndex = -1; - dgvWti.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dgvWti.Size = new Size(656, 291); - dgvWti.StripeOddColor = Color.FromArgb(235, 243, 255); - dgvWti.Style = Sunny.UI.UIStyle.Custom; - dgvWti.TabIndex = 0; - // // uiTabControlMenu2 // uiTabControlMenu2.Alignment = TabAlignment.Left; @@ -874,27 +354,28 @@ // // tabPage1 // - tabPage1.Controls.Add(txtReceipts); + tabPage1.Controls.Add(dtpCheckTime); + tabPage1.Controls.Add(txtRoomNo); + tabPage1.Controls.Add(CustoName); + tabPage1.Controls.Add(CustoNo); tabPage1.Controls.Add(btnBalance); + tabPage1.Controls.Add(txtReceipts); + tabPage1.Controls.Add(btnPg); + tabPage1.Controls.Add(dgvSpendList); tabPage1.Controls.Add(label24); tabPage1.Controls.Add(lblVIPPrice); tabPage1.Controls.Add(label18); tabPage1.Controls.Add(label15); - tabPage1.Controls.Add(dgvSpendList); tabPage1.Controls.Add(label17); tabPage1.Controls.Add(lblDay); tabPage1.Controls.Add(label1); tabPage1.Controls.Add(lable00); tabPage1.Controls.Add(lblGetReceipts); tabPage1.Controls.Add(label29); - tabPage1.Controls.Add(CustoName); tabPage1.Controls.Add(lblVIP); tabPage1.Controls.Add(label21); - tabPage1.Controls.Add(dtpCheckTime); - tabPage1.Controls.Add(CustoNo); tabPage1.Controls.Add(label25); tabPage1.Controls.Add(lblChange); - tabPage1.Controls.Add(txtRoomNo); tabPage1.Controls.Add(label28); tabPage1.Controls.Add(label27); tabPage1.Location = new Point(201, 0); @@ -904,41 +385,107 @@ tabPage1.Text = "退房结算"; tabPage1.UseVisualStyleBackColor = true; // + // dtpCheckTime + // + dtpCheckTime.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + dtpCheckTime.Location = new Point(376, 16); + dtpCheckTime.Name = "dtpCheckTime"; + dtpCheckTime.PlaceholderText = ""; + dtpCheckTime.ReadOnly = true; + dtpCheckTime.Size = new Size(168, 42); + dtpCheckTime.TabIndex = 161; + // + // txtRoomNo + // + txtRoomNo.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtRoomNo.Location = new Point(376, 67); + txtRoomNo.Name = "txtRoomNo"; + txtRoomNo.PlaceholderText = ""; + txtRoomNo.ReadOnly = true; + txtRoomNo.Size = new Size(168, 42); + txtRoomNo.TabIndex = 160; + // + // CustoName + // + CustoName.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + CustoName.Location = new Point(117, 67); + CustoName.Name = "CustoName"; + CustoName.PlaceholderText = ""; + CustoName.ReadOnly = true; + CustoName.Size = new Size(143, 42); + CustoName.TabIndex = 159; + // + // CustoNo + // + CustoNo.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + CustoNo.Location = new Point(117, 16); + CustoNo.Name = "CustoNo"; + CustoNo.PlaceholderText = ""; + CustoNo.ReadOnly = true; + CustoNo.Size = new Size(143, 42); + CustoNo.TabIndex = 158; + // + // btnBalance + // + btnBalance.Location = new Point(422, 493); + btnBalance.Name = "btnBalance"; + btnBalance.Size = new Size(183, 48); + btnBalance.TabIndex = 157; + btnBalance.Text = "结 算"; + btnBalance.Type = AntdUI.TTypeMini.Primary; + btnBalance.Click += btnBalance_Click; + // // txtReceipts // - txtReceipts.Cursor = Cursors.IBeam; - txtReceipts.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); - txtReceipts.Location = new Point(548, 329); - txtReceipts.Margin = new Padding(4, 5, 4, 5); - txtReceipts.MinimumSize = new Size(1, 16); + txtReceipts.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtReceipts.Location = new Point(506, 327); txtReceipts.Name = "txtReceipts"; - txtReceipts.Padding = new Padding(5); - txtReceipts.ShowText = false; - txtReceipts.Size = new Size(74, 26); - txtReceipts.TabIndex = 117; - txtReceipts.TextAlignment = ContentAlignment.MiddleCenter; - txtReceipts.Watermark = ""; + txtReceipts.PlaceholderText = ""; + txtReceipts.Radius = 0; + txtReceipts.Size = new Size(99, 33); + txtReceipts.TabIndex = 156; txtReceipts.TextChanged += txtReceipts_TextChanged; // + // btnPg + // + btnPg.Current = 0; + btnPg.Location = new Point(7, 330); + btnPg.Name = "btnPg"; + btnPg.PageSize = 15; + btnPg.ShowSizeChanger = true; + btnPg.Size = new Size(403, 25); + btnPg.TabIndex = 135; + btnPg.Total = 1000000; + btnPg.ValueChanged += btnPg_ValueChanged; + btnPg.ShowTotalChanged += btnPg_ShowTotalChanged; + // + // dgvSpendList + // + dgvSpendList.Location = new Point(7, 113); + dgvSpendList.Name = "dgvSpendList"; + dgvSpendList.Size = new Size(654, 208); + dgvSpendList.TabIndex = 118; + dgvSpendList.Text = "table1"; + // // tabPage2 // - tabPage2.Controls.Add(cboCustoType); + tabPage2.Controls.Add(txtCustomerAddress); + tabPage2.Controls.Add(txtDateOfBirth); + tabPage2.Controls.Add(txtCustomerGender); + tabPage2.Controls.Add(txtCustomerName); + tabPage2.Controls.Add(txtCustomerNumber); + tabPage2.Controls.Add(txtTel); + tabPage2.Controls.Add(txtIdCardNumber); + tabPage2.Controls.Add(txtPassportName); + tabPage2.Controls.Add(txtCustomerType); tabPage2.Controls.Add(label32); - tabPage2.Controls.Add(cboPassportType); tabPage2.Controls.Add(label31); - tabPage2.Controls.Add(cboCustoSex); tabPage2.Controls.Add(label30); - tabPage2.Controls.Add(txtCustoNo); tabPage2.Controls.Add(label22); - tabPage2.Controls.Add(txtCustoName); tabPage2.Controls.Add(label16); - tabPage2.Controls.Add(txtPassportNum); tabPage2.Controls.Add(label5); - tabPage2.Controls.Add(txtTel); tabPage2.Controls.Add(label4); - tabPage2.Controls.Add(dtpBirth); tabPage2.Controls.Add(label3); - tabPage2.Controls.Add(txtAddress); tabPage2.Controls.Add(label2); tabPage2.Location = new Point(201, 0); tabPage2.Name = "tabPage2"; @@ -947,6 +494,96 @@ tabPage2.Text = "客户信息"; tabPage2.UseVisualStyleBackColor = true; // + // txtCustomerAddress + // + txtCustomerAddress.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtCustomerAddress.Location = new Point(134, 221); + txtCustomerAddress.Name = "txtCustomerAddress"; + txtCustomerAddress.PlaceholderText = ""; + txtCustomerAddress.ReadOnly = true; + txtCustomerAddress.Size = new Size(506, 42); + txtCustomerAddress.TabIndex = 158; + // + // txtDateOfBirth + // + txtDateOfBirth.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtDateOfBirth.Location = new Point(134, 170); + txtDateOfBirth.Name = "txtDateOfBirth"; + txtDateOfBirth.PlaceholderText = ""; + txtDateOfBirth.ReadOnly = true; + txtDateOfBirth.Size = new Size(203, 42); + txtDateOfBirth.TabIndex = 157; + // + // txtCustomerGender + // + txtCustomerGender.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtCustomerGender.Location = new Point(134, 119); + txtCustomerGender.Name = "txtCustomerGender"; + txtCustomerGender.PlaceholderText = ""; + txtCustomerGender.ReadOnly = true; + txtCustomerGender.Size = new Size(203, 42); + txtCustomerGender.TabIndex = 156; + // + // txtCustomerName + // + txtCustomerName.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtCustomerName.Location = new Point(134, 68); + txtCustomerName.Name = "txtCustomerName"; + txtCustomerName.PlaceholderText = ""; + txtCustomerName.ReadOnly = true; + txtCustomerName.Size = new Size(203, 42); + txtCustomerName.TabIndex = 155; + // + // txtCustomerNumber + // + txtCustomerNumber.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtCustomerNumber.Location = new Point(134, 17); + txtCustomerNumber.Name = "txtCustomerNumber"; + txtCustomerNumber.PlaceholderText = ""; + txtCustomerNumber.ReadOnly = true; + txtCustomerNumber.Size = new Size(203, 42); + txtCustomerNumber.TabIndex = 154; + // + // txtTel + // + txtTel.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtTel.Location = new Point(437, 170); + txtTel.Name = "txtTel"; + txtTel.PlaceholderText = ""; + txtTel.ReadOnly = true; + txtTel.Size = new Size(203, 42); + txtTel.TabIndex = 153; + // + // txtIdCardNumber + // + txtIdCardNumber.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtIdCardNumber.Location = new Point(437, 119); + txtIdCardNumber.Name = "txtIdCardNumber"; + txtIdCardNumber.PlaceholderText = ""; + txtIdCardNumber.ReadOnly = true; + txtIdCardNumber.Size = new Size(203, 42); + txtIdCardNumber.TabIndex = 152; + // + // txtPassportName + // + txtPassportName.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtPassportName.Location = new Point(437, 68); + txtPassportName.Name = "txtPassportName"; + txtPassportName.PlaceholderText = ""; + txtPassportName.ReadOnly = true; + txtPassportName.Size = new Size(203, 42); + txtPassportName.TabIndex = 151; + // + // txtCustomerType + // + txtCustomerType.Font = new Font("Microsoft YaHei UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + txtCustomerType.Location = new Point(437, 17); + txtCustomerType.Name = "txtCustomerType"; + txtCustomerType.PlaceholderText = ""; + txtCustomerType.ReadOnly = true; + txtCustomerType.Size = new Size(203, 42); + txtCustomerType.TabIndex = 150; + // // tabPage3 // tabPage3.Controls.Add(dgvWti); @@ -957,96 +594,13 @@ tabPage3.Text = "历史水电情况"; tabPage3.UseVisualStyleBackColor = true; // - // Column11 - // - Column11.DataPropertyName = "WtiNo"; - Column11.HeaderText = "Column11"; - Column11.Name = "Column11"; - Column11.Visible = false; - // - // token - // - token.DataPropertyName = "user_token"; - token.HeaderText = "token"; - token.Name = "token"; - token.Visible = false; - // - // clRoomNo - // - clRoomNo.DataPropertyName = "RoomNo"; - clRoomNo.HeaderText = "房间号"; - clRoomNo.Name = "clRoomNo"; - // - // clCustoNo - // - clCustoNo.DataPropertyName = "CustoNo"; - clCustoNo.HeaderText = "客户编号"; - clCustoNo.Name = "clCustoNo"; - // - // clStartTime - // - clStartTime.DataPropertyName = "UseDate"; - clStartTime.HeaderText = "开始时间"; - clStartTime.Name = "clStartTime"; - // - // clDealTime - // - clDealTime.DataPropertyName = "EndDate"; - clDealTime.HeaderText = "结束时间"; - clDealTime.Name = "clDealTime"; - // - // clWater - // - clWater.DataPropertyName = "WaterUse"; - clWater.HeaderText = "水费"; - clWater.Name = "clWater"; - // - // clElectric - // - clElectric.DataPropertyName = "PowerUse"; - clElectric.HeaderText = "电费"; - clElectric.Name = "clElectric"; - // - // clMarkUser - // - clMarkUser.DataPropertyName = "Record"; - clMarkUser.HeaderText = "记录员"; - clMarkUser.Name = "clMarkUser"; - // - // Column5 - // - Column5.DataPropertyName = "IsDelete"; - Column5.HeaderText = "Column5"; - Column5.Name = "Column5"; - Column5.Visible = false; - // - // Column6 - // - Column6.DataPropertyName = "DataInsUsr"; - Column6.HeaderText = "Column6"; - Column6.Name = "Column6"; - Column6.Visible = false; - // - // Column7 - // - Column7.DataPropertyName = "DataInsDate"; - Column7.HeaderText = "Column7"; - Column7.Name = "Column7"; - Column7.Visible = false; - // - // Column9 - // - Column9.DataPropertyName = "DataChgUsr"; - Column9.HeaderText = "Column9"; - Column9.Name = "Column9"; - Column9.Visible = false; - // - // Column10 + // dgvWti // - Column10.DataPropertyName = "DataChgDate"; - Column10.HeaderText = "Column10"; - Column10.Name = "Column10"; - Column10.Visible = false; + dgvWti.Location = new Point(5, 7); + dgvWti.Name = "dgvWti"; + dgvWti.Size = new Size(654, 502); + dgvWti.TabIndex = 136; + dgvWti.Text = "table1"; // // FrmCheckOutForm // @@ -1064,8 +618,6 @@ Load += FrmCheckOutForm_Load; MouseDown += FrmCheckOutForm_MouseDown; MouseMove += FrmCheckOutForm_MouseMove; - ((System.ComponentModel.ISupportInitialize)dgvSpendList).EndInit(); - ((System.ComponentModel.ISupportInitialize)dgvWti).EndInit(); uiTabControlMenu2.ResumeLayout(false); tabPage1.ResumeLayout(false); tabPage1.PerformLayout(); @@ -1076,51 +628,22 @@ } #endregion - private Sunny.UI.UIButton btnBalance; private System.Windows.Forms.Label lblVIPPrice; private System.Windows.Forms.Label label15; - private Sunny.UI.UIDataGridView dgvSpendList; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; - private System.Windows.Forms.DataGridViewTextBoxColumn clPrice; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; - private System.Windows.Forms.DataGridViewTextBoxColumn clSpendNo; - private System.Windows.Forms.DataGridViewTextBoxColumn Column1; - private System.Windows.Forms.DataGridViewTextBoxColumn Column2; - private System.Windows.Forms.DataGridViewTextBoxColumn Column3; - private System.Windows.Forms.DataGridViewTextBoxColumn Column4; - private System.Windows.Forms.DataGridViewTextBoxColumn Column8; private System.Windows.Forms.Label lblDay; private System.Windows.Forms.Label lable00; private System.Windows.Forms.Label label29; private System.Windows.Forms.Label lblVIP; - private Sunny.UI.UITextBox dtpCheckTime; private System.Windows.Forms.Label label25; - private Sunny.UI.UITextBox txtRoomNo; private System.Windows.Forms.Label label27; private System.Windows.Forms.Label label28; private System.Windows.Forms.Label lblChange; - private Sunny.UI.UITextBox CustoNo; private System.Windows.Forms.Label label21; - private Sunny.UI.UITextBox CustoName; private System.Windows.Forms.Label lblGetReceipts; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label17; private System.Windows.Forms.Label label18; - private Sunny.UI.UIComboBox cboCustoType; - private Sunny.UI.UIComboBox cboPassportType; - private Sunny.UI.UIComboBox cboCustoSex; - private Sunny.UI.UITextBox txtCustoNo; - private Sunny.UI.UITextBox txtCustoName; - private Sunny.UI.UITextBox txtPassportNum; - private Sunny.UI.UITextBox txtTel; - private Sunny.UI.UIDatePicker dtpBirth; - private Sunny.UI.UITextBox txtAddress; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; @@ -1130,25 +653,27 @@ private System.Windows.Forms.Label label30; private System.Windows.Forms.Label label31; private System.Windows.Forms.Label label32; - private Sunny.UI.UIDataGridView dgvWti; private Sunny.UI.UITabControlMenu uiTabControlMenu2; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage3; - private Sunny.UI.UITextBox txtReceipts; - private DataGridViewTextBoxColumn Column11; - private DataGridViewTextBoxColumn token; - private DataGridViewTextBoxColumn clRoomNo; - private DataGridViewTextBoxColumn clCustoNo; - private DataGridViewTextBoxColumn clStartTime; - private DataGridViewTextBoxColumn clDealTime; - private DataGridViewTextBoxColumn clWater; - private DataGridViewTextBoxColumn clElectric; - private DataGridViewTextBoxColumn clMarkUser; - private DataGridViewTextBoxColumn Column5; - private DataGridViewTextBoxColumn Column6; - private DataGridViewTextBoxColumn Column7; - private DataGridViewTextBoxColumn Column9; - private DataGridViewTextBoxColumn Column10; + private AntdUI.Table dgvSpendList; + private AntdUI.Pagination btnPg; + private AntdUI.Input txtTel; + private AntdUI.Input txtIdCardNumber; + private AntdUI.Input txtPassportName; + private AntdUI.Input txtCustomerType; + private AntdUI.Input txtCustomerAddress; + private AntdUI.Input txtDateOfBirth; + private AntdUI.Input txtCustomerGender; + private AntdUI.Input txtCustomerName; + private AntdUI.Input txtCustomerNumber; + private AntdUI.Input txtReceipts; + private AntdUI.Button btnBalance; + private AntdUI.Input txtRoomNo; + private AntdUI.Input CustoName; + private AntdUI.Input CustoNo; + private AntdUI.Input dtpCheckTime; + private AntdUI.Table dgvWti; } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.cs index 911d1b0..945be43 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.cs @@ -25,6 +25,7 @@ using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Contract; using jvncorelib.CodeLib; +using jvncorelib.EntityLib; using Sunny.UI; using System.Transactions; @@ -92,50 +93,10 @@ namespace EOM.TSHotelManagement.FormUI return; } List lstSourceGrid = customerTypes.listSource; - this.cboCustoType.DataSource = lstSourceGrid; - this.cboCustoType.DisplayMember = nameof(ReadCustoTypeOutputDto.CustomerTypeName); - this.cboCustoType.ValueMember = nameof(ReadCustoTypeOutputDto.CustomerType); - this.cboCustoType.SelectedIndex = 0; - this.cboCustoType.ReadOnly = true; #endregion - #region 加载证件类型信息 - result = HttpHelper.Request(ApiConstants.Base_SelectPassPortTypeAllCanUse); - var passportTypes = HttpHelper.JsonToModel>(result.message); - if (passportTypes.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("SelectPassPortTypeAllCanUse+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - List passPorts = passportTypes.listSource; - this.cboPassportType.DataSource = passPorts; - this.cboPassportType.DisplayMember = nameof(ReadPassportTypeOutputDto.PassportName); - this.cboPassportType.ValueMember = nameof(ReadPassportTypeOutputDto.PassportId); - this.cboPassportType.SelectedIndex = 0; - #endregion - - #region 加载性别信息 - dic = new Dictionary - { - { nameof(ReadGenderTypeInputDto.IsDelete) , "0" }, - { nameof(ReadGenderTypeInputDto.IgnorePaging) , "true" } - }; - result = HttpHelper.Request(ApiConstants.Base_SelectGenderTypeAll, dic); - var genderTypes = HttpHelper.JsonToModel>(result.message); - if (genderTypes.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Base_SelectGenderTypeAll}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - var listSexType = genderTypes.listSource; - this.cboCustoSex.DataSource = listSexType; - this.cboCustoSex.DisplayMember = nameof(EnumDto.Description); - this.cboCustoSex.ValueMember = nameof(EnumDto.Id); - this.cboCustoSex.SelectedIndex = 0; - #endregion - - double sum = 0; - txtCustoNo.Text = ucRoom.rm_CustoNo; + decimal sum = 0; + txtCustomerNumber.Text = ucRoom.rm_CustoNo; CustoNo.Text = ucRoom.rm_CustoNo; txtRoomNo.Text = ucRoom.rm_RoomNo; @@ -174,23 +135,14 @@ namespace EOM.TSHotelManagement.FormUI return; } - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(stayDays.Source.StayDays) * room.RoomRent)); + sum = Convert.ToDecimal(Convert.ToString(Convert.ToInt32(stayDays.Source.StayDays) * room.RoomRent)); lblDay.Text = Convert.ToString(Convert.ToInt32(stayDays.Source.StayDays)); w = new CreateEnergyManagementInputDto() { - InformationNumber = new UniqueCode().GetNewId("EM-"), - IsDelete = 0, - DataInsUsr = LoginInfo.WorkerNo, - DataInsDate = DateTime.Now, - CustomerNumber = txtCustoNo.Text, - EndDate = Convert.ToDateTime(DateTime.Parse(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"))), PowerUsage = Convert.ToDecimal(Convert.ToInt32(stayDays.Source.StayDays) * 3 * 1), - WaterUsage = Convert.ToDecimal(Convert.ToDouble(stayDays.Source.StayDays) * 80 * 0.002), - RoomNumber = txtRoomNo.Text, - Recorder = LoginInfo.WorkerNo, - StartDate = Convert.ToDateTime(DateTime.Parse(dtpCheckTime.Text)) + WaterUsage = Convert.ToDecimal(Convert.ToDouble(stayDays.Source.StayDays) * 80 * 0.002) }; #region 加载客户信息 @@ -208,13 +160,14 @@ namespace EOM.TSHotelManagement.FormUI try { CustoName.Text = customer?.Source.CustomerName; - txtCustoName.Text = customer?.Source.CustomerName; + txtCustomerName.Text = customer?.Source.CustomerName; txtTel.Text = customer?.Source.CustomerPhoneNumber; - cboCustoSex.SelectedValue = customer?.Source.CustomerGender ?? 0; - cboCustoType.SelectedValue = customer.Source.CustomerType; - cboPassportType.SelectedValue = customer.Source.PassportId; - dtpBirth.Value = Convert.ToDateTime(customer.Source.DateOfBirth); - txtPassportNum.Text = customer.Source.IdCardNumber; + txtCustomerGender.Text = customer?.Source.GenderName ?? string.Empty; + txtCustomerType.Text = customer.Source.CustomerTypeName; + txtPassportName.Text = customer.Source.PassportName; + txtDateOfBirth.Text = Convert.ToString(customer.Source.DateOfBirth); + txtIdCardNumber.Text = customer.Source.IdCardNumber; + txtCustomerAddress.Text = customer.Source.CustomerAddress; } catch { @@ -226,104 +179,67 @@ namespace EOM.TSHotelManagement.FormUI #endregion #region 加载消费信息 - string RoomNo = txtRoomNo.Text; - dic = new Dictionary() - { - { nameof(ReadSpendInputDto.RoomNumber) , RoomNo } - }; - result = HttpHelper.Request(ApiConstants.Spend_SelectSpendByRoomNo, dic); - var spendInfo = HttpHelper.JsonToModel>(result.message); - if (spendInfo.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Spend_SelectSpendByRoomNo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - dgvSpendList.AutoGenerateColumns = false; - dgvSpendList.DataSource = spendInfo.listSource; - double total = 0; - if (dgvSpendList.Rows.Count == 0) + + var dataCount = 0; + btnPg.PageSizeOptions = new int[] { 15, 30, 50, 100 }; + dgvSpendList.Spin("正在加载中...", config => { - total = 0; - } - else + TableComHelper tableComHelper = new TableComHelper(); + dgvSpendList.Columns = tableComHelper.ConvertToAntdColumns(tableComHelper.GenerateDataColumns()); + dgvSpendList.DataSource = GetPageData(btnPg.Current, btnPg.PageSize, ref dataCount); + btnPg.PageSize = 15; + btnPg.Current = 1; + btnPg.Total = dataCount; + }, () => { - dic = new Dictionary() - { - { nameof(ReadSpendInputDto.RoomNumber) , RoomNo }, - { nameof(ReadSpendInputDto.CustomerNumber) , CustoNo.Text.ToString() } - }; - result = HttpHelper.Request(ApiConstants.Spend_SumConsumptionAmount, dic); - var consumptionAmount = HttpHelper.JsonToModel>(result.message); - if (consumptionAmount.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError($"{ApiConstants.Spend_SumConsumptionAmount}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - total = Convert.ToDouble(consumptionAmount.Source.ConsumptionAmount); - } + System.Diagnostics.Debug.WriteLine("加载结束"); + }); #endregion #region 加载水电费信息 - dic = new Dictionary() + dgvWti.Spin("正在加载中...", config => { - { nameof(ReadEnergyManagementInputDto.RoomNo),txtRoomNo.Text.Trim()} - }; - result = HttpHelper.Request(ApiConstants.EnergyManagement_SelectEnergyManagementInfo, dic); - var energyManagements = HttpHelper.JsonToModel>(result.message); - if (energyManagements.StatusCode != StatusCodeConstants.Success) + TableComHelper tableComHelper = new TableComHelper(); + dgvWti.Columns = tableComHelper.ConvertToAntdColumns(tableComHelper.GenerateDataColumns()); + dgvWti.DataSource = GetEnergyPageData(); + }, () => { - UIMessageBox.ShowError($"{ApiConstants.EnergyManagement_SelectEnergyManagementInfo}+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - var listWti = energyManagements.listSource; - dgvWti.DataSource = listWti; - dgvWti.AutoGenerateColumns = false; + System.Diagnostics.Debug.WriteLine("加载结束"); + }); #endregion - if (cboCustoType.Text == "钻石会员") - { - double m = total + sum; - lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); - lblVIPPrice.Text = Decimal.Parse((m * 0.80).ToString()).ToString("#,##0.00"); - lblVIP.Text = "八折"; - } - else if (cboCustoType.Text == "白金会员") - { + var customerType = lstSourceGrid.SingleOrDefault(a => a.CustomerTypeName == txtCustomerType.Text); - double m = total + sum; - lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); - lblVIPPrice.Text = Decimal.Parse((m * 0.85).ToString()).ToString("#,##0.00"); - lblVIP.Text = "八五折"; - } - else if (cboCustoType.Text == "黄金会员") + //计算消费总额 + dic = new Dictionary() { - double m = total + sum; - lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); - lblVIPPrice.Text = Decimal.Parse((m * 0.90).ToString()).ToString("#,##0.00"); - lblVIP.Text = "九折"; - } - else if (cboCustoType.Text == "普通会员") + { nameof(ReadSpendInputDto.RoomNumber), txtRoomNo.Text.Trim() }, + { nameof(ReadSpendInputDto.CustomerNumber), txtCustomerNumber.Text.Trim() }, + }; + result = HttpHelper.Request(ApiConstants.Spend_SumConsumptionAmount, dic); + var response = HttpHelper.JsonToModel>(result.message); + if (response.StatusCode != StatusCodeConstants.Success) { - double m = total + sum; - lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); - lblVIPPrice.Text = Decimal.Parse((m * 0.95).ToString()).ToString("#,##0.00"); - lblVIP.Text = "九五折"; + UIMessageBox.ShowError($"{ApiConstants.Spend_SumConsumptionAmount}+接口服务异常,请提交Issue或尝试更新版本!"); + return; } - else if (cboCustoType.Text == "普通用户") - { - double m = total + sum; - lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); - lblVIPPrice.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); - lblVIP.Text = "不 打 折"; - + decimal total = response.Source.ConsumptionAmount; + decimal m = total + sum; + if (!customerType.IsNullOrEmpty() && customerType.Discount != 0) + { + lblGetReceipts.Text = m.ToString("#,##0.00"); + lblVIPPrice.Text = (m * customerType.Discount).ToString("#,##0.00"); + lblVIP.Text = customerType.Discount.ToZheString(); + Refresh(); } - - if (_loadingProgress != null) + else { - _loadingProgress.Close(); + lblGetReceipts.Text = m.ToString("#,##0.00"); + lblVIPPrice.Text = m.ToString("#,##0.00"); + lblVIP.Text = "折扣未配置或无折扣"; + Refresh(); } - } #endregion @@ -357,98 +273,32 @@ namespace EOM.TSHotelManagement.FormUI #region 结算按钮点击事件 private void btnBalance_Click(object sender, EventArgs e) { - if (!txtReceipts.Text.IsNullOrEmpty() && Convert.ToDecimal(txtReceipts.Text) > Convert.ToDecimal(lblVIPPrice.Text))//判断实收金额是否为空以及是否小于应收金额 + if (!string.IsNullOrEmpty(txtReceipts.Text) && Convert.ToDecimal(txtReceipts.Text) > Convert.ToDecimal(lblVIPPrice.Text))//判断实收金额是否为空以及是否小于应收金额 { - using (TransactionScope scope = new TransactionScope()) - { - dic = new Dictionary() - { - { nameof(ReadRoomInputDto.RoomNumber) , txtRoomNo.Text} - }; - result = HttpHelper.Request(ApiConstants.Room_SelectRoomByRoomNo, dic); - var roomInfo = HttpHelper.JsonToModel>(result.message); - if (roomInfo.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("SelectRoomByRoomNo+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - ReadRoomOutputDto r = roomInfo.Source;//根据房间编号查询房间信息 - string checktime = r.LastCheckInTime.ToString();//获取入住时间 - if (dgvSpendList.Rows.Count == 0) + result = HttpHelper.Request(ApiConstants.Room_CheckoutRoom, + HttpHelper.ModelToJson(new CheckoutRoomDto { - dic = new Dictionary() - { - { nameof(ReadRoomInputDto.RoomNumber) , txtRoomNo.Text } - }; - result = HttpHelper.Request(ApiConstants.Room_UpdateRoomByRoomNo, dic); - var response = HttpHelper.JsonToModel(result.message); - if (response.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("UpdateRoomByRoomNo+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - - result = HttpHelper.Request(ApiConstants.EnergyManagement_InsertEnergyManagementInfo, HttpHelper.ModelToJson(w)); - response = HttpHelper.JsonToModel(result.message); - if (response.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("InsertEnergyManagementInfo+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - this.Close(); - UIMessageBox.Show("结算成功!", "系统提示", UIStyle.Green); - FrmRoomManager.Reload(""); - FrmRoomManager._RefreshRoomCount(); - - #region 获取添加操作日志所需的信息 - RecordHelper.Record(LoginInfo.WorkerClub + "-" + LoginInfo.WorkerPosition + "-" + LoginInfo.WorkerName + "于" + Convert.ToDateTime(DateTime.Now) + "帮助" + txtCustoNo.Text + "进行了退房结算操作!", 3); - #endregion - scope.Complete(); - } - else - { - dic = new Dictionary() - { - { nameof(UpdateSpendInputDto.RoomNumber) , txtRoomNo.Text }, - { nameof(UpdateSpendInputDto.ConsumptionTime) , checktime} - }; - result = HttpHelper.Request(ApiConstants.Spend_UpdateMoneyState, dic); - var spendInfo = HttpHelper.JsonToModel(result.message); - if (spendInfo.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("UpdateMoneyState+接口服务异常,请提交Issue或尝试更新版本!"); - UIMessageBox.Show("结算失败!", "系统提示", UIStyle.Red); - return; - } - dic = new Dictionary() - { - { nameof(ReadRoomInputDto.RoomNumber) , txtRoomNo.Text } - }; - result = HttpHelper.Request(ApiConstants.Room_UpdateRoomByRoomNo, dic); - var response = HttpHelper.JsonToModel(result.message); - if (response.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("UpdateRoomByRoomNo+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - result = HttpHelper.Request(ApiConstants.EnergyManagement_InsertEnergyManagementInfo, HttpHelper.ModelToJson(w)); - response = HttpHelper.JsonToModel(result.message); - if (response.StatusCode != StatusCodeConstants.Success) - { - UIMessageBox.ShowError("InsertEnergyManagementInfo+接口服务异常,请提交Issue或尝试更新版本!"); - return; - } - UIMessageBox.Show("结算成功!", "系统提示", UIStyle.Green); - FrmRoomManager.Reload(""); - FrmRoomManager._RefreshRoomCount(); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(LoginInfo.WorkerClub + "-" + LoginInfo.WorkerPosition + "-" + LoginInfo.WorkerName + "于" + Convert.ToDateTime(DateTime.Now) + "帮助" + txtCustoNo.Text + "进行了退房结算操作!", 3); - #endregion - scope.Complete(); - this.Close(); - return; - } + RoomNumber = txtRoomNo.Text.Trim(), + CustomerNumber = txtCustomerNumber.Text.Trim(), + DataChgDate = DateTime.Now, + DataChgUsr = LoginInfo.WorkerNo, + ElectricityUsage = w.PowerUsage, + WaterUsage = w.WaterUsage + })); + var response = HttpHelper.JsonToModel(result.message); + if (response.StatusCode != StatusCodeConstants.Success) + { + UIMessageBox.ShowError($"{ApiConstants.Room_CheckoutRoom}+接口服务异常,请提交Issue或尝试更新版本!"); + return; } + UIMessageBox.Show("结算成功!", "系统提示", UIStyle.Green); + FrmRoomManager.Reload(""); + FrmRoomManager._RefreshRoomCount(); + + #region 获取添加操作日志所需的信息 + RecordHelper.Record(LoginInfo.WorkerClub + "-" + LoginInfo.WorkerPosition + "-" + LoginInfo.WorkerName + "于" + Convert.ToDateTime(DateTime.Now) + "帮助" + txtCustomerNumber.Text + "进行了退房结算操作!", 3); + #endregion + this.Close(); } else { @@ -457,5 +307,76 @@ namespace EOM.TSHotelManagement.FormUI } } #endregion + + private string btnPg_ShowTotalChanged(object sender, AntdUI.PagePageEventArgs e) + { + return $"{e.PageSize} / {e.Total}条 共{e.PageTotal}页"; + } + + private void btnPg_ValueChanged(object sender, AntdUI.PagePageEventArgs e) + { + var dataCount = 0; + dgvSpendList.Spin("正在加载中...", config => + { + dgvSpendList.DataSource = GetPageData(e.Current, e.PageSize, ref dataCount); + btnPg.Total = dataCount; + }, () => + { + System.Diagnostics.Debug.WriteLine("加载结束"); + }); + } + + object GetPageData(int current, int pageSize, ref int totalCount) + { + string RoomNo = txtRoomNo.Text; + dic = new Dictionary() + { + { nameof(ReadSpendInputDto.RoomNumber) , RoomNo }, + { nameof(ReadAdministratorInputDto.IgnorePaging) , "true" } + }; + result = HttpHelper.Request(ApiConstants.Spend_SelectSpendByRoomNo, dic); + var spendInfo = HttpHelper.JsonToModel>(result.message); + if (spendInfo.StatusCode != StatusCodeConstants.Success) + { + UIMessageBox.ShowError($"{ApiConstants.Spend_SelectSpendByRoomNo}+接口服务异常,请提交Issue或尝试更新版本!"); + } + + List spends = spendInfo.listSource; + totalCount = spendInfo.total; + var listTableSource = new List(); + + spends = spends.OrderBy(a => a.SpendNumber).ToList(); + + TableComHelper tableComHelper = new TableComHelper(); + listTableSource = tableComHelper.ConvertToAntdItems(spends); + + return listTableSource; + } + + object GetEnergyPageData() + { + dic = new Dictionary() + { + { nameof(ReadEnergyManagementInputDto.RoomNo),txtRoomNo.Text.Trim()} + }; + result = HttpHelper.Request(ApiConstants.EnergyManagement_SelectEnergyManagementInfo, dic); + var energyManagements = HttpHelper.JsonToModel>(result.message); + if (energyManagements.StatusCode != StatusCodeConstants.Success) + { + UIMessageBox.ShowError($"{ApiConstants.EnergyManagement_SelectEnergyManagementInfo}+接口服务异常,请提交Issue或尝试更新版本!"); + } + + List energys = energyManagements.listSource; + var listTableSource = new List(); + + energys = energys.OrderByDescending(a => a.StartDate).ToList(); + + TableComHelper tableComHelper = new TableComHelper(); + listTableSource = tableComHelper.ConvertToAntdItems(energys); + + return listTableSource; + } + + } } diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.resx b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.resx index ca0e1a4..598af85 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.resx +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCheckOutForm.resx @@ -117,90 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCustomerManagement.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCustomerManagement.cs index 59db0f7..259cd11 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmCustomerManagement.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmCustomerManagement.cs @@ -62,10 +62,8 @@ namespace EOM.TSHotelManagement.FormUI #region 用户管理界面加载事件方法 private void FrmCustomerManager_Load(object sender, EventArgs e) { - _loadingProgress.Show(); this.btnPg.PageSize = 15; LoadCustomer(); - _loadingProgress.Close(); } #endregion @@ -232,7 +230,6 @@ namespace EOM.TSHotelManagement.FormUI private void dgvCustomerList_CellDoubleClick(object sender, AntdUI.TableClickEventArgs e) { - _loadingProgress.Show(); if (e.Record is IList data) { cm_CustoNo = helper.GetValue(data, nameof(ReadCustomerOutputDto.CustomerNumber)); diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmEditInputs.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmEditInputs.cs index 7a97258..d3ea1c1 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmEditInputs.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmEditInputs.cs @@ -92,8 +92,8 @@ namespace EOM.TSHotelManagement.FormUI } var listSexType = genderTypes.listSource; this.cbSex.DataSource = listSexType; - this.cbSex.DisplayMember = nameof(ReadGenderTypeOutputDto.GenderName); - this.cbSex.ValueMember = nameof(ReadGenderTypeOutputDto.GenderId); + this.cbSex.DisplayMember = nameof(ReadGenderTypeOutputDto.Description); + this.cbSex.ValueMember = nameof(ReadGenderTypeOutputDto.Id); this.cbSex.SelectedIndex = 0; #endregion @@ -122,10 +122,6 @@ namespace EOM.TSHotelManagement.FormUI } } - if (_loadingProgress != null) - { - _loadingProgress.Close(); - } } private void btnOK_UpdClick(object sender, EventArgs e) @@ -271,9 +267,18 @@ namespace EOM.TSHotelManagement.FormUI { try { - cbSex.Text = result.sex; - txtCustoAdress.Text = result.address; - dtpBirthday.Value = Convert.ToDateTime(result.birthday); + cbSex.Text = result.sex ?? string.Empty; + txtCustoAdress.Text = result.address ?? string.Empty; + + if (DateTime.TryParse(result.birthday, out DateTime parsedDate)) + { + dtpBirthday.Value = parsedDate; + } + else + { + UIMessageBox.ShowError("请正确输入证件号码!"); + return; + } } catch { diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.Designer.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.Designer.cs index 6003f95..9881f6f 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.Designer.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.Designer.cs @@ -53,6 +53,7 @@ namespace EOM.TSHotelManagement.FormUI tabPage2 = new TabPage(); label3 = new AntdUI.Label(); tabPage3 = new TabPage(); + label4 = new AntdUI.Label(); picWorkerPic = new PictureBox(); uiTabControlMenu2.SuspendLayout(); tabPage1.SuspendLayout(); @@ -386,6 +387,7 @@ namespace EOM.TSHotelManagement.FormUI // // tabPage3 // + tabPage3.Controls.Add(label4); tabPage3.Controls.Add(picWorkerPic); tabPage3.Location = new Point(201, 0); tabPage3.Name = "tabPage3"; @@ -394,12 +396,22 @@ namespace EOM.TSHotelManagement.FormUI tabPage3.Text = "账号头像"; tabPage3.UseVisualStyleBackColor = true; // + // label4 + // + label4.Location = new Point(257, 416); + label4.Name = "label4"; + label4.Size = new Size(215, 23); + label4.TabIndex = 1; + label4.Text = "Tips:头像大小不能超过1MB"; + // // picWorkerPic // + picWorkerPic.BackgroundImage = Properties.Resources.账号; picWorkerPic.BackgroundImageLayout = ImageLayout.Stretch; picWorkerPic.Location = new Point(257, 150); picWorkerPic.Name = "picWorkerPic"; picWorkerPic.Size = new Size(215, 246); + picWorkerPic.SizeMode = PictureBoxSizeMode.StretchImage; picWorkerPic.TabIndex = 0; picWorkerPic.TabStop = false; picWorkerPic.Click += picWorkerPic_Click; @@ -451,5 +463,6 @@ namespace EOM.TSHotelManagement.FormUI private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.PictureBox picWorkerPic; private AntdUI.Label label3; + private AntdUI.Label label4; } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.cs index 67418ee..49baf14 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmMySpace.cs @@ -71,8 +71,8 @@ namespace EOM.TSHotelManagement.FormUI return; } cboSex.DataSource = genderTypes.listSource; - cboSex.DisplayMember = nameof(ReadGenderTypeOutputDto.GenderName); - cboSex.ValueMember = nameof(ReadGenderTypeOutputDto.GenderId); + cboSex.DisplayMember = nameof(ReadGenderTypeOutputDto.Description); + cboSex.ValueMember = nameof(ReadGenderTypeOutputDto.Id); //加载部门信息 result = HttpHelper.Request(ApiConstants.Base_SelectDeptAllCanUse); var depts = HttpHelper.JsonToModel>(result.message); @@ -146,7 +146,7 @@ namespace EOM.TSHotelManagement.FormUI if (workerPicSource != null && !string.IsNullOrEmpty(workerPicSource.PhotoPath)) { picWorkerPic.BackgroundImage = null; - if (!string.IsNullOrEmpty(workerPicSource.PhotoPath)) picWorkerPic.LoadAsync(workerPicSource.PhotoPath); + if (!string.IsNullOrEmpty(workerPicSource.PhotoPath)) picWorkerPic.Load(workerPicSource.PhotoPath); } } @@ -268,11 +268,11 @@ namespace EOM.TSHotelManagement.FormUI var response = HttpHelper.JsonToModel>(requestResult.message); if (response.StatusCode != StatusCodeConstants.Success) { - UIMessageBox.ShowError($"{ApiConstants.EmployeePhoto_InsertWorkerPhoto}+接口服务异常,请提交Issue或尝试更新版本!"); + UIMessageBox.ShowError($"{response.Message}:{ApiConstants.EmployeePhoto_InsertWorkerPhoto}+接口服务异常,请提交Issue或尝试更新版本!"); return; } - picWorkerPic.LoadAsync(response.Source.PhotoPath); UIMessageTip.ShowOk("头像上传成功!稍等将会加载头像哦.."); + picWorkerPic.Load(response.Source.PhotoPath); } } } diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomManagement.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomManagement.cs index ebed0bf..a1a1627 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomManagement.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomManagement.cs @@ -73,12 +73,10 @@ namespace EOM.TSHotelManagement.FormUI private void FrmRoomManager_Load(object sender, EventArgs e) { - loadingProgress.Show(); LoadRoomInfo(); LoadRoomTypesAndStates(); LoadRoomTypes(); LoadData(); - loadingProgress.Close(); } private void LoadRoomTypesAndStates() { diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomStateManagement.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomStateManagement.cs index 1c4e36d..acc0624 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomStateManagement.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmRoomStateManagement.cs @@ -71,12 +71,8 @@ namespace EOM.TSHotelManagement.FormUI case (int)RoomState.Maintenance: case (int)RoomState.Dirty: case (int)RoomState.Reserved: - dic = new Dictionary() - { - { nameof(ReadRoomInputDto.RoomNumber) , txtRoomNo.Text }, - { nameof(ReadRoomInputDto.RoomStateId) , cboState.SelectedValue.ToString() } - }; - result = HttpHelper.Request(ApiConstants.Room_UpdateRoomStateByRoomNo, dic); + var updateRoom = new UpdateRoomInputDto { RoomNumber = txtRoomNo.Text.Trim(), RoomStateId = Convert.ToInt32(cboState.SelectedValue) }; + result = HttpHelper.Request(ApiConstants.Room_UpdateRoomStateByRoomNo, updateRoom.ModelToJson()); var response = HttpHelper.JsonToModel(result.message); if (response.StatusCode != StatusCodeConstants.Success) { diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.Designer.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.Designer.cs index 788cc59..651b8fd 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.Designer.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.Designer.cs @@ -274,7 +274,7 @@ dgvSellthing.Font = new Font("Microsoft YaHei UI", 9F); dgvSellthing.Location = new Point(4, 88); dgvSellthing.Name = "dgvSellthing"; - dgvSellthing.Size = new Size(487, 362); + dgvSellthing.Size = new Size(487, 351); dgvSellthing.TabIndex = 131; dgvSellthing.CellClick += dgvSellthing_CellClick; // @@ -282,7 +282,7 @@ // btnPg.Current = 0; btnPg.Font = new Font("微软雅黑", 12F); - btnPg.Location = new Point(4, 456); + btnPg.Location = new Point(4, 448); btnPg.Name = "btnPg"; btnPg.PageSize = 15; btnPg.ShowSizeChanger = true; @@ -319,7 +319,7 @@ dgvRoomSell.Font = new Font("Microsoft YaHei UI", 9F); dgvRoomSell.Location = new Point(497, 217); dgvRoomSell.Name = "dgvRoomSell"; - dgvRoomSell.Size = new Size(572, 270); + dgvRoomSell.Size = new Size(572, 262); dgvRoomSell.TabIndex = 138; dgvRoomSell.CellClick += dgvRoomSell_CellClick; // @@ -327,7 +327,7 @@ // AutoScaleMode = AutoScaleMode.None; BackColor = Color.FromArgb(235, 243, 255); - ClientSize = new Size(1072, 494); + ClientSize = new Size(1072, 486); Controls.Add(dgvRoomSell); Controls.Add(btnCancel); Controls.Add(btnAdd); diff --git a/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.cs b/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.cs index fb6f396..c578595 100644 --- a/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.cs +++ b/EOM.TSHotelManagement.FormUI/AppFunction/FrmSellThing.cs @@ -53,9 +53,7 @@ namespace EOM.TSHotelManagement.FormUI #region 窗体加载事件 private void FrmSellThing_Load(object sender, EventArgs e) { - loadingProgress.Show(); LoadSellThingInfo(); - loadingProgress.Close(); } #endregion @@ -211,7 +209,11 @@ namespace EOM.TSHotelManagement.FormUI } #endregion - #region 添加消费事件 + /// + /// 添加消费事件 + /// + /// + /// private void btnAdd_Click(object sender, EventArgs e) { if (lblState.Visible == false) @@ -365,6 +367,8 @@ namespace EOM.TSHotelManagement.FormUI { var spend = new CreateSpendInputDto() { + ProductNumber = txtSellNo.Text.Trim(), + SpendNumber = new UniqueCode().GetNewId("SP-"), DataInsDate = DateTime.Now, DataInsUsr = LoginInfo.WorkerNo, RoomNumber = txtRoomNo.Text, @@ -399,17 +403,20 @@ namespace EOM.TSHotelManagement.FormUI RecordHelper.Record(LoginInfo.WorkerNo + "-" + LoginInfo.WorkerName + "在" + Convert.ToDateTime(DateTime.Now) + "位于" + LoginInfo.SoftwareVersion + "执行:" + "帮助" + spend.CustomerNumber + "进行了消费商品:" + txtSellName.Text + "操作!", 2); #endregion nudNum.Value = 0; - return; scope.Complete(); + return; } } } } } - #endregion - #region 撤回消费事件 + /// + /// 撤回消费事件 + /// + /// + /// private void btnCancel_Click(object sender, EventArgs e) { if (lblState.Visible == false) @@ -417,7 +424,7 @@ namespace EOM.TSHotelManagement.FormUI UIMessageBox.Show("请先输入消费的房间!", "提示信息", UIStyle.Red); return; } - if (dgvRoomSell.SelectedIndex > 0) + if (!spend.IsNullOrEmpty()) { if (spend.ProductName.Contains("居住")) { @@ -469,6 +476,12 @@ namespace EOM.TSHotelManagement.FormUI LoadSellThingInfo(); nudNum.Value = 0; scope.Complete(); + dgvRoomSell.SelectedIndex = 0; + spend = null; + txtSellNo.Text = string.Empty; + txtSellName.Text = string.Empty; + txtPrice.Text = string.Empty; + nudNum.Value = 0; } } else @@ -481,8 +494,7 @@ namespace EOM.TSHotelManagement.FormUI UIMessageBox.Show("请选择要删除的消费记录!", "提示信息", UIStyle.Red); } } - #endregion - + private void nudNum_ValueChanged(object sender, double value) { if (nudNum.Value < 0) @@ -569,14 +581,19 @@ namespace EOM.TSHotelManagement.FormUI { if (e.Record is IList data) { - spend = new ReadSpendOutputDto(); - spend.RoomNumber = helper.GetValue(data, nameof(ReadSpendOutputDto.RoomNumber)); - spend.CustomerNumber = helper.GetValue(data, nameof(ReadSpendOutputDto.CustomerNumber)); - spend.ProductName = helper.GetValue(data, nameof(ReadSpendOutputDto.ProductName)); - spend.ConsumptionQuantity = Convert.ToInt32(helper.GetValue(data, nameof(ReadSpendOutputDto.ConsumptionQuantity))); - spend.ProductPrice = Convert.ToDecimal(helper.GetValue(data, nameof(ReadSpendOutputDto.ProductPrice))); - spend.ConsumptionAmount = Convert.ToDecimal(helper.GetValue(data, nameof(ReadSpendOutputDto.ConsumptionAmount))); - spend.ConsumptionTime = Convert.ToDateTime(helper.GetValue(data, nameof(ReadSpendOutputDto.ConsumptionTime))); + spend = new ReadSpendOutputDto + { + ProductNumber = helper.GetValue(data, nameof(ReadSpendOutputDto.ProductNumber)), + SettlementStatus = helper.GetValue(data, nameof(ReadSpendOutputDto.SettlementStatus)), + SpendNumber = helper.GetValue(data, nameof(ReadSpendOutputDto.SpendNumber)), + RoomNumber = helper.GetValue(data, nameof(ReadSpendOutputDto.RoomNumber)), + CustomerNumber = helper.GetValue(data, nameof(ReadSpendOutputDto.CustomerNumber)), + ProductName = helper.GetValue(data, nameof(ReadSpendOutputDto.ProductName)), + ConsumptionQuantity = Convert.ToInt32(helper.GetValue(data, nameof(ReadSpendOutputDto.ConsumptionQuantity))), + ProductPrice = Convert.ToDecimal(helper.GetValue(data, nameof(ReadSpendOutputDto.ProductPrice))), + ConsumptionAmount = Convert.ToDecimal(helper.GetValue(data, nameof(ReadSpendOutputDto.ConsumptionAmount))), + ConsumptionTime = Convert.ToDateTime(helper.GetValue(data, nameof(ReadSpendOutputDto.ConsumptionTime))) + }; } } } diff --git a/EOM.TSHotelManagement.FormUI/AppInterface/FrmLogin.cs b/EOM.TSHotelManagement.FormUI/AppInterface/FrmLogin.cs index d8adb2e..dc30471 100644 --- a/EOM.TSHotelManagement.FormUI/AppInterface/FrmLogin.cs +++ b/EOM.TSHotelManagement.FormUI/AppInterface/FrmLogin.cs @@ -117,8 +117,8 @@ namespace EOM.TSHotelManagement.FormUI private void FrmLogin_Load(object sender, EventArgs e) { this.Owner.Hide(); - txtWorkerId.Text = "W7944015872"; - txtWorkerPwd.Text = "Vd;7p(97U_I9"; + txtWorkerId.Text = "W428989222912"; + txtWorkerPwd.Text = "U.aX]Wj}U4Aw"; } #endregion diff --git a/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.Designer.cs b/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.Designer.cs index 95870ed..330c317 100644 --- a/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.Designer.cs +++ b/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.Designer.cs @@ -244,7 +244,7 @@ lblScroll.Radius = 0; lblScroll.RectSides = ToolStripStatusLabelBorderSides.None; lblScroll.ScrollingType = Sunny.UI.UIScrollingText.UIScrollingType.LeftToRight; - lblScroll.Size = new Size(597, 33); + lblScroll.Size = new Size(739, 33); lblScroll.TabIndex = 0; // // tmrFont diff --git a/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.cs b/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.cs index de76777..2cc2f61 100644 --- a/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.cs +++ b/EOM.TSHotelManagement.FormUI/AppMain/FrmMain.cs @@ -240,7 +240,7 @@ namespace EOM.TSHotelManagement.FormUI case "客房管理": menuItem.Icon = Resources.picRoom_Image; break; - case "用户管理": + case "客户管理": menuItem.Icon = Resources.picCustomer_Image; break; case "商品消费": @@ -521,7 +521,6 @@ namespace EOM.TSHotelManagement.FormUI private void muNavBar_SelectChanged(object sender, MenuSelectEventArgs e) { - _loadingProgress.Show(); switch (e.Value.Text) { case "客房管理": @@ -533,7 +532,7 @@ namespace EOM.TSHotelManagement.FormUI pnlMID.Controls.Add(frmRoomManager); frmRoomManager.Show(); break; - case "用户管理": + case "客户管理": pnlMID.Controls.Clear(); FrmCustomerManager frmCustomerManager = new() { @@ -552,7 +551,6 @@ namespace EOM.TSHotelManagement.FormUI frmSellThing.Show(); break; } - _loadingProgress.Close(); } } diff --git a/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.Designer.cs b/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.Designer.cs index b56267c..8899f24 100644 --- a/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.Designer.cs +++ b/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.Designer.cs @@ -30,93 +30,93 @@ { components = new System.ComponentModel.Container(); btnRoom = new AntdUI.Button(); - cmsMain = new System.Windows.Forms.ContextMenuStrip(components); - tsmiReserRoom = new System.Windows.Forms.ToolStripMenuItem(); - tsmiCheckIn = new System.Windows.Forms.ToolStripMenuItem(); - tsmiCheckOut = new System.Windows.Forms.ToolStripMenuItem(); - tsmiChangeRoom = new System.Windows.Forms.ToolStripMenuItem(); - tsmiSelectUserInfo = new System.Windows.Forms.ToolStripMenuItem(); - tsmiChangeState = new System.Windows.Forms.ToolStripMenuItem(); + cmsMain = new ContextMenuStrip(components); + tsmiReserRoom = new ToolStripMenuItem(); + tsmiCheckIn = new ToolStripMenuItem(); + tsmiCheckOut = new ToolStripMenuItem(); + tsmiChangeRoom = new ToolStripMenuItem(); + tsmiSelectUserInfo = new ToolStripMenuItem(); + tsmiChangeState = new ToolStripMenuItem(); cmsMain.SuspendLayout(); SuspendLayout(); // // btnRoom // btnRoom.AutoEllipsis = true; - btnRoom.BackColor = System.Drawing.Color.Transparent; + btnRoom.BackColor = Color.Transparent; btnRoom.BackgroundImage = Properties.Resources.可住状态; btnRoom.BackgroundImageLayout = AntdUI.TFit.Cover; btnRoom.ContextMenuStrip = cmsMain; - btnRoom.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134); + btnRoom.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); btnRoom.Ghost = true; btnRoom.IconRatio = 0.5F; btnRoom.JoinLeft = true; btnRoom.JoinRight = true; - btnRoom.Location = new System.Drawing.Point(0, 0); + btnRoom.Location = new Point(0, 0); btnRoom.Name = "btnRoom"; btnRoom.Radius = 12; - btnRoom.Size = new System.Drawing.Size(122, 102); + btnRoom.Size = new Size(122, 102); btnRoom.TabIndex = 0; - btnRoom.Text = "总统套房\r\n\r\nBS001\r\n\r\n梁静茹"; + btnRoom.Text = "总统套房\r\n\r\nBS001\r\n\r\n小T呀"; btnRoom.Click += btnRoom_Click; // // cmsMain // - cmsMain.ImageScalingSize = new System.Drawing.Size(28, 28); - cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { tsmiReserRoom, tsmiCheckIn, tsmiCheckOut, tsmiChangeRoom, tsmiSelectUserInfo, tsmiChangeState }); + cmsMain.ImageScalingSize = new Size(28, 28); + cmsMain.Items.AddRange(new ToolStripItem[] { tsmiReserRoom, tsmiCheckIn, tsmiCheckOut, tsmiChangeRoom, tsmiSelectUserInfo, tsmiChangeState }); cmsMain.Name = "cmsMain"; - cmsMain.Size = new System.Drawing.Size(149, 136); + cmsMain.Size = new Size(149, 136); cmsMain.Opening += cmsMain_Opening; // // tsmiReserRoom // tsmiReserRoom.Name = "tsmiReserRoom"; - tsmiReserRoom.Size = new System.Drawing.Size(148, 22); + tsmiReserRoom.Size = new Size(148, 22); tsmiReserRoom.Text = "预约房间"; tsmiReserRoom.Click += tsmiReserRoom_Click; // // tsmiCheckIn // tsmiCheckIn.Name = "tsmiCheckIn"; - tsmiCheckIn.Size = new System.Drawing.Size(148, 22); + tsmiCheckIn.Size = new Size(148, 22); tsmiCheckIn.Text = "入住房间"; tsmiCheckIn.Click += tsmiCheckIn_Click; // // tsmiCheckOut // tsmiCheckOut.Name = "tsmiCheckOut"; - tsmiCheckOut.Size = new System.Drawing.Size(148, 22); + tsmiCheckOut.Size = new Size(148, 22); tsmiCheckOut.Text = "结算退房"; tsmiCheckOut.Click += tsmiCheckOut_Click; // // tsmiChangeRoom // tsmiChangeRoom.Name = "tsmiChangeRoom"; - tsmiChangeRoom.Size = new System.Drawing.Size(148, 22); + tsmiChangeRoom.Size = new Size(148, 22); tsmiChangeRoom.Text = "转换房间"; tsmiChangeRoom.Click += tsmiChangeRoom_Click; // // tsmiSelectUserInfo // tsmiSelectUserInfo.Name = "tsmiSelectUserInfo"; - tsmiSelectUserInfo.Size = new System.Drawing.Size(148, 22); + tsmiSelectUserInfo.Size = new Size(148, 22); tsmiSelectUserInfo.Text = "查看用户信息"; tsmiSelectUserInfo.Click += tsmiSelectUserInfo_Click; // // tsmiChangeState // tsmiChangeState.Name = "tsmiChangeState"; - tsmiChangeState.Size = new System.Drawing.Size(148, 22); + tsmiChangeState.Size = new Size(148, 22); tsmiChangeState.Text = "修改房间状态"; tsmiChangeState.Click += tsmiChangeState_Click; // // ucRoom // - AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); - AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + AutoScaleDimensions = new SizeF(7F, 17F); + AutoScaleMode = AutoScaleMode.Font; Controls.Add(btnRoom); Name = "ucRoom"; - Size = new System.Drawing.Size(122, 102); + Size = new Size(122, 102); Load += ucRoom_Load; cmsMain.ResumeLayout(false); ResumeLayout(false); diff --git a/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.cs b/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.cs index 27c3675..b03ad14 100644 --- a/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.cs +++ b/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.cs @@ -236,6 +236,15 @@ namespace EOM.TSHotelManagement.FormUI } r = response.Source; if (r.RoomStateId == (int)Common.Core.RoomState.Vacant) + { + tsmiCheckIn.Enabled = true; + tsmiCheckOut.Enabled = false; + tsmiSelectUserInfo.Enabled = false; + tsmiChangeState.Enabled = true; + tsmiChangeRoom.Enabled = false; + tsmiReserRoom.Enabled = true; + } + else if (r.RoomStateId == (int)Common.Core.RoomState.Occupied) { tsmiCheckIn.Enabled = false; tsmiCheckOut.Enabled = true; @@ -244,7 +253,7 @@ namespace EOM.TSHotelManagement.FormUI tsmiChangeRoom.Enabled = true; tsmiReserRoom.Enabled = false; } - else if (r.RoomStateId == (int)Common.Core.RoomState.Occupied || r.RoomStateId == (int)Common.Core.RoomState.Maintenance) + else if (r.RoomStateId == (int)Common.Core.RoomState.Dirty || r.RoomStateId == (int)Common.Core.RoomState.Maintenance) { tsmiCheckIn.Enabled = false; tsmiCheckOut.Enabled = false; @@ -253,15 +262,6 @@ namespace EOM.TSHotelManagement.FormUI tsmiChangeRoom.Enabled = false; tsmiReserRoom.Enabled = false; } - else if (r.RoomStateId == (int)Common.Core.RoomState.Dirty) - { - tsmiCheckIn.Enabled = true; - tsmiCheckOut.Enabled = false; - tsmiSelectUserInfo.Enabled = false; - tsmiChangeState.Enabled = true; - tsmiChangeRoom.Enabled = false; - tsmiReserRoom.Enabled = false; - } else { tsmiCheckIn.Enabled = true; @@ -269,7 +269,7 @@ namespace EOM.TSHotelManagement.FormUI tsmiSelectUserInfo.Enabled = false; tsmiChangeState.Enabled = true; tsmiChangeRoom.Enabled = false; - tsmiReserRoom.Enabled = true; + tsmiReserRoom.Enabled = false; } } @@ -307,7 +307,6 @@ namespace EOM.TSHotelManagement.FormUI private void tsmiCheckOut_Click(object sender, EventArgs e) { - _loadingProgress.Show(); rm_CustoNo = romRoomInfo.CustomerNumber; rm_RoomNo = romRoomInfo.RoomNumber; rm_RoomType = romRoomInfo.RoomName; diff --git a/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.resx b/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.resx index 59c2369..98b3243 100644 --- a/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.resx +++ b/EOM.TSHotelManagement.FormUI/AppUserControls/ucRoom.resx @@ -1,7 +1,7 @@