From c966a5690c80b1ec425ee94d1637cc60de243ebd Mon Sep 17 00:00:00 2001 From: qian Date: Fri, 8 Dec 2023 17:15:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E6=B1=BD=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?=E5=8F=8A=E5=A4=9A=E8=AF=AD=E8=A8=80=E8=8F=9C=E5=8D=95=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/Controller/SCP_ASK_CONTROLLER.cs | 16 +- 北京北汽/Controller/SCP_ASN_CONTROLLER.cs | 6 +- 北京北汽/Models/ScpCache.cs | 11 +- 北京北汽/Models/ScpEntity/TA_LANGUAGE.cs | 10 +- 北京北汽/SCP/Admin/profile.aspx | 11 +- 北京北汽/SCP/Admin/profile.aspx.cs | 32 +++- 北京北汽/SCP/Business/PageBase.cs | 73 ++++++++- 北京北汽/SCP/SCP.csproj | 16 ++ .../SCP/Views/BasicData/SCP_LANGUAGE_1.aspx | 80 +++++++++ .../Views/BasicData/SCP_LANGUAGE_1.aspx.cs | 103 ++++++++++++ .../BasicData/SCP_LANGUAGE_1.aspx.designer.cs | 152 ++++++++++++++++++ .../Views/BasicData/SCP_LANGUAGE_DETAIL.aspx | 43 +++++ .../BasicData/SCP_LANGUAGE_DETAIL.aspx.cs | 108 +++++++++++++ .../SCP_LANGUAGE_DETAIL.aspx.designer.cs | 134 +++++++++++++++ .../ExChangeCenter/EC_CONTROLLER.aspx.cs | 2 +- .../Views/PlanData/SCP_INCOMPLETE_ASK.aspx | 4 +- .../SCP/Views/PlanData/SCP_PO_CQ.aspx.cs | 2 +- .../SCP/Views/SupplierData/SCP_ARRIVE.aspx | 2 +- .../SCP/Views/SupplierData/SCP_ARRIVE.aspx.cs | 8 +- .../SCP/Views/SupplierData/SCP_ASK.aspx | 2 + .../SCP/Views/SupplierData/SCP_ASK.aspx.cs | 16 +- .../SupplierData/SCP_ASK.aspx.designer.cs | 87 +++++----- .../Views/SupplierData/SCP_ASK_DETAIL.aspx.cs | 2 +- .../SCP/Views/SupplierData/SCP_ASN.aspx | 2 +- .../SCP/Views/SupplierData/SCP_ASN.aspx.cs | 3 +- .../Views/SupplierData/SCP_ASN_CREATE.aspx.cs | 11 +- .../Views/SupplierData/SCP_ASN_DETAIL.aspx | 18 ++- .../Views/SupplierData/SCP_ASN_DETAIL.aspx.cs | 41 ++++- .../SCP_ASN_DETAIL.aspx.designer.cs | 116 ++++++++----- .../Views/SupplierData/SCP_INVOICE.aspx.cs | 5 +- .../SupplierData/SCP_INVOICE_CREATE.aspx.cs | 8 +- .../Views/SupplierData/SCP_INVOICE_EDIT.aspx | 11 +- .../SupplierData/SCP_INVOICE_EDIT.aspx.cs | 76 +++++++-- .../SCP_INVOICE_EDIT.aspx.designer.cs | 45 ++++++ .../Views/SupplierData/SCP_RECEIVE_LIST.aspx | 4 +- .../SupplierData/SCP_RECEIVE_LIST.aspx.cs | 12 +- .../SCP_RECEIVE_LIST.aspx.designer.cs | 117 +++++++------- 北京北汽/SCP/default_hb.aspx.cs | 6 +- 北京北汽/Utils/ExcelHelper.cs | 2 +- 39 files changed, 1162 insertions(+), 235 deletions(-) create mode 100644 北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx create mode 100644 北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs create mode 100644 北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs create mode 100644 北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx create mode 100644 北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs create mode 100644 北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs diff --git a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs index 08fbb4c..71051bd 100644 --- a/北京北汽/Controller/SCP_ASK_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASK_CONTROLLER.cs @@ -1859,7 +1859,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是发布状态记录!"; + _ret.Message = "选择的记录,有不是发布状态记录!"; } } if (p_state == AskState.New) @@ -1891,7 +1891,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是发布状态记录!"; + _ret.Message = "选择的记录,有不是发布状态记录!"; } } if (p_state == AskState.Release) @@ -1934,7 +1934,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是新建状态记录!"; + _ret.Message = "选择的记录,有不是发布状态记录!"; } } if (p_state == AskState.Reject) @@ -1967,7 +1967,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + _ret.Message = "选择的记录,有不是发布状态记录!"; } } @@ -2029,7 +2029,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是【已确认】或【已发货】状态,【发布状态】请用取消发布或看板作废!"; + _ret.Message = "选择的记录,有不是【已确认】或【已发货】状态,【发布状态】请用取消发布或看板作废!"; } } @@ -2058,7 +2058,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录,有不是新建或发布状态记录!"; + _ret.Message = "选择的记录,有不是新建或发布状态记录!"; } } @@ -2086,7 +2086,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "选择的记录已经有发货单据不能取消!"; + _ret.Message = "选择的记录已经有发货单据不能取消!"; } @@ -2155,7 +2155,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "数据更新失败!"; + _ret.Message = "数据更新失败!"; } } diff --git a/北京北汽/Controller/SCP_ASN_CONTROLLER.cs b/北京北汽/Controller/SCP_ASN_CONTROLLER.cs index c486305..9f775a0 100644 --- a/北京北汽/Controller/SCP_ASN_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_ASN_CONTROLLER.cs @@ -525,7 +525,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "存在删除记录不能操作!"; + _ret.Message = "存在删除记录不能操作!"; } else { @@ -599,7 +599,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = string.Format("选择记录中有,不是新建状态不能作废!"); + _ret.Message = string.Format("选择记录中有,不是新建状态不能作废!"); } } @@ -634,7 +634,7 @@ namespace CK.SCP.Controller { _ret.State = ReturnStatus.Failed; _ret.Result = false; - _ret.Message = "数据更新失败!"; + _ret.Message = "数据更新失败!"; } } } diff --git a/北京北汽/Models/ScpCache.cs b/北京北汽/Models/ScpCache.cs index 418392a..7128bdd 100644 --- a/北京北汽/Models/ScpCache.cs +++ b/北京北汽/Models/ScpCache.cs @@ -239,11 +239,12 @@ namespace CK.SCP.Models public static List LangauageList { get - { - if (_LangauageList == null || _LangauageList.Count == 0) - { - _LangauageList = ScpDb.TA_LANGUAGE.ToList(); - } + { + //if (_LangauageList == null || _LangauageList.Count == 0) + //{ + // 为了及时性 每次都直接读取 + _LangauageList = ScpDb.TA_LANGUAGE.ToList(); + //} return _LangauageList; } diff --git a/北京北汽/Models/ScpEntity/TA_LANGUAGE.cs b/北京北汽/Models/ScpEntity/TA_LANGUAGE.cs index 494c646..f5fbae4 100644 --- a/北京北汽/Models/ScpEntity/TA_LANGUAGE.cs +++ b/北京北汽/Models/ScpEntity/TA_LANGUAGE.cs @@ -14,23 +14,15 @@ namespace CK.SCP.Models.ScpEntity public int UID { get; set; } [StringLength(200)] public string GUID { get; set; } - [StringLength(200)] + [StringLength(2000)] public string CH { get; set; } - [StringLength(200)] public string EN { get; set; } - [StringLength(200)] public string RU { get; set; } - [StringLength(200)] public string DE { get; set; } - [StringLength(200)] public string FR { get; set; } - [StringLength(200)] public string EL { get; set; } - [StringLength(200)] public string AR { get; set; } - [StringLength(200)] public string JP { get; set; } - public bool IsDeleted { get; set; } } diff --git a/北京北汽/SCP/Admin/profile.aspx b/北京北汽/SCP/Admin/profile.aspx index 329ae4e..d1ed5f5 100644 --- a/北京北汽/SCP/Admin/profile.aspx +++ b/北京北汽/SCP/Admin/profile.aspx @@ -16,17 +16,14 @@ LabelAlign="Top" ShowBorder="false" ShowHeader="false" Width="400px"> - + - + - + + Text="修改密码"> diff --git a/北京北汽/SCP/Admin/profile.aspx.cs b/北京北汽/SCP/Admin/profile.aspx.cs index c1ab16f..03d4043 100644 --- a/北京北汽/SCP/Admin/profile.aspx.cs +++ b/北京北汽/SCP/Admin/profile.aspx.cs @@ -51,10 +51,24 @@ namespace SCP.admin string oldPass = tbxOldPassword.Text.Trim(); string newPass = tbxNewPassword.Text.Trim(); string confirmNewPass = tbxConfirmNewPassword.Text.Trim(); - + if (string.IsNullOrEmpty( oldPass)) + { + Alert.ShowInTop(GetResourceKey("请输入原始密码!")); + return; + } + if (string.IsNullOrEmpty(newPass)) + { + Alert.ShowInTop(GetResourceKey("请输入新密码!")); + return; + } + if (string.IsNullOrEmpty(confirmNewPass)) + { + Alert.ShowInTop(GetResourceKey("请输入确认新密码!")); + return; + } if (newPass != confirmNewPass) { - tbxConfirmNewPassword.MarkInvalid(GetResourceKey("确认密码和新密码不一致!")); + Alert.ShowInTop(GetResourceKey("确认密码和新密码不一致!")); return; } @@ -64,7 +78,17 @@ namespace SCP.admin { if (!PasswordUtil.ComparePasswords(user.Password, oldPass)) { - tbxOldPassword.MarkInvalid(GetResourceKey("当前密码不正确!")); + Alert.ShowInTop(GetResourceKey("当前密码不正确!")); + return; + } + if (tbxNewPassword.Text.Length == 0 || tbxConfirmNewPassword.Text.Length == 0) + { + Alert.ShowInTop(GetResourceKey("新密码以及确认密码不能为空!")); + return; + } + if (tbxNewPassword.Text.Length<6) + { + Alert.ShowInTop(GetResourceKey("密码长度不能小于6!")); return; } @@ -81,7 +105,7 @@ namespace SCP.admin user.Password = PasswordUtil.CreateDbPassword(newPass); DB.SaveChanges(); - Alert.ShowInTop(GetResourceKey("修改密码成功!")); + Alert.ShowInTop(GetResourceKey("修改密码成功!")); } } diff --git a/北京北汽/SCP/Business/PageBase.cs b/北京北汽/SCP/Business/PageBase.cs index 3d553c1..548a8a6 100644 --- a/北京北汽/SCP/Business/PageBase.cs +++ b/北京北汽/SCP/Business/PageBase.cs @@ -1241,10 +1241,11 @@ namespace SCP if (!string.IsNullOrEmpty(p_key)) { List _ls = null; - if (Application["LanguageList"] == null) - { - Application["LanguageList"] = ScpCache.LangauageList; - } + //if (Application["LanguageList"] == null) + //{ + // 为了及时性 每次都直接读取 + Application["LanguageList"] = ScpCache.LangauageList; + //} _ls = Application["LanguageList"] as List; if (_ls != null) @@ -1280,6 +1281,8 @@ namespace SCP } return _content; } + + /// /// 当前语言 /// @@ -1306,6 +1309,7 @@ namespace SCP foreach (var itm in _grid.Columns) { itm.HeaderText = GetResourceKey(itm.HeaderText); + _grid.Title = GetResourceKey(_grid.Title); } } @@ -1332,7 +1336,7 @@ namespace SCP if (p_crtl is DropDownList) { DropDownList _dp = p_crtl as DropDownList; - _dp.Label = GetResourceKey(_dp.Text); + _dp.Label = GetResourceKey(string.IsNullOrEmpty( _dp.Text)?_dp.Label:_dp.Text); foreach (var itm in _dp.Items) { itm.Text = GetResourceKey(itm.Text); @@ -1386,6 +1390,28 @@ namespace SCP ToolbarText toolbarText = p_crtl as ToolbarText; toolbarText.Text = GetResourceKey(toolbarText.Text); } + if (p_crtl is NumberBox) + { + NumberBox number = p_crtl as NumberBox; + number.Text = GetResourceKey(number.Text); + number.Label = GetResourceKey(number.Label); + } + if (p_crtl is FileUpload) + { + FileUpload _File = p_crtl as FileUpload; + _File.ButtonText = GetResourceKey(_File.ButtonText); + _File.EmptyText = GetResourceKey(_File.EmptyText); + } + if (p_crtl is DatePicker) + { + DatePicker date = p_crtl as DatePicker; + date.EmptyText = GetResourceKey(date.EmptyText); + } + if (p_crtl is HyperLink) + { + HyperLink _Hype = p_crtl as HyperLink; + _Hype.Text = GetResourceKey(_Hype.Text); + } } } @@ -1734,11 +1760,17 @@ namespace SCP { try { + string message = "文件导出成功,请点击文件名下载"; EpPlusHelper _helper = new EpPlusHelper(); + if ((title == "CH" )|| (title == "EN")) + { + message = GetEN(title,message); + title = null; + } _helper.ExportExcelCompleted += (filePath, fileName) => { - Alert.Show($"{fileName}", "文件导出成功,请点击文件名下载", MessageBoxIcon.Information); + Alert.Show($"{fileName}", message, MessageBoxIcon.Information); }; _helper.WriteDsToExcel(sheetName, p_dataset, title); @@ -1777,6 +1809,35 @@ namespace SCP } return Menus; } + /// + /// 获取英文 + /// + /// + /// + public static string GetEN(string mes,string CH) + { + using (var db = EntitiesFactory.CreateScpInstance()) + { + List lANGUAGEs =null; + if (mes == "CH") + { + return CH; + } + lANGUAGEs =db.TA_LANGUAGE.Where(a =>a.CH == CH).ToList(); + if (lANGUAGEs.Count()>0) + { + CH = lANGUAGEs.FirstOrDefault().EN; + } + } + return CH; + } + public string GetLANGUAGE() + { + string language = "CH"; + language = GetCurrentLanguage(); + return language; + } + /// /// 生成验证码 diff --git a/北京北汽/SCP/SCP.csproj b/北京北汽/SCP/SCP.csproj index 44f5b85..09a053c 100644 --- a/北京北汽/SCP/SCP.csproj +++ b/北京北汽/SCP/SCP.csproj @@ -243,6 +243,8 @@ + + @@ -5039,6 +5041,20 @@ SCP_LANGUAGE.aspx + + SCP_LANGUAGE_1.aspx + ASPXCodeBehind + + + SCP_LANGUAGE_1.aspx + + + SCP_LANGUAGE_DETAIL.aspx + ASPXCodeBehind + + + SCP_LANGUAGE_DETAIL.aspx + SCP_MAKE_CODE_CORE.aspx ASPXCodeBehind diff --git a/北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx b/北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx new file mode 100644 index 0000000..2f6b7d6 --- /dev/null +++ b/北京北汽/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx @@ -0,0 +1,80 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_1.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_1" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +