public void UpdateDetailInfo(UserDetailInfo info) { if (info != null) { this.detailInfo = info; } }
//[HandlerAjaxOnly] public ActionResult DingTalkUserLogin(string code) { try { DingTalkCorpConfig config = ding.GetAccessToken(); UserDetailInfo user = new UserDetailInfo(); if (config != null) { user = DingTalkUserApi.GetUserDetailByAuthCode(config.AccessToken, code); if (user != null) { DingTalkUserEntity info = CheckLogin(user); if (info == null) { return(Success("成功", user.ToJson())); } else { return(Success("成功", info.ToJson())); } } } return(Error("失败")); } catch { return(Error("失败")); } }
public void selPictureList(UserDetailInfo user) { wrapPanel1.Children.Clear(); for (int i = 0; i < user.Faces.Count; i++) { string video = user.Faces[i].Icon; char[] delimiterChars = { ':', '\\' }; string[] words = video.Split(delimiterChars); int count = words.Length; if (words[count - 2].ToString() == "Face") { var faceGrid = new Grid(); faceGrid.Width = 82; faceGrid.Height = 81; faceGrid.Margin = new Thickness(0); Image finalImage = new Image(); finalImage.Cursor = Cursors.Hand; finalImage.Margin = new Thickness(2, 1, 2, 1); finalImage.DataContext = user.Faces[i].Icon; finalImage.Source = ImageDownloader.GetInstance().GetImage(user.Faces[i].Icon); finalImage.MouseLeftButtonUp += new MouseButtonEventHandler(finalImage_MouseLeftButtonUp); faceGrid.Children.Add(finalImage); wrapPanel1.Children.Add(faceGrid); } } }
/// <summary> /// 从IDataReader创建UserDetailInfo /// </summary> public static UserDetailInfo BuildUserDetailFromReader(IDataReader reader) { UserDetailInfo userDetailInfo = new UserDetailInfo(); userDetailInfo.Uid = TypeHelper.ObjectToInt(reader["uid"]); userDetailInfo.LastVisitTime = TypeHelper.ObjectToDateTime(reader["lastvisittime"]); userDetailInfo.LastVisitIP = reader["lastvisitip"].ToString(); userDetailInfo.LastVisitRgId = TypeHelper.ObjectToInt(reader["lastvisitrgid"]); userDetailInfo.RegisterTime = TypeHelper.ObjectToDateTime(reader["registertime"]); userDetailInfo.RegisterIP = reader["registerip"].ToString(); userDetailInfo.RegisterRgId = TypeHelper.ObjectToInt(reader["registerrgid"]); userDetailInfo.Gender = TypeHelper.ObjectToInt(reader["gender"]); userDetailInfo.RealName = reader["realname"].ToString(); userDetailInfo.Bday = TypeHelper.ObjectToDateTime(reader["bday"]); userDetailInfo.IdCard = reader["idcard"].ToString(); userDetailInfo.RegionId = TypeHelper.ObjectToInt(reader["regionid"]); userDetailInfo.Address = reader["address"].ToString(); userDetailInfo.Bio = reader["bio"].ToString(); userDetailInfo.LinkName = reader["linkname"].ToString(); userDetailInfo.Company = reader["company"].ToString(); userDetailInfo.CreditCode = reader["creditcode"].ToString(); userDetailInfo.BusinessLicense = reader["businesslicense"].ToString(); return(userDetailInfo); }
internal UserDetailInfo GetUserDetails(Guid tenantId, Guid userId) { var userDetails = new UserDetailInfo(); try { SqlProcedureCommand cmd = CreateProcedureCommand("dbo.User_GetBy_Id"); cmd.AppendGuid("@guidTenantId", tenantId); cmd.AppendGuid("@userId", userId); using (SqlDataReader reader = ExecuteCommandAndReturnReader(cmd)) { while (reader.Read()) { userDetails.Id = reader.IsDBNull(0) ? Guid.Empty : reader.GetGuid(0); userDetails.Name = reader.IsDBNull(1) ? string.Empty : reader.GetString(1); userDetails.IsSuperadmin = reader.IsDBNull(2) ? false : reader.GetBoolean(2); userDetails.IsSystemAdmin = reader.IsDBNull(3) ? false : reader.GetBoolean(3); } } } catch (SqlException e) { throw ReportAndTranslateException(e, "LayoutData::GetLayoutsDetailsById"); } return(userDetails); }
public void InnerAlberm(UserDetailInfo user) { picturePanel.Children.Clear(); for (int i = 0; i < user.Faces.Count; i++) { var gameGrid = new Grid(); gameGrid.Width = 82; gameGrid.Height = 81; gameGrid.Margin = new Thickness(0); Image finalImage = new Image(); finalImage.Cursor = Cursors.Hand; finalImage.Margin = new Thickness(2, 1, 2, 1); BitmapImage veri = new BitmapImage(); veri.BeginInit(); veri.UriSource = new Uri(Main._ServerPath + user.Faces[i].Icon, UriKind.RelativeOrAbsolute); finalImage.DataContext = user.Faces[i].Id; veri.EndInit(); finalImage.Source = veri; //finalImage.MouseUp += new MouseButtonEventHandler(EnterGame_MouseUp); gameGrid.Children.Add(finalImage); picturePanel.Children.Add(gameGrid); } }
/// <summary> /// 获得用户细节 /// </summary> /// <param name="uid">用户id</param> /// <returns></returns> public static UserDetailInfo GetUserDetailById(int uid) { UserDetailInfo userDetailInfo = null; if (_usernosql != null) { userDetailInfo = _usernosql.GetUserDetailById(uid); if (userDetailInfo == null) { IDataReader reader = BrnMall.Core.BMAData.RDBS.GetUserDetailById(uid); if (reader.Read()) { userDetailInfo = BuildUserDetailFromReader(reader); } reader.Close(); if (userDetailInfo != null) { _usernosql.CreateUserDetail(userDetailInfo); } } } else { IDataReader reader = BrnMall.Core.BMAData.RDBS.GetUserDetailById(uid); if (reader.Read()) { userDetailInfo = BuildUserDetailFromReader(reader); } reader.Close(); } return(userDetailInfo); }
/// <summary> /// 获得用户细节 /// </summary> /// <param name="uid">用户id</param> /// <returns></returns> public static UserDetailInfo GetUserDetailById(int uid) { UserDetailInfo userDetailInfo = null; //if (_usernosql != null) //{ // userDetailInfo = _usernosql.GetUserDetailById(uid); // if (userDetailInfo == null) // { // IDataReader reader = BrnShop.Core.BSPData.RDBS.GetUserDetailById(uid); // if (reader.Read()) // { // userDetailInfo = BuildUserDetailFromReader(reader); // } // reader.Close(); // if (userDetailInfo != null) // _usernosql.CreateUserDetail(userDetailInfo); // } //} //else //{ IDataReader reader = BonSite.Core.BSData.RDBS.GetUserDetailById(uid); if (reader.Read()) { userDetailInfo = BuildUserDetailFromReader(reader); } reader.Close(); //} return(userDetailInfo); }
/// <summary> /// 获取用户信息 /// </summary> /// <returns></returns> public ActionResult UserInfo() { try { NameValueCollection parmas = WorkContext.postparms; string account = parmas["account"]; PartUserInfo user = Users.GetPartUserByMobile(account); UserDetailInfo userdetails = Users.GetUserDetailById(user.Uid); if (user.Avatar != null && user.Avatar != string.Empty) { user.Avatar = BSPConfig.ShopConfig.SiteUrl + "/upload/imgs/" + user.Avatar; } else { user.Avatar = BSPConfig.ShopConfig.SiteUrl + "/upload/imgs/defaultcall.png"; } string data = "{\"Account\":\"" + account + "\",\"NickName\":\"" + user.NickName + "\",\"SignName\":\"" + userdetails.SignName + "\",\"Avatar\":\"" + user.Avatar + "\"}"; return(APIResult("success", data.ToLower(), true)); } catch (Exception ex) { return(APIResult("error", "获取失败")); } }
/// <summary> /// 更新用户细节 /// </summary> /// <returns></returns> public static void UpdateUserDetail(UserDetailInfo userDetailInfo) { BrnMall.Core.BMAData.RDBS.UpdateUserDetail(userDetailInfo); if (_usernosql != null) { _usernosql.UpdateUserDetail(userDetailInfo); } }
public UserDetailInfo GetUserDetailFromJson(string jsonString) { UserDetailInfo model = Newtonsoft.Json.JsonConvert.DeserializeObject <UserDetailInfo>(jsonString); if (model != null) { if (model.errcode == 0) { return(model); } } return(null); }
public void selPictureList(UserDetailInfo user) { try { wrapPanel1.Children.Clear(); nTotalCount = user.Faces.Count; if (user.Faces.Count == 0) { this.titleName.Visibility = Visibility.Visible; return; } for (int i = 0; i < user.Faces.Count; i++) { //string video = user.Faces[i].Icon; //char[] delimiterChars = { ':', '\\' }; //string[] words = video.Split(delimiterChars); //int count = words.Length; //if (words[count - 2].ToString() == "Face") { user.Faces[i].Icon = user.Faces[i].Icon.Replace("\\", "/"); WebDownloader.GetInstance().ctrlSelectAlbum = this; progressUpdate.Visibility = Visibility.Visible; WebDownloader.GetInstance().DownloadFile(user.Faces[i].Icon, TitleDownloadComplete, this); //var faceGrid = new Grid(); //faceGrid.Width = 82; //faceGrid.Height = 81; //faceGrid.Margin = new Thickness(0); //Image finalImage = new Image(); //finalImage.Cursor = Cursors.Hand; //finalImage.Margin = new Thickness(2, 1, 2, 1); //finalImage.DataContext = user.Faces[i].Icon; //finalImage.Source = ImageDownloader.GetInstance().GetImage(user.Faces[i].Icon); //finalImage.MouseLeftButtonUp += new MouseButtonEventHandler(finalImage_MouseLeftButtonUp); //faceGrid.Children.Add(finalImage); //wrapPanel1.Children.Add(faceGrid); } } } catch (Exception ex) { string strError = ex.ToString(); ErrorCollection.GetInstance().SetErrorInfo(strError); } }
/// <summary> /// 获得用户细节 /// </summary> /// <param name="uid">用户id</param> /// <returns></returns> public static UserDetailInfo GetUserDetailById(int uid) { UserDetailInfo userDetailInfo = null; IDataReader reader = OWZX.Core.BSPData.RDBS.GetUserDetailById(uid); if (reader.Read()) { userDetailInfo = BuildUserDetailFromReader(reader); } reader.Close(); return(userDetailInfo); }
//채팅탭 public void InnerChatting(UserDetailInfo userDetail) { detailInfo = userDetail; DataGrid chatGrid = new DataGrid(); DataGridTextColumn col1 = new DataGridTextColumn(); DataGridTextColumn col2 = new DataGridTextColumn(); DataGridTextColumn col3 = new DataGridTextColumn(); chatGrid.Columns.Add(col1); chatGrid.Columns.Add(col2); chatGrid.Columns.Add(col3); col1.Binding = new Binding("nicName"); col2.Binding = new Binding("price"); col3.Binding = new Binding("time"); if (userDetail != null) { for (int j = 0; j < userDetail.ChatHistories.Count; j++) { if (Main._UserInfo.Kind == (int)UserKind.Buyer) { chatGrid.Items.Add(new ChatData { nicName = userDetail.ChatHistories[j].ServicemanId, price = userDetail.ChatHistories[j].ServicePrice.ToString(), time = userDetail.ChatHistories[j].StartTime.ToString() + "-" + userDetail.ChatHistories[j].EndTime.ToString() }); } else if (Main._UserInfo.Kind == (int)UserKind.ServiceWoman) { chatGrid.Items.Add(new ChatData { nicName = userDetail.ChatHistories[j].BuyerId, price = userDetail.ChatHistories[j].ServicePrice.ToString(), time = userDetail.ChatHistories[j].StartTime.ToString() + "-" + userDetail.ChatHistories[j].EndTime.ToString() }); } } } col1.Header = "채팅상태"; col2.Header = "채팅금액"; col3.Header = "채팅시간"; chatPan.Children.Add(chatGrid); }
//[HandlerAjaxOnly] public ActionResult CheckUserLogin(UserDetailInfo user) { try { if (user != null) { CheckLogin(user); return(Success("成功", user.ToJson())); } return(Error("失败")); } catch { return(Error("失败")); } }
private void UpdateInfo() { this.info = GameData.instance.UserInfo.detailInfo; this.levelNameTM.text = Localization.Localize("UserTitle" + this.info.titleId); this.levelNameTM.Commit(); if (this.nameInput != null) { this.nameInput.Text = this.info.username; } if (this.name2 != null) { this.name2.text = this.info.username; } this.levelIcon.SetSprite(((UserLevelType) this.info.titleId).ToString()); this.levelTM.text = "Lv." + this.info.level; this.levelTM.Commit(); this.upgradeNeedTM.text = this.info.lastLevelExpNeed + string.Empty; this.upgradeNeedTM.Commit(); this.expTM.text = this.info.exp + "/" + this.info.nextLevelExpNeed; this.expTM.Commit(); this.shipAmountTM.text = this.info.shipNum + "/" + this.info.shipNumTop; this.shipAmountTM.Commit(); this.cardFinishTM.text = this.info.collection; this.cardFinishTM.Commit(); this.equipAmountTM.text = this.info.equipmentNum + "/" + this.info.equipmentNumTop; this.equipAmountTM.Commit(); this.pve1.text = this.info.pveWin + string.Empty; this.pve1.Commit(); this.pve2.text = this.info.pveLost + string.Empty; this.pve2.Commit(); this.pve3.text = this.info.pveNum + string.Empty; this.pve3.Commit(); this.pve4.text = ((int) ((this.info.pveWin * 100.0) / ((double) this.info.pveNum))) + "%"; this.pve4.Commit(); this.pvp1.text = this.info.pvpWin + string.Empty; this.pvp1.Commit(); this.pvp2.text = this.info.pvpLost + string.Empty; this.pvp2.Commit(); this.pvp3.text = this.info.pvpNum + string.Empty; this.pvp3.Commit(); this.pvp4.text = ((int) ((this.info.pvpWin * 100.0) / ((double) this.info.pvpNum))) + "%"; this.pvp4.Commit(); this.pveExplore1.text = this.info.exploreNum + string.Empty; this.pveExplore1.Commit(); this.pveExplore2.text = this.info.exploreBigSuccessNum + string.Empty; this.pveExplore2.Commit(); }
// // GET: /DD/ public ActionResult GetUserInfo(string accessToken, string code, bool setCurrentUser = true) { try { string userId = DDApiService.Instance.GetUserId(accessToken, code); string jsonString = DDApiService.Instance.GetUserDetailJson(accessToken, userId); UserDetailInfo userInfo = DDApiService.Instance.GetUserDetailFromJson(jsonString); if (setCurrentUser) { Session["AccessToken"] = accessToken; Session["CurrentUser"] = userInfo; } return(Content(userId)); } catch (Exception ex) { return(Content(string.Format("{{'errcode': -1, 'errmsg':'{0}'}}", ex.Message))); } }
public void UpdateUserDetail(UserDetailInfo userDetailInfo) { DbParameter[] parms1 = { GenerateInParam("@userid", SqlDbType.Int, 4, userDetailInfo.UserID), GenerateInParam("@realname", SqlDbType.NVarChar, 10, userDetailInfo.RealName), GenerateInParam("@birthday", SqlDbType.DateTime, 8, userDetailInfo.Birthday), GenerateInParam("@gender", SqlDbType.TinyInt, 1, userDetailInfo.Gender), GenerateInParam("@idcard", SqlDbType.VarChar, 18, userDetailInfo.IdCard), GenerateInParam("@regionid", SqlDbType.SmallInt, 2, userDetailInfo.RegionId), GenerateInParam("@address", SqlDbType.NVarChar, 150, userDetailInfo.Address), GenerateInParam("@lasttime", SqlDbType.DateTime, 8, userDetailInfo.LastTime), GenerateInParam("@lastip", SqlDbType.Char, 15, userDetailInfo.LastIP), GenerateInParam("@Body", SqlDbType.NText, 0, userDetailInfo.Body) }; string commandText1 = string.Format("update {0}UserDetails set RealName=@realname,Birthday=@birthday,Gender=@gender,IDCard=@idcard,RegionID=@regionid,Address=@address,LastTime=@lasttime,LastIp=@lastip,Body=@body where UserID=@userid", RDBSHelper.RDBSTablePre); RDBSHelper.ExecuteNonQuery(CommandType.Text, commandText1, parms1); }
// // GET: /DD/ public ActionResult GetUserInfo(string accessToken, string code, bool setCurrentUser = true) { try { string userId = DDApiService.Instance.GetUserId(accessToken, code); string jsonString = DDApiService.Instance.GetUserDetailJson(accessToken, userId); UserDetailInfo userInfo = DDApiService.Instance.GetUserDetailFromJson(jsonString); if (setCurrentUser) { Session["AccessToken"] = accessToken; Session["CurrentUser"] = userInfo; } return(Content(userId)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 获得用户最后访问时间 /// </summary> /// <param name="uid">用户id</param> /// <returns></returns> public static DateTime GetUserLastVisitTimeByUid(int uid) { if (_usernosql != null) { UserDetailInfo userDetailInfo = GetUserDetailById(uid); if (userDetailInfo != null) { return(userDetailInfo.LastVisitTime); } else { return(DateTime.Now); } } else { return(BrnMall.Core.BMAData.RDBS.GetUserLastVisitTimeByUid(uid)); } }
/// <summary> /// 从IDataReader创建UserDetailInfo /// </summary> public static UserDetailInfo BuildUserDetailFromReader(IDataReader reader) { UserDetailInfo userDetailInfo = new UserDetailInfo(); userDetailInfo.UserID = TypeHelper.ObjectToInt(reader["UserID"]); userDetailInfo.RealName = reader["RealName"].ToString(); userDetailInfo.Birthday = TypeHelper.ObjectToDateTime(reader["Birthday"]); userDetailInfo.Gender = TypeHelper.ObjectToInt(reader["gender"]); userDetailInfo.IdCard = reader["idcard"].ToString(); userDetailInfo.RegionId = TypeHelper.ObjectToInt(reader["regionid"]); userDetailInfo.Address = reader["address"].ToString(); userDetailInfo.RegTime = TypeHelper.ObjectToDateTime(reader["regtime"]); userDetailInfo.RegIP = reader["regip"].ToString(); userDetailInfo.LastTime = TypeHelper.ObjectToDateTime(reader["LastTime"]); userDetailInfo.LastIP = reader["lastip"].ToString(); userDetailInfo.Body = reader["Body"].ToString(); return(userDetailInfo); }
public ResultDataInfo <UserDetailInfo> Get(int id) { UserDetailInfo info = new UserDetailInfo(); var roleEntities = this.dbContext.RoleRepository.Select.ToList(); var userEntity = this.dbContext.UserRepository.Select.Where(m => m.Id == id).ToOne(); var userRoleRelsEntities = this.dbContext.UserRoleRepository.Select.Where(m => m.UserId == id).ToList(); info.UserInfo = this.mapper.Map <UserInfo>(userEntity); foreach (var r in userRoleRelsEntities) { var role = roleEntities.FirstOrDefault(m => m.Id == r.RoleId); if (role != null) { info.Roles.Add(this.mapper.Map <RoleInfoOfUser>(role)); } } return(new ResultDataInfo <UserDetailInfo>() { Data = info }); }
public static UserDetailInfo GetUserDetail(string accessToken, string userId) { string url = string.Format("https://oapi.dingtalk.com/user/get?access_token={0}&userid={1}", accessToken, userId); try { string response = HttpRequestHelper.Get(url); UserDetailInfo model = Newtonsoft.Json.JsonConvert.DeserializeObject <UserDetailInfo>(response); if (model != null) { if (model.errcode == 0) { return(model); } } } catch (Exception ex) { throw; } return(null); }
private void userList(UserDetailInfo userList) { if (userList != null) { for (int i = 0; i < userList.Partners.Count; i++) { SelectUserInfo = new UserInfo(); SelectUserInfo.Id = userList.Partners[i].Id; SelectUserInfo.Nickname = userList.Partners[i].Nickname; SelectUserInfo.Icon = userList.Partners[i].Icon; SelectUserInfo.Password = userList.Partners[i].Password; SelectUserInfo.Year = userList.Partners[i].Year; SelectUserInfo.Month = userList.Partners[i].Month; SelectUserInfo.Day = userList.Partners[i].Day; SelectUserInfo.Address = userList.Partners[i].Address; SelectUserInfo.Point = userList.Partners[i].Point; SelectUserInfo.Cash = userList.Partners[i].Cash; SelectUserInfo.Evaluation = userList.Partners[i].Evaluation; SelectUserInfo.Visitors = userList.Partners[i].Visitors; Window1.SelectUserInfoList.Add(SelectUserInfo); } } }
public void markInfo(UserDetailInfo userDetail) { markPan.Children.Clear(); DataGrid moneyGrid = new DataGrid(); DataGridTextColumn col1 = new DataGridTextColumn(); DataGridTextColumn col2 = new DataGridTextColumn(); DataGridTextColumn col3 = new DataGridTextColumn(); moneyGrid.Columns.Add(col1); moneyGrid.Columns.Add(col2); moneyGrid.Columns.Add(col3); col1.Binding = new Binding("buyId"); col2.Binding = new Binding("value"); col3.Binding = new Binding("time"); if (userDetail != null) { for (int j = 0; j < userDetail.EvalHistories.Count; j++) { moneyGrid.Items.Add(new EvalData { buyId = userDetail.EvalHistories[j].BuyerId, value = userDetail.EvalHistories[j].Value.ToString(), time = userDetail.EvalHistories[j].EvalTime.ToString() }); } } col1.Header = "고객아이디"; col2.Header = "평점"; col3.Header = "날자"; markPan.Children.Add(moneyGrid); }
/// <summary> /// 更新用户细节 /// </summary> /// <returns></returns> public static void UpdateUserDetail(UserDetailInfo userDetailInfo) { BrnMall.Data.Users.UpdateUserDetail(userDetailInfo); }
public void listMember(UserDetailInfo user) { this.userList(user); if (user != null) { reqBuyer.Content = user.Partners.Count.ToString(); } DataGrid memberGrid = new DataGrid(); memberGrid.GridLinesVisibility = DataGridGridLinesVisibility.Horizontal; //memberGrid.MouseLeftButtonUp += new MouseButtonEventHandler(selMemberGrid_MouseUp); DataGridTextColumn col1 = new DataGridTextColumn(); DataGridTextColumn col2 = new DataGridTextColumn(); DataGridTextColumn col3 = new DataGridTextColumn(); DataGridTextColumn col4 = new DataGridTextColumn(); DataGridTextColumn col5 = new DataGridTextColumn(); DataGridTextColumn col6 = new DataGridTextColumn(); DataGridTextColumn col7 = new DataGridTextColumn(); memberGrid.Columns.Add(col1); memberGrid.Columns.Add(col2); memberGrid.Columns.Add(col3); memberGrid.Columns.Add(col4); memberGrid.Columns.Add(col5); memberGrid.Columns.Add(col6); memberGrid.Columns.Add(col7); col1.Binding = new Binding("id"); col2.Binding = new Binding("nicName"); col3.Binding = new Binding("cash"); col4.Binding = new Binding("chatSum"); col5.Binding = new Binding("gameSum"); col6.Binding = new Binding("point"); col7.Binding = new Binding("state"); if (user != null) { for (int j = 0; j < user.Partners.Count; j++) { if (user.Partners[j].LoginTime == "") { stateStr = "New ID"; } else { stateStr = "Old ID"; } memberGrid.Items.Add(new ListData { id = user.Partners[j].Id, nicName = user.Partners[j].Nickname, cash = user.Partners[j].Cash, chatSum = user.Partners[j].ChatSum, gameSum = user.Partners[j].GameSum, point = user.Partners[j].Point, state = stateStr }); } } col1.Header = "账号"; col2.Header = "称号"; col3.Header = "元宝"; col4.Header = "聊天"; col5.Header = "游戏"; col6.Header = "积分"; col7.Header = "状态"; memberList.Children.Add(memberGrid); }
public ActionResult UpdateDingTalkUser() { try { DingTalkCorpConfig config = ding.GetAccessToken(); DateTime updatetime = DateTime.Now; if (config.AccessToken != null) { List <DepartmentInfo> deparlist = DingTalk.DingTalkDepartApi.GetDepartmentList(config.AccessToken, "1"); if (deparlist != null && deparlist.Count > 0) { foreach (DepartmentInfo model in deparlist) { List <string> userlist = DingTalk.DingTalkUserApi.GetDepartmentUserId(config.AccessToken, model.Id.ToString()); if (userlist != null && userlist.Count > 0) { foreach (string userid in userlist) { UserDetailInfo user = DingTalk.DingTalkUserApi.GetUserDetail(config.AccessToken, userid); if (user != null) { app.DeleteForm(user.UserId); DingTalkUserEntity entity = new DingTalkUserEntity(); entity.UserId = user.UserId; entity.Active = user.Active; entity.Avatar = user.Avatar; entity.Email = user.Email; entity.HiredDate = user.HiredDate; entity.IsAdmin = user.IsAdmin; entity.IsBoss = user.IsBoss; entity.IsHide = user.IsHide; entity.IsLeader = user.IsLeader; entity.IsSenior = user.IsSenior; entity.JobNumber = user.JobNumber; entity.Mobile = user.Mobile; entity.UserName = user.UserName; entity.OrderInDepts = user.OrderInDepts; entity.Position = user.Position; entity.UpdateTime = updatetime; app.SubmitForm(entity, null); } } } //else //{ // return Error("更新失败。获取用户失败"); //} } app.DeleteForm(updatetime); } else { return(Error("更新失败。获取部门失败")); } } } catch (Exception ex) { return(Error("更新失败:" + ex.Message)); } return(Success("更新成功")); }
/// <summary> /// 更新用户细节 /// </summary> /// <returns></returns> public static bool UpdateUserDetail(UserDetailInfo userDetailInfo) { return(OWZX.Core.BSPData.RDBS.UpdateUserDetail(userDetailInfo)); }
public async Task<IActionResult> RefreshSession() { var __user = new UserDetailInfo { ID = Guid.Parse(User.FindFirst(MyClaimTypes.UserId).Value), Name = User.Identity.Name, Token = Guid.Parse(User.FindFirst(MyClaimTypes.Token).Value), HasMeterValuePermission = Boolean.Parse(User.FindFirst(MyClaimTypes.ValuesPermission).Value), HashValue = User.FindFirst(MyClaimTypes.Hash).Value, Login = User.FindFirst(MyClaimTypes.Login).Value }; var __pw = User.FindFirst(MyClaimTypes.Password).Value; //await _signInManager.RefreshSignInAsync(__user.To<ApplicationUser>()); await _signInManager.PasswordSignInAsync(__user.Login, __pw, isPersistent: true, lockoutOnFailure: false); var _test = HttpContext.Authentication; return new HttpOkResult(); }
/// <summary> /// 更新用户细节 /// </summary> /// <returns></returns> public static void UpdateUserDetail(UserDetailInfo userDetailInfo) { NStore.Data.Users.UpdateUserDetail(userDetailInfo); }
//채팅탭 public void InnerChatting(UserDetailInfo userDetail) { if (chargePan.Children.Count > 0) { return; } detailInfo = userDetail; Microsoft.Windows.Controls.DataGrid chatGrid = new Microsoft.Windows.Controls.DataGrid(); chatGrid.HeadersVisibility = Microsoft.Windows.Controls.DataGridHeadersVisibility.Column; chatGrid.GridLinesVisibility = Microsoft.Windows.Controls.DataGridGridLinesVisibility.Horizontal; chatGrid.Style = (Style)FindResource("DataGridStyle"); chatGrid.RowStyle = (Style)FindResource("rowStyle"); chatGrid.ColumnHeaderStyle = (Style)FindResource("columnHeaderStyle"); chatGrid.Background = new SolidColorBrush(Colors.Transparent); chatGrid.Width = 385; chatGrid.Height = 285; Microsoft.Windows.Controls.DataGridTextColumn col1 = new Microsoft.Windows.Controls.DataGridTextColumn(); col1.Width = 120; Microsoft.Windows.Controls.DataGridTextColumn col2 = new Microsoft.Windows.Controls.DataGridTextColumn(); col2.Width = 100; Microsoft.Windows.Controls.DataGridTextColumn col3 = new Microsoft.Windows.Controls.DataGridTextColumn(); col3.Width = new Microsoft.Windows.Controls.DataGridLength(165, Microsoft.Windows.Controls.DataGridLengthUnitType.Star); chatGrid.Columns.Add(col1); chatGrid.Columns.Add(col2); chatGrid.Columns.Add(col3); col1.Binding = new Binding("nicName"); col2.Binding = new Binding("price"); col3.Binding = new Binding("time"); if (userDetail != null) { for (int j = 0; j < userDetail.ChatHistories.Count; j++) { if (Login._UserInfo.Kind == (int)UserKind.Buyer) { chatGrid.Items.Add(new ChatData { nicName = userDetail.ChatHistories[j].ServicemanId, price = userDetail.ChatHistories[j].ServicePrice.ToString(), time = userDetail.ChatHistories[j].StartTime.ToString() + "-" + userDetail.ChatHistories[j].EndTime.ToString() }); } else if (Login._UserInfo.Kind == (int)UserKind.ServiceWoman) { chatGrid.Items.Add(new ChatData { nicName = userDetail.ChatHistories[j].BuyerId, price = userDetail.ChatHistories[j].ServicePrice.ToString(), time = userDetail.ChatHistories[j].StartTime.ToString() + "-" + userDetail.ChatHistories[j].EndTime.ToString() }); } } } col1.Header = "聊天状态"; col2.Header = "聊天消费额"; col3.Header = "聊天时长"; chatPan.Children.Add(chatGrid); }