diff --git a/DataBase/版本日志/SGGLDB_V2022-07-26-001.sql b/DataBase/版本日志/SGGLDB_V2022-07-26-001.sql
new file mode 100644
index 00000000..182dc983
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2022-07-26-001.sql
@@ -0,0 +1,4 @@
+ALTER TABLE SitePerson_Person ADD RawPassword NVARCHAR(100) NULL
+GO
+ALTER TABLE Sys_user ADD RawPassword NVARCHAR(100) NULL
+GO
\ No newline at end of file
diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs
index a952b2bd..c0139719 100644
--- a/SGGL/BLL/API/APIPersonService.cs
+++ b/SGGL/BLL/API/APIPersonService.cs
@@ -22,8 +22,7 @@ namespace BLL
{
var getUser = from x in db.SitePerson_Person
where (x.Telephone == userInfo.Account || x.PersonName == userInfo.Account)
- && (x.Password == Funs.EncryptionPassword(userInfo.Password)
- || (x.IdentityCard != null && x.IdentityCard.Substring(x.IdentityCard.Length - 4) == userInfo.Password))
+ && x.Password == Funs.EncryptionPassword(userInfo.Password)
&& x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime >= DateTime.Now) && x.IsUsed == true
select new Model.UserItem
{
@@ -812,7 +811,8 @@ namespace BLL
{
newPerson.IsUsed = false;
}
- newPerson.Password = PersonService.GetPersonPassWord(person.IdentityCard);
+ newPerson.RawPassword = Funs.getInitialPassword(person.UnitId, person.IdentityCard);
+ newPerson.Password = Funs.EncryptionPassword(newPerson.RawPassword);
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
if (!string.IsNullOrEmpty(rootUrl) && !string.IsNullOrEmpty(person.PhotoUrl))
{
diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs
index 467b134f..14b81b18 100644
--- a/SGGL/BLL/Common/Funs.cs
+++ b/SGGL/BLL/Common/Funs.cs
@@ -4,8 +4,8 @@ namespace BLL
using System;
using System.Collections.Generic;
using System.Data;
- using System.Data.Linq;
using System.Globalization;
+ using System.Linq;
using System.Reflection;
using System.Text;
@@ -146,6 +146,7 @@ namespace BLL
//}
private static object locker = new object();
+
///
/// ݿġ
///
@@ -195,6 +196,76 @@ namespace BLL
//return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(password, "MD5");
}
+ #region ȡûʼ
+ ///
+ /// ȡûʼ
+ ///
+ ///
+ ///
+ public static string getInitialPassword(string unitId, string idCard)
+ {
+ string prefixValue = "CWCEC";
+ string suffixValue = "1234";
+ //var getUnit = UnitService.GetUnitByUnitId(unitId);
+ //if (getUnit != null)
+ //{
+ // if (!string.IsNullOrEmpty(getUnit.UnitCode))
+ // {
+ // if (getUnit.UnitCode.Length > 10)
+ // {
+ // prefixValue = getUnit.UnitCode.Substring(getUnit.UnitCode.Length - 10);
+ // }
+ // else
+ // {
+ // prefixValue = getUnit.UnitCode;
+ // }
+ // }
+ //}
+ if (!string.IsNullOrEmpty(idCard))
+ {
+ if (idCard.Length > 4)
+ {
+ suffixValue = idCard.Substring(idCard.Length - 4);
+ }
+ else
+ {
+ suffixValue = idCard;
+ }
+ }
+ return prefixValue + "." + suffixValue;
+ }
+ #endregion
+
+ #region ֤
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool IsLetter(char c)
+ {
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+ }
+
+ public static bool IsDigit(char c)
+ {
+ return c >= '0' && c <= '9';
+ }
+
+ static bool IsSymbol(char c)
+ {
+ return c > 32 && c < 127 && !IsDigit(c) && !IsLetter(c);
+ }
+
+ public static bool IsValIDPassword(string password)
+ {
+ return
+ password.Any(c => IsLetter(c)) &&
+ password.Any(c => IsDigit(c)) &&
+ password.Any(c => IsSymbol(c));
+ }
+ #endregion
+
///
/// ΪĿ "ѡ"
///
diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs
index 31e56d0b..a90f2077 100644
--- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs
@@ -437,7 +437,8 @@ namespace BLL
ProvinceCode = person.ProvinceCode,
IsCardNoOK=IDCardValid.CheckIDCard(person.IdentityCard),
};
-
+ newPerson.RawPassword = Funs.getInitialPassword(person.UnitId, person.IdentityCard);
+ newPerson.Password = Funs.EncryptionPassword(newPerson.RawPassword);
if (person.InTime.HasValue)
{
newPerson.InTime = person.InTime;
@@ -532,11 +533,30 @@ namespace BLL
newPerson.CountryCode = person.CountryCode;
newPerson.ProvinceCode = person.ProvinceCode;
newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
+
+ newPerson.RawPassword = Funs.getInitialPassword(person.UnitId, person.IdentityCard);
+ newPerson.Password = Funs.EncryptionPassword(newPerson.RawPassword);
db.SubmitChanges();
}
}
}
+ ///
+ /// 修改密码
+ ///
+ ///
+ ///
+ public static void UpdateSitePersonPassword(string personId, string password)
+ {
+ var m = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId);
+ if (m != null)
+ {
+ m.RawPassword = password;
+ m.Password = Funs.EncryptionPassword(password);
+ Funs.DB.SubmitChanges();
+ }
+ }
+
///
/// 人员离岗
///
diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs
index c0a2a525..6dbd2fa9 100644
--- a/SGGL/BLL/SysManage/UserService.cs
+++ b/SGGL/BLL/SysManage/UserService.cs
@@ -176,12 +176,12 @@ namespace BLL
///
public static void UpdatePassword(string userId, string password)
{
- Model.SGGLDB db = Funs.DB;
- Model.Sys_User m = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
+ Model.Sys_User m = Funs.DB.Sys_User.FirstOrDefault(e => e.UserId == userId);
if (m != null)
{
+ m.RawPassword = password;
m.Password = Funs.EncryptionPassword(password);
- db.SubmitChanges();
+ Funs.DB.SubmitChanges();
}
}
@@ -199,6 +199,7 @@ namespace BLL
Account = user.Account,
UserName = user.UserName,
UserCode = user.UserCode,
+ RawPassword = user.RawPassword,
Password = user.Password,
UnitId = user.UnitId,
RoleId = user.RoleId,
diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx
index b44568a8..ce812254 100644
--- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx
+++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx
@@ -40,6 +40,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs
index ff190898..1631c4f9 100644
--- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs
+++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs
@@ -43,7 +43,15 @@ namespace FineUIPro.Web.Personal
this.btnCustomQuery.Hidden = false;
this.lbSystemVersion.Hidden = false;
this.lbSystemVersion.Text = Funs.SystemVersion;
+ this.btnPassRefresh.Hidden = false;
}
+ if (this.CurrUser.UserId == Const.sysglyId)
+ {
+ this.lbSystemVersion.Hidden = false;
+ this.lbSystemVersion.Text = Funs.SystemVersion;
+ this.btnPassRefresh.Hidden = false;
+ }
+
}
}
@@ -154,5 +162,34 @@ namespace FineUIPro.Web.Personal
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../SysManage/CustomQuery.aspx"), "查询"));
}
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void btnPassRefresh_Click(object sender, EventArgs e)
+ {
+ var getUsers = from x in Funs.DB.Sys_User
+ where x.RawPassword == null
+ select x;
+ foreach (var item in getUsers)
+ {
+ string password = Funs.getInitialPassword(item.UnitId, item.IdentityCard);
+ UserService.UpdatePassword(item.UserId, password);
+ }
+
+ var getPersons = from x in Funs.DB.SitePerson_Person
+ where x.RawPassword == null
+ select x;
+ foreach (var item in getPersons)
+ {
+ string password = Funs.getInitialPassword(item.UnitId, item.IdentityCard);
+ PersonService.UpdateSitePersonPassword(item.PersonId, password);
+ }
+
+ ShowNotify("重置成功!", MessageBoxIcon.Success);
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs
index 111ddc5e..cb7fe79e 100644
--- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.Personal {
-
-
- public partial class PersonalInfo {
-
+namespace FineUIPro.Web.Personal
+{
+
+
+ public partial class PersonalInfo
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel2 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// TabStrip1 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TabStrip TabStrip1;
-
+
///
/// Tab1 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Tab Tab1;
-
+
///
/// Toolbar1 控件。
///
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// lbSystemVersion 控件。
///
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbSystemVersion;
-
+
///
/// btnSave 控件。
///
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// btnCustomQuery 控件。
///
@@ -92,7 +94,16 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnCustomQuery;
-
+
+ ///
+ /// btnPassRefresh 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnPassRefresh;
+
///
/// SimpleForm1 控件。
///
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// Panel3 控件。
///
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel3;
-
+
///
/// Panel1 控件。
///
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// txtUserName 控件。
///
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtUserName;
-
+
///
/// txtUserCode 控件。
///
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtUserCode;
-
+
///
/// drpSex 控件。
///
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox drpSex;
-
+
///
/// dpBirthDay 控件。
///
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox dpBirthDay;
-
+
///
/// drpMarriage 控件。
///
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox drpMarriage;
-
+
///
/// drpNation 控件。
///
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox drpNation;
-
+
///
/// drpUnit 控件。
///
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox drpUnit;
-
+
///
/// Panel4 控件。
///
@@ -191,7 +202,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel4;
-
+
///
/// txtAccount 控件。
///
@@ -200,7 +211,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtAccount;
-
+
///
/// txtIdentityCard 控件。
///
@@ -209,7 +220,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtIdentityCard;
-
+
///
/// txtEmail 控件。
///
@@ -218,7 +229,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtEmail;
-
+
///
/// txtTelephone 控件。
///
@@ -227,7 +238,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtTelephone;
-
+
///
/// drpEducation 控件。
///
@@ -236,7 +247,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox drpEducation;
-
+
///
/// txtHometown 控件。
///
@@ -245,7 +256,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtHometown;
-
+
///
/// drpPosition 控件。
///
@@ -254,7 +265,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox drpPosition;
-
+
///
/// Panel5 控件。
///
@@ -263,7 +274,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel5;
-
+
///
/// Image1 控件。
///
@@ -272,7 +283,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Image Image1;
-
+
///
/// Form7 控件。
///
@@ -281,7 +292,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form Form7;
-
+
///
/// txtPerformance 控件。
///
@@ -290,7 +301,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtPerformance;
-
+
///
/// Tab2 控件。
///
@@ -299,7 +310,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Tab Tab2;
-
+
///
/// SimpleForm2 控件。
///
@@ -308,7 +319,7 @@ namespace FineUIPro.Web.Personal {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm2;
-
+
///
/// Window1 控件。
///
diff --git a/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs
index 25998fbe..df43b5f5 100644
--- a/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs
+++ b/SGGL/FineUIPro.Web/SysManage/UpdatePassword.aspx.cs
@@ -105,7 +105,12 @@
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
- BLL.UserService.UpdatePassword(rowID, BLL.Const.Password);
+ var getUser = UserService.GetUserByUserId(rowID);
+ if (getUser != null)
+ {
+ string password = Funs.getInitialPassword(getUser.UnitId, getUser.IdentityCard);
+ BLL.UserService.UpdatePassword(rowID, password);
+ }
}
BindGrid();
ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
diff --git a/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs
index 02191048..8fe7e222 100644
--- a/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/SysManage/UpdatePasswordEdit.aspx.cs
@@ -89,6 +89,22 @@ namespace FineUIPro.Web.SysManage
return;
}
+ if (this.txtNewPassword.Text.Length < 8)
+ {
+ Alert.ShowInParent("密码长度至少8位!");
+ return;
+ }
+ if (this.txtNewPassword.Text != this.txtConfirmPassword.Text)
+ {
+ Alert.ShowInParent("确认密码输入不一致!");
+ return;
+ }
+
+ if (!Funs.IsValIDPassword(this.txtNewPassword.Text))
+ {
+ Alert.ShowInParent("密码必须包含字母、数字、特殊符号!");
+ return;
+ }
BLL.UserService.UpdatePassword(user.UserId, this.txtNewPassword.Text);
BLL.LogService.AddSys_Log(this.CurrUser, "修改密码", string.Empty, BLL.Const.UserMenuId, Const.BtnModify);
diff --git a/SGGL/FineUIPro.Web/SysManage/UserIn.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UserIn.aspx.cs
index 7dafa755..006086d3 100644
--- a/SGGL/FineUIPro.Web/SysManage/UserIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/SysManage/UserIn.aspx.cs
@@ -366,7 +366,8 @@ namespace FineUIPro.Web.SysManage
var getUser = Funs.DB.Sys_User.FirstOrDefault(x => x.Account == userViews[i].Account);
if (getUser == null)
{
- newUser.Password = Funs.EncryptionPassword(Const.Password);
+ newUser.RawPassword = Funs.getInitialPassword(newUser.UnitId, newUser.IdentityCard);
+ newUser.Password = Funs.EncryptionPassword(newUser.RawPassword);
BLL.UserService.AddUser(newUser);
insertCount++;
}
diff --git a/SGGL/FineUIPro.Web/SysManage/UserListEdit.aspx.cs b/SGGL/FineUIPro.Web/SysManage/UserListEdit.aspx.cs
index 0e3f3929..be42ecc9 100644
--- a/SGGL/FineUIPro.Web/SysManage/UserListEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/SysManage/UserListEdit.aspx.cs
@@ -235,8 +235,9 @@ namespace FineUIPro.Web.SysManage
}
if (string.IsNullOrEmpty(this.UserId))
{
- newUser.Password = Funs.EncryptionPassword(Const.Password);
- newUser.UserId = SQLHelper.GetNewID(typeof(Model.Sys_User));
+ newUser.RawPassword = Funs.getInitialPassword(newUser.UnitId, newUser.IdentityCard);
+ newUser.Password = Funs.EncryptionPassword(newUser.RawPassword);
+ newUser.UserId = SQLHelper.GetNewID();
newUser.DataSources = this.CurrUser.LoginProjectId;
UserService.AddUser(newUser);
LogService.AddSys_Log(this.CurrUser, newUser.UserCode, newUser.UserId, BLL.Const.UserMenuId, BLL.Const.BtnAdd);
@@ -324,10 +325,12 @@ namespace FineUIPro.Web.SysManage
///
protected void btnArrowRefresh_Click(object sender, EventArgs e)
{
- if (!string.IsNullOrEmpty(this.UserId))
+ var getUser = UserService.GetUserByUserId(this.UserId);
+ if (getUser != null)
{
- BLL.UserService.UpdatePassword(this.UserId, BLL.Const.Password);
- ShowNotify("密码已重置为原始密码!", MessageBoxIcon.Success);
+ string passWord = Funs.getInitialPassword(getUser.UnitId, getUser.IdentityCard);
+ BLL.UserService.UpdatePassword(this.UserId, passWord);
+ ShowNotify("密码已重置为原始密码!密码为" + passWord, MessageBoxIcon.Success);
}
else
{
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index bc0fdc67..10385b46 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -255428,7 +255428,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")]
public string Address
{
get
@@ -255492,7 +255492,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string WorkAreaName
{
get
@@ -257937,6 +257937,8 @@ namespace Model
private System.Nullable _IsCardNoOK;
+ private string _RawPassword;
+
private EntitySet _Accident_AccidentPersonRecord;
private EntitySet _Accident_AccidentReportOtherItem;
@@ -258117,6 +258119,8 @@ namespace Model
partial void OnRealNameUpdateTimeChanged();
partial void OnIsCardNoOKChanging(System.Nullable value);
partial void OnIsCardNoOKChanged();
+ partial void OnRawPasswordChanging(string value);
+ partial void OnRawPasswordChanged();
#endregion
public SitePerson_Person()
@@ -259365,6 +259369,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RawPassword", DbType="NVarChar(100)")]
+ public string RawPassword
+ {
+ get
+ {
+ return this._RawPassword;
+ }
+ set
+ {
+ if ((this._RawPassword != value))
+ {
+ this.OnRawPasswordChanging(value);
+ this.SendPropertyChanging();
+ this._RawPassword = value;
+ this.SendPropertyChanged("RawPassword");
+ this.OnRawPasswordChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_SitePerson_Person", Storage="_Accident_AccidentPersonRecord", ThisKey="PersonId", OtherKey="PersonId", DeleteRule="NO ACTION")]
public EntitySet Accident_AccidentPersonRecord
{
@@ -274254,6 +274278,8 @@ namespace Model
private string _WorkNo;
+ private string _RawPassword;
+
private EntitySet _Comprehensive_NCRManagement;
private EntitySet _Comprehensive_PressurePipe;
@@ -274998,6 +275024,8 @@ namespace Model
partial void OnViceCNProfessionalIdChanged();
partial void OnWorkNoChanging(string value);
partial void OnWorkNoChanged();
+ partial void OnRawPasswordChanging(string value);
+ partial void OnRawPasswordChanged();
#endregion
public Sys_User()
@@ -276322,6 +276350,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RawPassword", DbType="NVarChar(100)")]
+ public string RawPassword
+ {
+ get
+ {
+ return this._RawPassword;
+ }
+ set
+ {
+ if ((this._RawPassword != value))
+ {
+ this.OnRawPasswordChanging(value);
+ this.SendPropertyChanging();
+ this._RawPassword = value;
+ this.SendPropertyChanged("RawPassword");
+ this.OnRawPasswordChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_NCRManagement_Sys_User", Storage="_Comprehensive_NCRManagement", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
public EntitySet Comprehensive_NCRManagement
{
@@ -337439,7 +337487,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")]
public string Address
{
get
@@ -337455,7 +337503,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string WorkAreaName
{
get