private void AddUser() { LSRequest.qq("userName"); string str = LSRequest.qq("userPassword"); string str2 = LSRequest.qq("userNicker"); string str3 = LSRequest.qq("qx"); string str4 = LSRequest.qq("unlock"); string message = ""; if (!base.ValidParamByUserEdit("child", ref message, null, null, null)) { base.Response.Write(base.ShowDialogBox(message, null, 400)); base.Response.End(); } if (!string.IsNullOrEmpty(str.Trim()) && !Regexlib.IsValidPassword(str.Trim(), base.get_GetPasswordLU())) { if (base.get_GetPasswordLU().Equals("1")) { base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", null, 400)); } else { base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", null, 400)); } base.Response.End(); } cz_users_child _child = new cz_users_child(); _child.set_u_id(this.u_id.ToString().ToUpper()); _child.set_u_nicker(str2.Trim()); if (!string.IsNullOrEmpty(str4) && (str4 == "1")) { _child.set_retry_times(0); } if (!string.IsNullOrEmpty(str)) { string ramSalt = Utils.GetRamSalt(6); _child.set_u_psw(DESEncrypt.EncryptString(str, ramSalt)); _child.set_salt(ramSalt); } _child.set_permissions_name(str3.Trim()); cz_users_child userByUID = CallBLL.cz_users_child_bll.GetUserByUID(_child.get_u_id()); if (CallBLL.cz_users_child_bll.UpdateUser(_child)) { base.user_edit_children_log(userByUID, _child); base.Response.Write(base.ShowDialogBox("修改子帳號成功!", base.UserReturnBackUrl, 0)); base.Response.End(); } else { base.Response.Write(base.ShowDialogBox("修改子帳號失敗!", base.UserReturnBackUrl, 400)); base.Response.End(); } }
private void AddUser() { string str = LSRequest.qq("userName").ToLower().Trim(); string str2 = LSRequest.qq("userPassword"); string str3 = LSRequest.qq("userNicker"); string str4 = LSRequest.qq("qx"); string message = ""; if (!base.ValidParamByUserAdd("child", ref message, null, null, null)) { base.Response.Write(base.ShowDialogBox(message, null, 400)); base.Response.End(); } if (!Regexlib.IsValidPassword(str2.Trim(), base.get_GetPasswordLU())) { if (base.get_GetPasswordLU().Equals("1")) { base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", null, 400)); } else { base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", null, 400)); } base.Response.End(); } cz_users_child model = new cz_users_child(); model.set_u_id(Guid.NewGuid().ToString().ToUpper()); model.set_u_name(str.Trim()); model.set_u_nicker(str3.Trim()); model.set_u_skin(base.GetUserSkin("agent")); string ramSalt = Utils.GetRamSalt(6); model.set_u_psw(DESEncrypt.EncryptString(str2, ramSalt)); model.set_salt(ramSalt); model.set_parent_u_name(this.Session["user_name"].ToString()); model.set_add_date(new DateTime?(DateTime.Now)); model.set_status(0); model.set_permissions_name(str4.Trim()); if (CallBLL.cz_users_child_bll.AddUser(model)) { base.user_add_children_log(model); base.Response.Write(base.ShowDialogBox("添加子帳號成功!", base.UserReturnBackUrl, 0)); base.Response.End(); } else { base.Response.Write(base.ShowDialogBox("添加子帳號失敗!", base.UserReturnBackUrl, 400)); base.Response.End(); } }
private void AddUser() { LSRequest.qq("cloneName"); string str = LSRequest.qq("password"); string str2 = LSRequest.qq("nicker"); string str3 = LSRequest.qq("qx"); string str4 = LSRequest.qq("isLocked"); string message = ""; if (!base.ValidParamByUserEditPhone("child", ref message, null, null, null)) { base.noRightOptMsg(message); } if (!string.IsNullOrEmpty(str.Trim()) && !Regexlib.IsValidPassword(str.Trim(), base.get_GetPasswordLU())) { if (base.get_GetPasswordLU().Equals("1")) { base.noRightOptMsg("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!"); } else { base.noRightOptMsg("密碼要8-20位,且必需包含字母、和数字!"); } } cz_users_child _child = new cz_users_child(); _child.set_u_id(this.u_id.ToString().ToUpper()); _child.set_u_nicker(str2.Trim()); if (!string.IsNullOrEmpty(str4) && (str4 == "1")) { _child.set_retry_times(0); } if (!string.IsNullOrEmpty(str)) { string ramSalt = Utils.GetRamSalt(6); _child.set_u_psw(DESEncrypt.EncryptString(str, ramSalt)); _child.set_salt(ramSalt); } _child.set_permissions_name(str3.Trim()); cz_users_child userByUID = CallBLL.cz_users_child_bll.GetUserByUID(_child.get_u_id()); if (CallBLL.cz_users_child_bll.UpdateUser(_child)) { base.user_edit_children_log(userByUID, _child); base.successOptMsg("修改子帳號成功!"); } else { base.noRightOptMsg("修改子帳號失敗!"); } }