/// <summary> /// 用户模式设置 /// </summary> public string UserModelSetting(string id, string code) { if (id.Length > 0) { Sys_UserInfoBLL bllUser = new Sys_UserInfoBLL(); Sys_UserInfo UserInfo = bllUser.Get(p => p.UserInfoID == id); if (UserInfo.IsNotNull()) { UserInfo.UserInfo_WorkingState = code; if (bllUser.Update(UserInfo)) { return("1"); } else { return("0"); } } else { return("0"); } } else { return("0"); } }
/// <summary> /// 删除用户 /// </summary> /// <param name="id"></param> public string DelBank(string id) { string msg = string.Empty; bool bol = false; Sys_UserInfoBLL userBll = new Sys_UserInfoBLL(); Sys_UserInfo user = userBll.Get(p => p.UserInfoID == id); if (user != null) { string s = ""; user.UserInfo_IsDelete = true; bol = userBll.Update(user); } if (bol) { //删除成功 msg = "1"; } else { //删除失败 msg = "0"; } return(msg); }
/// <summary> /// 加载显示 /// </summary> private void InitBind() { DepBind(); //btnAdd.Visible = RequstStr("type") == "" ? true : false; if (RequstStr("id") == "") //添加 { hid_AccountId.Value = Guid.NewGuid().ToString(); txtLoginName.Enabled = true; PostBind(); RoleBind(); } else { hid_AccountId.Value = RequstStr("id"); //Sys_UserInfo account = bllUserInfo.Find(RequstStr("id")); Sys_UserInfo account = bllUserInfo.Get(p => p.UserInfoID == hid_AccountId.Value); if (account == null) { MessageBox.ShowAndRedirect(this, "该数据不存在!", "UserInfoList.aspx?depCode=" + this.hid_Dep.Value); } else { this.ddlDepart.SelectedValue = account.UserInfo_DepCode; this.txtLoginName.Text = account.UserInfo_LoginUserName; this.txtLoginPwd.Attributes.Add("value", DESEncrypt.Decrypt(account.UserInfo_LoginUserPwd)); this.txtManName.Text = account.UserInfo_FullName; this.txtPx.Text = account.UserInfo_Sequence.ToString(); this.hid_LoginName.Value = account.UserInfo_LoginUserName; ddlUserType.SelectedValue = account.UserInfo_Type; ddlStatus.SelectedValue = account.UserInfo_Status; this.ddlDepart.Enabled = true; PostBind(); RoleBind(); this.SetChecked(ckbxlist, account.UserInfo_RoleID, ","); this.SetChecked(chbGwList, account.UserInfo_Post, ","); } } }
/// <summary> /// 提交 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btntijiao_Click(object sender, ImageClickEventArgs e) { string userid = CurrUserInfo().UserID; modelUser = bllUser.Get(p => p.UserInfoID == userid); FormModel.GetForm <Sys_UserInfo>(this, modelUser, "t_"); if (modelUser != null) { modelUser.UserInfo_LoginUserPwd = DESEncrypt.Encrypt(t_UserInfo_LoginUserPwd.Text.ToString().Trim()); } //if (t_UserInfo_IdentityCred.Text != "") //{ // modelUser.UserInfo_Age = Convert.ToInt32(t_UserInfo_Age.Text); // modelUser.UserInfo_DateBirth = Convert.ToDateTime(t_UserInfo_DateBirth.Text); //} if (txt_Yhxx_DTcsrq.Value != "") { modelUser.UserInfo_DateBirth = Convert.ToDateTime(Convert.ToDateTime(txt_Yhxx_DTcsrq.Value).ToString("yyyy年MM月dd日")); } if (txt_Yhxx_Iage.Value != "") { modelUser.UserInfo_Age = Convert.ToInt32(txt_Yhxx_Iage.Value); } string UserInfo_PhoneNumber = this.t_UserInfo_PhoneNumber.Text.Trim().ToString(); //List<Sys_UserInfo> bu = bllUser.FindWhere("UserInfo_PhoneNumber='" + this.t_UserInfo_PhoneNumber.Text.Trim().ToString() + "'and UserInfoID not in('"+CurrUserInfo().UserID+"')"); List <Sys_UserInfo> bu = bllUser.GetList(p => p.UserInfo_PhoneNumber == UserInfo_PhoneNumber && p.UserInfoID != userid).ToList(); if (bu.Count > 0) { this.t_UserInfo_PhoneNumber.Text = ""; MessageBox.Show(this, "手机号码已存在,请重新输入!"); } else { if (bllUser.Update(modelUser)) { new Common_BLL().AddLog("系统管理>>个人信息维护", "", "修改", "修改个人信息维护", CurrUserInfo().UserID, CurrUserInfo().DepartmentCode); MessageBox.ShowAndRedirect(this, "修改成功", "UserInfoModify.aspx?rn=" + new Random().Next()); // //更新此人对应的岗位自查表模块表 //(new DAL.PositionChange()).UpdateGwfxwx(model.ManID, "1", model.Position); } else { MessageBox.Show(this, "修改错误"); } } }
private void Show() { string id = Request["id"]; if (!string.IsNullOrEmpty(id)) { Workflow_NodeConfigEx entity = new Workflow_NodeConfigEx(); Sys_UserInfoBLL UserBll = new Sys_UserInfoBLL(); Sys_RoleBLL RoleBll = new Sys_RoleBLL(); entity = bll.Get(p => p.NodeConfigExID == id); if (entity.IsNotNull()) { txtWorkflowNodeConfig_Name.Text = entity.NodeConfigEx_Name; txtWorkflowNodeConfig_Setp.Text = entity.NodeConfigEx_Setp == null ? "" : entity.NodeConfigEx_Setp.ToString(); drpWorkflowNodeConfig_AuditMode.SelectedValue = entity.NodeConfigEx_AuditMode; ddlMechanism.SelectedValue = entity.NodeConfigEx_Mechanism.SafeToString("0"); hidAutoOption.Value = entity.NodeConfigEx_DistributionRule; string objectId = hid_DepCode.Value = entity.NodeConfigEx_AuditObjectID; ddlNodeSign.SelectedValue = entity.NodeConfigEx_NodeSign; hid_NodeConfigEx_DataMappingID.Value = entity.NodeConfigEx_DataMappingID; //ckoNodeConfigEx_IsDisplayContract.Checked = entity.NodeConfigEx_IsDisplayContract.ToType(false); if (!string.IsNullOrEmpty(objectId)) { if (drpWorkflowNodeConfig_AuditMode.SelectedValue == "0") { Sys_Role role = RoleBll.Get(p => p.RoleID == objectId); if (role.IsNotNull()) { txt_Dep.Text = role.Role_Name; } } else { Sys_UserInfo UserInfo = UserBll.Get(p => p.UserInfoID == objectId); if (UserInfo.IsNotNull()) { txt_Dep.Text = UserInfo.UserInfo_FullName; } } } } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Request.ContentEncoding = Encoding.GetEncoding("UTF-8"); StringBuilder sb = new StringBuilder(); string parentId = string.Empty; if (!string.IsNullOrEmpty(context.Request.QueryString["id"])) { parentId = context.Request.QueryString["id"]; } if (!string.IsNullOrEmpty(parentId)) { Sys_UserInfo entity = bll.Get(p => p.UserInfoID == parentId); if (entity != null) { string post = ""; string postN = ""; string name = entity.UserInfo_FullName; string ment = entity.UserInfo_DepCode; Sys_DepartmentBLL mentsbll = new Sys_DepartmentBLL(); Sys_Department ments = mentsbll.Get(p => p.Department_Code == ment); post = entity.UserInfo_Post; Sys_Post po = pobll.Get(p => p.PostID == post); if (po != null) { postN = po.Post_Name; } string mentss = ments.Department_Name; var Data = new { name = name, mentss = mentss, post = post, postN = postN }; string jsonPerson = JsonConvert.SerializeObject(Data); context.Response.Write(jsonPerson); } } else { context.Response.Write("{\"data\":\"error\"}"); } }