public void AddNewUser() { Logger.Instance.WriteLog("保存新创建的用户信息"); UserBasicDao ubdao = new UserBasicDao(); ubdao.Insert001(accountName.value, UIRecord.UBInfo.Password, userName.value, userMobile.value, System.DateTime.Now.ToString("yyyy年MM月dd日 HH:mm:ss"), userAdd.value, "正常", remark.value); ubdao.Select003(accountName.value); UserBasicInfo ubInfo = ubdao.Result [0]; string goupId = "1"; foreach (UILabel lb in groups) { if (lb.transform.parent.GetComponent <userGroupItem>().selectToggle.value) { goupId = lb.transform.parent.GetComponent <userGroupItem>().info.Id; } } UserGroupDao ugpDao = new UserGroupDao(); ugpDao.Insert001(ubInfo.ID, goupId); ReLoadUserRecord(); newBtn.SetActive(true); updateBtn.SetActive(false); }
/// <summary> /// 确定创建用户 /// </summary> public void Comfirm() { Logger.Instance.WriteLog("保存新创建的用户信息"); UserBasicDao ubdao = new UserBasicDao(); ubdao.Insert001(IPTAccount.value, IPTPassword.value, IPTRealName.value, IPTTelphone.value, System.DateTime.Now.ToString("yyyy年MM月dd日 HH:mm:ss"), IPTAddress.value, "正常", IPTMemo.value); ubdao.Select003(IPTAccount.value); UserBasicInfo ubInfo = ubdao.Result [0]; string goupId = "1"; foreach (GroupInfo info in Groups) { if (PPLGroup.value == info.Name) { goupId = info.Id; break; } } UserGroupDao ugpDao = new UserGroupDao(); ugpDao.Insert001(ubInfo.ID, goupId); UserRecordManage.Instance.GetComponent <UserRecordManage> ().ReLoadUserRecord(); Destroy(gameObject); }