diff --git a/SYS.Core/Repository.cs b/SYS.Core/Repository.cs deleted file mode 100644 index 4e3c66acd80ea984b741a7662261a09eff349421..0000000000000000000000000000000000000000 --- a/SYS.Core/Repository.cs +++ /dev/null @@ -1,121 +0,0 @@ -using MySql.Data.MySqlClient; -using NPOI.SS.Formula.Functions; -using System; -using System.Collections.Generic; -using System.Data; -using System.Data.Common; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Common -{ - public class Repository:IRepository - { - private static string conStr = "Server=134.175.239.108;Database=tshoteldb;Uid=root;Pwd=yjj0720.;"; - - private static MySqlConnection con = null; - - public static MySqlConnection GetConnection() - { - if (con == null || con.ConnectionString == "") - { - con = new MySqlConnection(conStr); - } - return con; - } - - public static void Opencon() - { - if (con.State == ConnectionState.Closed) - { - con.Open(); - } - } - - public static void Closecon() - { - if (con.State == ConnectionState.Open) - { - con.Close(); - } - } - - public int ExecuteSql(string sql, params DbParameter[] pars) - { - return 0; - } - - public List ExecuteQuery(string sql, params DbParameter[] pars) - { - return List; - } - - public int Add(T entity, bool isLog = true) - { - return 0; - } - - public int Add(IEnumerable entities, bool isLog = true) - { - return 0; - - } - - public int Delete(T entity, bool isLog = true) - { - return 0; - } - - public int Delete(IEnumerable entities, bool isLog = true) - { - return 0; - } - - public int Delete(Expression> where, bool isLog = true) - { - return 0; - } - - public int Update(T entity, bool isLog = true) - { - return 0; - } - - public int Update(T entity, List>> ignoreProperties, bool isLog = true) - { - return 0; - } - - public int Update(T entity, Expression> where, List proNames, bool isLog = true) - { - return 0; - } - - public int Update(T entity, Expression> where, List>> proNames, bool isLog = true) - { - return 0; - } - - public int Update(Expression> where, Action action, bool isLog = true) - { - return 0; - } - - public T GetOne(Expression> where) - { - return 0; - } - - public List GetList(Expression> where = null) - { - - } - - int GetCount(Expression> where = null) - { - - } - } -} diff --git a/SYS.Core/Repository/Repository.cs b/SYS.Core/Repository/Repository.cs new file mode 100644 index 0000000000000000000000000000000000000000..046bb4fd856135a5913490321c45beeae7b8b26d --- /dev/null +++ b/SYS.Core/Repository/Repository.cs @@ -0,0 +1,33 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SYS.Common +{ + public class Repository : SimpleClient where T : class, new() + { + public Repository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null + { + if (context == null) + { + base.Context = new SqlSugarClient(new ConnectionConfig() + { + DbType = SqlSugar.DbType.MySql, + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true, + ConnectionString = ConfigurationManager.AppSettings["strSQL"].ToString() + }); + + base.Context.Aop.OnLogExecuting = (s, p) => + { + Console.WriteLine(s); + }; + } + } + + } +} diff --git a/SYS.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SYS.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 5023b7eb855c3e35a5232a060f54d9f0b8753595..f08b773bf72a251b2090cd5e1445fc296e4bd585 100644 Binary files a/SYS.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/SYS.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/SYS.FormUI/AppFunction/FrmAddRoom.cs b/SYS.FormUI/AppFunction/FrmAddRoom.cs index 62c7b12c95bfa6081df0619cc5d94b54fede2a28..c9a6d142961b2434ffe582771f991adf3778bb79 100644 --- a/SYS.FormUI/AppFunction/FrmAddRoom.cs +++ b/SYS.FormUI/AppFunction/FrmAddRoom.cs @@ -56,7 +56,7 @@ namespace SYS.FormUI datains_date = DateTime.Now }; new RoomService().InsertRoom(rn); - MessageBox.Show("添加房间成功!"); + UIMessageBox.Show("添加房间成功!"); LoadRoom(); #region 获取添加操作日志所需的信息 OperationLog o = new OperationLog(); @@ -70,7 +70,7 @@ namespace SYS.FormUI } else { - MessageBox.Show("房间信息不完整,请重试!"); + UIMessageBox.Show("房间信息不完整,请重试!"); } } @@ -139,7 +139,7 @@ namespace SYS.FormUI { if (CheckRoomExists(txtRoomNo.Text)) { - MessageBox.Show("该房间已存在,无法进行添加操作"); + UIMessageBox.Show("该房间已存在,无法进行添加操作"); return; } } diff --git a/SYS.FormUI/AppFunction/FrmAddWorker.cs b/SYS.FormUI/AppFunction/FrmAddWorker.cs index bfb29a5c2a58dc402b55dc329cfef96878105b9c..623d79e0765785d4f0a97823908a2c963f44b1b0 100644 --- a/SYS.FormUI/AppFunction/FrmAddWorker.cs +++ b/SYS.FormUI/AppFunction/FrmAddWorker.cs @@ -365,7 +365,7 @@ namespace SYS.FormUI if (string.IsNullOrEmpty(identityCard)) { //身份证号码不能为空,如果为空返回 - MessageBox.Show("身份证号码不能为空!"); + UIMessageBox.ShowWarning("身份证号码不能为空!"); if (WorkerID.CanFocus) { WorkerID.Focus();//设置当前输入焦点为txtCardID_identityCard @@ -378,7 +378,7 @@ namespace SYS.FormUI //身份证号码只能为15位或18位其它不合法 if (identityCard.Length != 15 && identityCard.Length != 18) { - MessageBox.Show("身份证号码为15位或18位,请检查!"); + UIMessageBox.ShowWarning("身份证号码为15位或18位,请检查!"); if (WorkerID.CanFocus) { WorkerID.Focus(); @@ -412,7 +412,7 @@ namespace SYS.FormUI } catch { - MessageBox.Show("请正确输入证件号码!"); + UIMessageBox.ShowError("请正确输入证件号码!"); return; } diff --git a/SYS.FormUI/AppFunction/FrmChangePosition.cs b/SYS.FormUI/AppFunction/FrmChangePosition.cs index e8e5878cdbeb32e6276c446f59b59bcc7b230b3e..376c4a1ee99ed6e2321fedfd061bbb92d17da910 100644 --- a/SYS.FormUI/AppFunction/FrmChangePosition.cs +++ b/SYS.FormUI/AppFunction/FrmChangePosition.cs @@ -83,7 +83,7 @@ namespace SYS.FormUI bool n = new WorkerService().UpdateWorkerPositionAndClub(worker); if (n == true) { - MessageBox.Show("任命已生效!"); + UIMessageBox.ShowSuccess("任命已生效!"); #region 获取添加操作日志所需的信息 OperationLog o = new OperationLog(); o.OperationTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd,HH:mm:ss")); diff --git a/SYS.FormUI/AppFunction/FrmChangeRoom.cs b/SYS.FormUI/AppFunction/FrmChangeRoom.cs index 5732cba01d95b339c7546ed1470ab7a60febc2b3..c19d9a109d8bef4d92c8689be694709c1ed5fbf2 100644 --- a/SYS.FormUI/AppFunction/FrmChangeRoom.cs +++ b/SYS.FormUI/AppFunction/FrmChangeRoom.cs @@ -116,7 +116,7 @@ namespace SYS.FormUI } if (result1 == true && result2 == true) { - MessageBox.Show("转房成功"); + UIMessageBox.ShowSuccess("转房成功"); bool m = new SpendService().InsertSpendInfo(s); FrmRoomManager.Reload(); #region 获取添加操作日志所需的信息 @@ -133,7 +133,7 @@ namespace SYS.FormUI } else { - MessageBox.Show("转房失败"); + UIMessageBox.ShowError("转房失败"); } } diff --git a/SYS.FormUI/AppFunction/FrmCheckIn.cs b/SYS.FormUI/AppFunction/FrmCheckIn.cs index a206d91995a0489253d20082252a4637d0ead6bd..ef532fba571e1a343363e13715d9109f8bafa609 100644 --- a/SYS.FormUI/AppFunction/FrmCheckIn.cs +++ b/SYS.FormUI/AppFunction/FrmCheckIn.cs @@ -91,7 +91,7 @@ namespace SYS.FormUI { if (txtCustoNo.Text == "") { - MessageBox.Show("请输入客户编号!", "来自小T的提示"); + UIMessageBox.Show("请输入客户编号!", "来自小T的提示",UIStyle.Orange); txtCustoNo.Focus(); return false; } @@ -122,7 +122,7 @@ namespace SYS.FormUI bool n = new RoomService().UpdateRoomInfo(r); if (n == true) { - MessageBox.Show("登记入住成功!", "登记提示"); + UIMessageBox.Show("登记入住成功!", "登记提示",UIStyle.Green); txtCustoNo.Text = ""; FrmRoomManager.Reload(); #region 获取添加操作日志所需的信息 @@ -136,16 +136,18 @@ namespace SYS.FormUI new OperationlogService().InsertOperationLog(o); scope.Complete(); this.Close(); + return; } else { - MessageBox.Show("登记入住失败!", "登记提示"); + UIMessageBox.Show("登记入住失败!", "登记提示",UIStyle.Red); + return; } } } else { - MessageBox.Show("客户编号不存在!", "来自小T的提示"); + UIMessageBox.Show("客户编号不存在!", "来自小T的提示",UIStyle.Red); } } } diff --git a/SYS.FormUI/AppFunction/FrmCheckOutForm.cs b/SYS.FormUI/AppFunction/FrmCheckOutForm.cs index 459cea878be2dc8aaf3e1aeaa0611fd79a8e90da..5a0fb068b83bed8085540deebc7f9d780d1f7e37 100644 --- a/SYS.FormUI/AppFunction/FrmCheckOutForm.cs +++ b/SYS.FormUI/AppFunction/FrmCheckOutForm.cs @@ -273,10 +273,10 @@ namespace SYS.FormUI } catch { - MessageBox.Show("非法输入,请重新输入!", "系统提示", - MessageBoxButtons.OK, MessageBoxIcon.Error); + UIMessageBox.Show("非法输入,请重新输入!", "系统提示",UIStyle.Orange); txtReceipts.Clear(); txtReceipts.Focus(); + return; } } else @@ -306,7 +306,7 @@ namespace SYS.FormUI { return; } - MessageBox.Show("结算成功!", "系统提示"); + UIMessageBox.Show("结算成功!", "系统提示",UIStyle.Green); FrmRoomManager.Reload(); #region 获取添加操作日志所需的信息 @@ -333,7 +333,7 @@ namespace SYS.FormUI { return; } - MessageBox.Show("结算成功!", "系统提示"); + UIMessageBox.Show("结算成功!", "系统提示",UIStyle.Green); FrmRoomManager.Reload(); #region 获取添加操作日志所需的信息 OperationLog o = new OperationLog(); @@ -344,16 +344,19 @@ namespace SYS.FormUI o.datains_date = DateTime.Now; #endregion new OperationlogService().InsertOperationLog(o); + return; } else { - MessageBox.Show("结算失败!", "系统提示"); + UIMessageBox.Show("结算失败!", "系统提示", UIStyle.Red); + return; } } } else { - MessageBox.Show("实收金额不能为空!", "系统提示"); + UIMessageBox.Show("实收金额不能为空!", "系统提示", UIStyle.Orange); + return; } } #endregion diff --git a/SYS.FormUI/AppFunction/FrmCustoManager.cs b/SYS.FormUI/AppFunction/FrmCustoManager.cs index f6c5269706abf6253326924644988fe2b88bc81a..a89e9cc795b7c7f8291fd2d8c6b24894aced5f0a 100644 --- a/SYS.FormUI/AppFunction/FrmCustoManager.cs +++ b/SYS.FormUI/AppFunction/FrmCustoManager.cs @@ -103,7 +103,7 @@ namespace SYS.FormUI { if (dgvCustomerList.SelectedRows.Count < 0) { - UIMessageBox.Show("未选中客户,无法继续操作!", "系统提示", UIStyle.Orange, UIMessageBoxButtons.OK); + UIMessageBox.Show("未选中客户,无法继续操作!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; } cm_CustoNo = dgvCustomerList.SelectedRows[0].Cells["CustoNo"].Value.ToString(); @@ -133,8 +133,8 @@ namespace SYS.FormUI private void picLoadOut_Click_1(object sender, EventArgs e) { #region 导出信息保存为Excel表 - DialogResult ret = MessageBox.Show("导出信息为敏感操作,确定要继续导出吗?(此步操作将写入操作日志)", "信息提醒", MessageBoxButtons.YesNo); - if (ret == DialogResult.Yes) + bool tf = UIMessageBox.Show("导出信息为敏感操作,确定要继续导出吗?(此步操作将写入操作日志)", "信息提醒",UIStyle.Orange,UIMessageBoxButtons.OKCancel); + if (!tf) { //Response.ContentEncoding = System.Text.Encoding.UTF8; @@ -151,7 +151,7 @@ namespace SYS.FormUI Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { - UIMessageBox.Show("无法创建Excel对象,您的电脑可能未安装Excel!", "来自T仔的提醒"); + UIMessageBox.Show("无法创建Excel对象,您的电脑可能未安装Excel!", "来自T仔的提醒",UIStyle.Red); return; } Microsoft.Office.Interop.Excel.Workbooks workbooks = xlApp.Workbooks; @@ -170,7 +170,7 @@ namespace SYS.FormUI } System.Windows.Forms.Application.DoEvents(); worksheet.Columns.EntireColumn.AutoFit();//列宽自适应 - MessageBox.Show(fileName + "信息导出成功", "来自T仔提示", MessageBoxButtons.OK); + UIMessageBox.Show(fileName + "信息导出成功", "来自T仔提示",UIStyle.Green, UIMessageBoxButtons.OK); #region 获取添加操作日志所需的信息 OperationLog o = new OperationLog(); o.OperationTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd,HH:mm:ss")); @@ -190,7 +190,8 @@ namespace SYS.FormUI } catch (Exception ex) {//fileSaved = false; - MessageBox.Show("导出文件时出错,文件可能正被打开!\n" + ex.Message); + UIMessageBox.Show("导出文件时出错,文件可能正被打开!\n" + ex.Message); + return; } } xlApp.Quit(); diff --git a/SYS.FormUI/AppFunction/FrmCustomerManager.cs b/SYS.FormUI/AppFunction/FrmCustomerManager.cs index 88f67e704bf7bdd27899d95be583c403a240b21e..3cfaa705564c5602d66c5fe9ac58bdeefc611145 100644 --- a/SYS.FormUI/AppFunction/FrmCustomerManager.cs +++ b/SYS.FormUI/AppFunction/FrmCustomerManager.cs @@ -30,6 +30,7 @@ using SYS.FormUI.Properties; using System.Collections.Generic; using System.Linq; using SYS.Application; +using Sunny.UI; namespace SYS.FormUI { @@ -105,10 +106,9 @@ namespace SYS.FormUI private void picLoadOut_Click(object sender, EventArgs e) { #region 导出信息保存为Excel表 - DialogResult ret = MessageBox.Show("导出信息为敏感操作,确定要继续导出吗?(此步操作将写入操作日志)", "信息提醒", MessageBoxButtons.YesNo); - if (ret == DialogResult.Yes) + bool ret = UIMessageBox.Show("导出信息为敏感操作,确定要继续导出吗?(此步操作将写入操作日志)", "信息提醒",UIStyle.Orange, UIMessageBoxButtons.OKCancel); + if (!ret) { - //Response.ContentEncoding = System.Text.Encoding.UTF8; string fileName = ""; string saveFileName = ""; @@ -123,7 +123,7 @@ namespace SYS.FormUI Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { - MessageBox.Show("无法创建Excel对象,您的电脑可能未安装Excel!", "来自T仔的提醒"); + UIMessageBox.Show("无法创建Excel对象,您的电脑可能未安装Excel!", "来自T仔的提醒",UIStyle.Red); return; } Microsoft.Office.Interop.Excel.Workbooks workbooks = xlApp.Workbooks; @@ -142,7 +142,7 @@ namespace SYS.FormUI } System.Windows.Forms.Application.DoEvents(); worksheet.Columns.EntireColumn.AutoFit();//列宽自适应 - MessageBox.Show(fileName + "信息导出成功", "来自T仔提示", MessageBoxButtons.OK); + UIMessageBox.Show(fileName + "信息导出成功", "来自T仔提示",UIStyle.Green, UIMessageBoxButtons.OKCancel); #region 获取添加操作日志所需的信息 OperationLog o = new OperationLog(); o.OperationTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd,HH:mm:ss")); @@ -162,7 +162,7 @@ namespace SYS.FormUI } catch (Exception ex) {//fileSaved = false; - MessageBox.Show("导出文件时出错,文件可能正被打开!\n" + ex.Message); + UIMessageBox.Show("导出文件时出错,文件可能正被打开!\n" + ex.Message,"系统提示",UIStyle.Red); } } xlApp.Quit(); @@ -184,7 +184,7 @@ namespace SYS.FormUI } else { - MessageBox.Show("请输入客户编号!"); + UIMessageBox.ShowWarning("请输入客户编号!"); } } diff --git a/SYS.FormUI/AppFunction/FrmGoodOrBad.cs b/SYS.FormUI/AppFunction/FrmGoodOrBad.cs index 8347596e5fc5c8ec2266694b542ae7a904296d6e..5a9d3e0a95388d2072d724ceaa6989d738152bef 100644 --- a/SYS.FormUI/AppFunction/FrmGoodOrBad.cs +++ b/SYS.FormUI/AppFunction/FrmGoodOrBad.cs @@ -96,11 +96,9 @@ namespace SYS.FormUI }; if (CheckInput(goodBad)) { - DialogResult dr = MessageBox.Show("确定录入?一旦录入后将无法修改及删除,或会影响员工的晋升!", "录入警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); - if (dr == DialogResult.Yes) + bool dr = UIMessageBox.Show("确定录入?一旦录入后将无法修改及删除,或会影响员工的晋升!", "录入警告",UIStyle.Orange, UIMessageBoxButtons.OKCancel); + if (!dr) { - - bool n = new WorkerGoodBadService().AddGoodBad(goodBad); if (n == true) { diff --git a/SYS.FormUI/AppFunction/FrmInputs.cs b/SYS.FormUI/AppFunction/FrmInputs.cs index 2fd952e6f6a30bba0e5f339c6ba63db1fd2766c2..96b434fb3a046a18a0dfcddb03759ab3ca7fcbc5 100644 --- a/SYS.FormUI/AppFunction/FrmInputs.cs +++ b/SYS.FormUI/AppFunction/FrmInputs.cs @@ -293,7 +293,7 @@ namespace SYS.FormUI if (string.IsNullOrEmpty(identityCard)) { //身份证号码不能为空,如果为空返回 - MessageBox.Show("身份证号码不能为空!"); + UIMessageBox.ShowError("身份证号码不能为空!"); if (txtCardID.CanFocus) { txtCardID.Focus();//设置当前输入焦点为txtCardID_identityCard @@ -305,7 +305,7 @@ namespace SYS.FormUI //身份证号码只能为15位或18位其它不合法 if (identityCard.Length != 15 && identityCard.Length != 18) { - MessageBox.Show("身份证号码为15位或18位,请检查!"); + UIMessageBox.ShowWarning("身份证号码为15位或18位,请检查!"); if (txtCardID.CanFocus) { txtCardID.Focus(); @@ -338,7 +338,7 @@ namespace SYS.FormUI } catch { - MessageBox.Show("请正确输入证件号码!"); + UIMessageBox.ShowError("请正确输入证件号码!"); } cbPassportType.SelectedIndex = 0; diff --git a/SYS.FormUI/AppFunction/FrmReserList.cs b/SYS.FormUI/AppFunction/FrmReserList.cs index 3bc1d4c4f818124474db3e0e694979903972ea17..e6334f49fe4d50e309b8782a8b8e6d914055e739 100644 --- a/SYS.FormUI/AppFunction/FrmReserList.cs +++ b/SYS.FormUI/AppFunction/FrmReserList.cs @@ -93,6 +93,8 @@ namespace SYS.FormUI UIMessageBox.ShowSuccess("操作成功"); dgvReserList.AutoGenerateColumns = false; dgvReserList.DataSource = new ReserService().SelectReserAll(); + FrmRoomManager.Reload(); + this.Close(); } diff --git a/SYS.FormUI/AppFunction/FrmRoomStateManager.cs b/SYS.FormUI/AppFunction/FrmRoomStateManager.cs index 2fdab1d9bdfd7d95756591d06208870766aa67c3..4fcbfdb4d978578abd0d6f07958f83f2efdf178f 100644 --- a/SYS.FormUI/AppFunction/FrmRoomStateManager.cs +++ b/SYS.FormUI/AppFunction/FrmRoomStateManager.cs @@ -57,18 +57,18 @@ namespace SYS.FormUI { if (new RoomService().UpdateRoomStateByRoomNo(txtRoomNo.Text, cboState.SelectedIndex) == true) { - UIMessageBox.Show("房间" + txtRoomNo.Text + "成功修改为" + cboState.Text, "修改提示"); + UIMessageBox.Show("房间" + txtRoomNo.Text + "成功修改为" + cboState.Text, "修改提示",UIStyle.Green); FrmRoomManager.Reload(); this.Close(); } else { - UIMessageBox.Show("修改失败", "来自小T的提示"); + UIMessageBox.Show("修改失败", "来自小T的提示",UIStyle.Red); } } else { - MessageBox.Show("不能设置已住状态", "来自小T的提示"); + UIMessageBox.Show("不能设置已住状态", "来自小T的提示",UIStyle.Orange); } } #endregion diff --git a/SYS.FormUI/AppFunction/FrmSellThing.cs b/SYS.FormUI/AppFunction/FrmSellThing.cs index 4e6e42941c38c86c54a604ed0f1339531faebb2b..6b4ecc535b9b1edc903884118dc7015fddb030d0 100644 --- a/SYS.FormUI/AppFunction/FrmSellThing.cs +++ b/SYS.FormUI/AppFunction/FrmSellThing.cs @@ -110,31 +110,31 @@ namespace SYS.FormUI { if (txtRoomNo.Text == "") { - MessageBox.Show("消费房间不能为空", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); + UIMessageBox.Show("消费房间不能为空", "提示信息",UIStyle.Red, UIMessageBoxButtons.OKCancel); txtRoomNo.Focus(); return false; } if (txtSellNo.Text == "") { - MessageBox.Show("商品编号不能为空", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); + UIMessageBox.Show("商品编号不能为空", "提示信息", UIStyle.Red, UIMessageBoxButtons.OKCancel); txtSellNo.Focus(); return false; } if (txtSellName.Text == "") { - MessageBox.Show("商品名称不能为空", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); + UIMessageBox.Show("商品名称不能为空", "提示信息", UIStyle.Red, UIMessageBoxButtons.OKCancel); txtSellName.Focus(); return false; } if (txtPrice.Text == "") { - MessageBox.Show("商品单价不能为空", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); + UIMessageBox.Show("商品单价不能为空", "提示信息", UIStyle.Red, UIMessageBoxButtons.OKCancel); txtPrice.Focus(); return false; } if (nudNum.Value <= 0) { - MessageBox.Show("数量不能小于0", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); + UIMessageBox.Show("数量不能小于0", "提示信息", UIStyle.Red, UIMessageBoxButtons.OKCancel); txtPrice.Focus(); return false; } @@ -183,7 +183,7 @@ namespace SYS.FormUI } else { - MessageBox.Show("添加失败"); + UIMessageBox.ShowError("添加失败"); } } } @@ -220,7 +220,7 @@ namespace SYS.FormUI } else { - MessageBox.Show("请选择要删除的消费记录!", "提示信息"); + UIMessageBox.Show("请选择要删除的消费记录!", "提示信息",UIStyle.Red); } } #endregion diff --git a/SYS.FormUI/AppFunction/FrmUnLockSystem.cs b/SYS.FormUI/AppFunction/FrmUnLockSystem.cs index 0f45b7b7019a2850f9d1d5daa81d90761470b0cb..494d905c44f027692e9edd5b64c7d05344e43332 100644 --- a/SYS.FormUI/AppFunction/FrmUnLockSystem.cs +++ b/SYS.FormUI/AppFunction/FrmUnLockSystem.cs @@ -76,7 +76,7 @@ namespace SYS.FormUI { if (account.AdminPassword != txtUnLockPwd.Text.Trim()) { - MessageBox.Show("密码错误! 请输入当前超管密码解锁!"); + UIMessageBox.ShowError("密码错误! 请输入当前超管密码解锁!"); txtUnLockPwd.Text = ""; txtUnLockPwd.Focus(); return; @@ -160,7 +160,7 @@ namespace SYS.FormUI { if (e.KeyCode == Keys.F4 && e.Modifiers == Keys.Alt) { - MessageBox.Show("请输入解锁密码!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); + UIMessageBox.Show("请输入解锁密码!", "错误",UIStyle.Red, UIMessageBoxButtons.OK); e.Handled = true; } } diff --git a/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs b/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs index fc754694875a5ce727ac65af35e80b14a2a8cf9b..fd279a912d5df5f344f209c5077119a6a4b0e6e6 100644 --- a/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs +++ b/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs @@ -77,7 +77,7 @@ namespace SYS.FormUI } bool n = new NoticeService().InsertNotice(notice); - MessageBox.Show("上传成功!"); + UIMessageBox.ShowSuccess("上传成功!"); #region 获取添加操作日志所需的信息 OperationLog o = new OperationLog(); o.OperationTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd,HH:mm:ss")); diff --git a/SYS.FormUI/AppInterface/FrmLogin.cs b/SYS.FormUI/AppInterface/FrmLogin.cs index a8d38800251b27d5f9fbbac1a5aec2a143f1b2db..c1278a10221de2c63d823fe528a39fdd2a75130d 100644 --- a/SYS.FormUI/AppInterface/FrmLogin.cs +++ b/SYS.FormUI/AppInterface/FrmLogin.cs @@ -166,13 +166,13 @@ namespace SYS.FormUI { if (txtWorkerId.Text == "") { - MessageBox.Show("请输入员工编号!", "输入提示"); + UIMessageBox.Show("请输入员工编号!", "输入提示",UIStyle.Red); txtWorkerId.Focus(); return false; } if (txtWorkerPwd.Text == "") { - MessageBox.Show("请输入员工密码!", "输入提示"); + UIMessageBox.Show("请输入员工密码!", "输入提示", UIStyle.Red); txtWorkerPwd.Focus(); return false; } @@ -218,13 +218,13 @@ namespace SYS.FormUI } else { - MessageBox.Show("密码错误!", "来自小T提示"); + UIMessageBox.Show("密码错误!", "来自小T提示", UIStyle.Red); txtWorkerPwd.Focus();//聚焦 } } else { - MessageBox.Show("该员工编号不存在!", "来自小T提示"); + UIMessageBox.Show("该员工编号不存在!", "来自小T提示", UIStyle.Red); txtWorkerId.Focus();//聚焦 } } @@ -232,7 +232,7 @@ namespace SYS.FormUI catch(Exception ex) { Console.WriteLine(ex); - MessageBox.Show("请连接好数据库!", "温馨提示"); + UIMessageBox.Show("请连接好数据库!", "温馨提示", UIStyle.Red); } } #endregion diff --git a/SYS.FormUI/AppMain/FrmBackgroundSystem.cs b/SYS.FormUI/AppMain/FrmBackgroundSystem.cs index 607e0d0a809a14a259b1171f85d289873cdc12b4..3d844c0fa70d999b32cc61463f342cfd9c6bc86d 100644 --- a/SYS.FormUI/AppMain/FrmBackgroundSystem.cs +++ b/SYS.FormUI/AppMain/FrmBackgroundSystem.cs @@ -268,10 +268,9 @@ namespace SYS.FormUI private void btnLocked_Click(object sender, EventArgs e) { - if (MessageBox.Show("确定要锁定屏幕吗?锁定后不能做任何操作!", "锁屏", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) - { + bool tf = UIMessageBox.Show("确定要锁定屏幕吗?锁定后不能做任何操作!", "锁屏", UIStyle.Orange, UIMessageBoxButtons.OKCancel); + if(!tf) new FrmUnLockSystem().ShowDialog(); - } } private void timer1_Tick(object sender, EventArgs e) diff --git a/SYS.FormUI/AppUserControls/ucRoomList.cs b/SYS.FormUI/AppUserControls/ucRoomList.cs index 1906e32d136902c683ce55422d7a75db2f717dbb..31a1bdf7414dc36402ca3ccf8ce96336bf4f5dde 100644 --- a/SYS.FormUI/AppUserControls/ucRoomList.cs +++ b/SYS.FormUI/AppUserControls/ucRoomList.cs @@ -362,7 +362,8 @@ namespace SYS.FormUI public static string RoomState; private void tsmiChangeRoom_Click(object sender, EventArgs e) { - if (MessageBox.Show("确定要进行转房吗?", "来自小T的提醒", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) + bool tf = UIMessageBox.Show("确定要进行转房吗?", "来自小T的提醒", UIStyle.Orange, UIMessageBoxButtons.OKCancel); + if (!tf) { RoomNo = lblRoomNo.Text; CustoNo = lblCustoNo.Text; diff --git a/SYS.FormUI/Properties/AssemblyInfo.cs b/SYS.FormUI/Properties/AssemblyInfo.cs index a0a51473542cb2c3733a64ffd29b85f451f3ac21..a30e9fa7392e635f73931c803d95be9def216ef5 100644 --- a/SYS.FormUI/Properties/AssemblyInfo.cs +++ b/SYS.FormUI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] +[assembly: AssemblyVersion("1.5.0.1")] +[assembly: AssemblyFileVersion("1.5.0.1")] diff --git a/SYS.FormUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/SYS.FormUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache index ee5ac63bf1b1a4ee2e9b38f3df33641c8a97fc54..48f6fb0363319e419c94822376c87d0f950cea66 100644 Binary files a/SYS.FormUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/SYS.FormUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ