diff --git a/.gitignore b/.gitignore index 233dacd9..6b3ba18d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ ################################################################################ /SGGLPackFile/PackFile/bin +/SGGLPackFile diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index c83bde51..c0a2a525 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -311,6 +311,25 @@ namespace BLL } #endregion + /// + /// 修改员工信息 + /// + /// 人员实体 + public static void UpdateUserInfo(Model.Sys_User user) + { + Model.Sys_User newUser = Funs.DB.Sys_User.FirstOrDefault(e => e.UserId == user.UserId); + if (newUser != null) + { + newUser.Account = user.Account; + newUser.UserName = user.UserName; + newUser.UserCode = user.UserCode; + newUser.IdentityCard = user.IdentityCard; + newUser.Email = user.Email; + newUser.Telephone = user.Telephone; + Funs.DB.SubmitChanges(); + } + } + /// /// 根据人员Id删除一个人员信息 /// diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlWeekItemDetailEdit.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlWeekItemDetailEdit.aspx.cs index 7beb3654..8af06e5f 100644 --- a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlWeekItemDetailEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlWeekItemDetailEdit.aspx.cs @@ -69,6 +69,8 @@ namespace FineUIPro.Web.JDGL.WBS Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlDetailId(this.Id); detail.CostControlDetailId = SQLHelper.GetNewID(); detail.Months = costControlDetail.Months; + detail.StartDate= costControlDetail.Months; + detail.EndDate = costControlDetail.Months.Value.AddMonths(1).AddDays(-1); list.Add(detail); Grid1.DataSource = list; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx index c7dd22de..1c75b192 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx @@ -5,98 +5,106 @@ 涓汉淇℃伅 - -
- - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -104,16 +112,16 @@ BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Left"> - + - + - + - + diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs index bb746e8e..7929db82 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs @@ -47,7 +47,7 @@ namespace FineUIPro.Web.Personal /// private void Tab1LoadData() { - var user = Funs.DB.Sys_User.FirstOrDefault(x=>x.UserId == this.CurrUser.UserId); + var user = Funs.DB.Sys_User.FirstOrDefault(x => x.UserId == this.CurrUser.UserId); if (user != null) { this.txtUserName.Text = user.UserName; @@ -70,7 +70,7 @@ namespace FineUIPro.Web.Personal { this.drpNation.Text = NationVules.ConstText; } - var units = Funs.DB.Base_Unit.FirstOrDefault(x=>x.UnitId == user.UnitId); + var units = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == user.UnitId); if (units != null) { this.drpUnit.Text = units.UnitName; @@ -98,6 +98,50 @@ namespace FineUIPro.Web.Personal } } } - #endregion + #endregion + + /// + /// 淇濆瓨鎸夐挳 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + var q = Funs.DB.Sys_User.FirstOrDefault(x => x.Account == this.txtAccount.Text.Trim() && (x.UserId != this.CurrUser.UserId || (this.CurrUser.UserId == null && x.UserId != null))); + if (q != null) + { + Alert.ShowInParent("杈撳叆鐨勮处鍙峰凡瀛樺湪锛", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtUserCode.Text)) + { + var q2 = Funs.DB.Sys_User.FirstOrDefault(x => x.UserCode == this.txtUserCode.Text.Trim() && (x.UserId != this.CurrUser.UserId || (this.CurrUser.UserId == null && x.UserId != null))); + if (q2 != null) + { + Alert.ShowInParent("杈撳叆鐨勭紪鍙峰凡瀛樺湪锛", MessageBoxIcon.Warning); + return; + } + } + + if (!string.IsNullOrEmpty(this.txtIdentityCard.Text) && BLL.UserService.IsExistUserIdentityCard(this.CurrUser.UserId, this.txtIdentityCard.Text.Trim()) == true) + { + Alert.ShowInParent("杈撳叆鐨勮韩浠借瘉鍙风爜宸插瓨鍦紒", MessageBoxIcon.Warning); + return; + } + + Model.Sys_User newUser = new Model.Sys_User + { + UserCode = this.txtUserCode.Text.Trim(), + UserName = this.txtUserName.Text.Trim(), + Account = this.txtAccount.Text.Trim(), + IdentityCard = this.txtIdentityCard.Text.Trim(), + Email = this.txtEmail.Text.Trim(), + Telephone = this.txtTelephone.Text.Trim(), + }; + newUser.UserId = this.CurrUser.UserId; + UserService.UpdateUserInfo(newUser); + Alert.ShowInParent("淇濆瓨鎴愬姛锛", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } } } \ 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 e6dcd3cf..677d3431 100644 --- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.designer.cs @@ -2,8 +2,8 @@ // <鑷姩鐢熸垚> // 姝や唬鐮佺敱宸ュ叿鐢熸垚銆 // -// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋 -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便 +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵鍋氭洿鏀瑰皢涓㈠け銆 // //------------------------------------------------------------------------------ @@ -57,6 +57,24 @@ namespace FineUIPro.Web.Personal { /// protected global::FineUIPro.Tab Tab1; + /// + /// Toolbar1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Button btnSave; + /// /// SimpleForm1 鎺т欢銆 ///