/// <summary> /// 提交数据可修改相关信息 /// </summary> public void Confirm() { Logger.Instance.WriteLog("保存修改后的用户信息"); UserBasicDao ubdao = new UserBasicDao(); ubdao.Update003(IPTRealName.text, UIRecord.UBInfo.Password, IPTTelphone.value, IPTAddress.value, IPTMemo.value, UIRecord.UBInfo.ID); GroupDao gpDao = new GroupDao(); gpDao.Select003(); List <GroupInfo> gpInfos = gpDao.Result; foreach (GroupInfo info in gpInfos) { if (PPLRole.value == info.Name) { UserGroupDao ugDao = new UserGroupDao(); ugDao.Update001(info.Id, UIRecord.UBInfo.ID); break; } } UserRecordManage.Instance.GetComponent <UserRecordManage> ().ReLoadUserRecord(); Destroy(gameObject); }
public void Confirm() { Logger.Instance.WriteLog("保存修改后的用户信息"); UserRecordItem tempItem = null; if (UIRecord.UBInfo.Status == "新建") { return; } else { UserBasicDao ubdao = new UserBasicDao(); ubdao.Update003(userName.value, UIRecord.UBInfo.Password, userMobile.value, userAdd.value, remark.value, UIRecord.UBInfo.ID); } for (int i = 0; i < Records.transform.childCount; i++) { tempItem = Records.transform.GetChild(i).GetComponent <UserRecordItem>(); if (tempItem.LblAccount.text == UIRecord.UBInfo.UserName) { UIRecord.UBInfo.Telphone = userMobile.value; UIRecord.UBInfo.Address = userAdd.value; UIRecord.UBInfo.RealName = userName.value; UIRecord.UBInfo.Memo = remark.value; break; } } string gstr = string.Empty; foreach (UILabel lab in groups) { if (lab.transform.parent.GetComponent <userGroupItem>().selectToggle.value) { gstr = lab.text; break; } } UIRecord.GInfo.Name = gstr; GroupDao gpDao = new GroupDao(); gpDao.Select003(); List <GroupInfo> gpInfos = gpDao.Result; foreach (GroupInfo info in gpInfos) { if (gstr == info.Name) { UserGroupDao ugDao = new UserGroupDao(); if (UIRecord.UBInfo.Status == "新建") { ugDao.Insert001(UIRecord.UBInfo.ID, info.Id); UIRecord.UBInfo.Status = "正常"; } else { ugDao.Update001(info.Id, UIRecord.UBInfo.ID); break; } } } if (tempItem != null) { tempItem.SetValue(UIRecord); } //ReLoadUserRecord(); }