| | |
| | | private int _userId = -1; |
| | | private int _userType = -1; |
| | | private string _account = ""; |
| | | private string initPwd = ConfigurationManager.AppSettings["initPwd"]; |
| | | |
| | | public override JsonPageResult ProcessRequestInternal(PageContext<Model.SysUser> context) |
| | | { |
| | |
| | | //批量分配客户的个性产品 |
| | | case "batchUpdateClientProduct": |
| | | return BatchUpdateClientProduct(context); |
| | | //重置密码 |
| | | case "resetPwd": |
| | | return ResetPwd(context); |
| | | |
| | | default: |
| | | throw new Exception("Invalid Action=" + action); |
| | |
| | | string ClientName = context.GetString("ClientName"); |
| | | string Telephone = context.GetString("Telephone"); |
| | | string Salesman = context.GetString("Salesman"); |
| | | string SupportStaff = context.GetString("SupportStaff"); |
| | | string ProductId = context.GetString("ProductId"); |
| | | int pageIndex = context.GetInt("pageIndex", 1); |
| | | |
| | |
| | | using (GwClientDao dao = new GwClientDao()) |
| | | { |
| | | string permissionsSQL = dao.GetClientPermissions(_userId, _userType, null); |
| | | var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, ProductId, permissionsSQL); |
| | | var list = dao.LoadInfoList(out recordCount, pageIndex, pageSize, ClientID, ClientName, Telephone, Agent, Company, Salesman, SupportStaff, ProductId, permissionsSQL); |
| | | |
| | | if (list != null && list.Count > 0) |
| | | { |
| | |
| | | //edit:yangzh by 20220511 |
| | | //str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Top_up_Amount_Total + "元</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>"; |
| | | //str += @"<tr ><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "元</td><td>" + item.Top_up_Amount_Total/1000 + "元</td><td>" + item.Agent + "</td><td>" + Certification_StatusResult + "</td>"; |
| | | str += @"<tr ><td rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "元</td><td>" + item.Top_up_Amount_Total/1000 + "元</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td><td>" + Certification_StatusResult + "</td>"; |
| | | |
| | | //str += @"<tr ><td rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "元</td><td>" + item.Top_up_Amount_Total/1000 + "元</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td><td>" + Certification_StatusResult + "</td>"; |
| | | str += @"<tr ><td rowspan='1' ><input type='checkbox' name='checkbox' value='" + item.ClientID + "'/></td><td>" + item.ClientID + "</td><td>" + item.Company + "</td><td>" + item.ClientName + "</td><td>" + item.Telephone + "</td><td>" + item.Balance/1000 + "</td><td>" + item.Top_up_Amount_Total/1000 + "</td><td>" + SysUserName(string.IsNullOrEmpty(item.Salesman)? 0: int.Parse(item.Salesman) ) + "</td></td>"; |
| | | |
| | | str += @"<td>"; |
| | | string loginStr = "http://" + serverIp + ":" + clientPort + "/Attachedlogin.aspx?action=Attachedlogin&account=" + item.Account + "&password=" + item.Password; |
| | |
| | | str += @"黑名单"; |
| | | str += @"</a> "; |
| | | |
| | | str += string.Format(@"<a class=""action-modal-resetPwd btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); |
| | | str += @"重置密码"; |
| | | str += @"</a> "; |
| | | |
| | | str += string.Format(@"<a class=""action-delete btn btn-xs btn-default"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); |
| | | str += @"删除"; |
| | | str += @"</a>"; |
| | |
| | | } |
| | | else |
| | | { |
| | | str += @"<tr><td colspan=""10"">暂无信息</td></tr>"; |
| | | str += @"<tr><td colspan=""9"">暂无信息</td></tr>"; |
| | | } |
| | | |
| | | } |
| | |
| | | string clientID = context.GetString("clientID"); |
| | | |
| | | return new JsonPageResult(true, _Dao.GetBlackList(clientID)); |
| | | } |
| | | |
| | | //重置密码 |
| | | private JsonPageResult ResetPwd(PageContext<Model.SysUser> context) |
| | | { |
| | | string clientID = context.GetString("clientID"); |
| | | string password = string.IsNullOrEmpty(initPwd ) ? "123456" : initPwd; |
| | | |
| | | //密码MD5加密, |
| | | password = DataHelper.MD5Hex(password); |
| | | |
| | | _Dao.UpdatePassword(clientID, password); |
| | | |
| | | return new JsonPageResult(true, "重置密码成功!"); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | //管理端账户名称 |
| | | //管理端用户ID转名称 |
| | | private string SysUserName(int userId) |
| | | { |
| | | if (this.SysUserList == null) |
| | | return string.Empty; |
| | | SysUser sysUser = this._SysUserList.Find((Predicate<SysUser>)(bean => bean.UserID == userId)); |
| | | if (sysUser != null) |
| | | return string.Format("{0}-{1}", (object)sysUser.UserID, (object)sysUser.UserName); |
| | | return string.Format("{0}", (object)sysUser.UserName); |
| | | return string.Empty; |
| | | } |
| | | } |