//用编辑框数据填充实体 /// <summary> /// 用编辑框数据填充实体 /// </summary> private void BuildEntity() { if (CurrentOperationStatus == OperationStatus.New) { EditEntity = new RightUser { Sysid = Sysid.NewId(""), UserPwd = CryptoHelper.ToMd5("123456"), CreatedBy = GloableData.Instance.UserId }; } else if (CurrentOperationStatus == OperationStatus.Edit) { if (UI.GetValue(chkIsChangePassword) == "1") { EditEntity.UserPwd = CryptoHelper.ToMd5("123456"); } } EditEntity.ModifiedBy = GloableData.Instance.UserId; EditEntity.Department = UI.GetValue(ddlDepName); EditEntity.UserId = UI.GetUpperValue(txtUserId); EditEntity.UserName = UI.GetValue(txtUserName); EditEntity.Email = UI.GetValue(txtEmail); EditEntity.RecordStatus = UI.GetValue(chkIsEnable); }
//用编辑框数据填充实体 /// <summary> /// 用编辑框数据填充实体 /// </summary> private void BuildEntity() { if (CurrentOperationStatus == OperationStatus.New) { EditEntity = new RightUserGroup { Sysid = Sysid.NewId(""), CreatedBy = GloableData.Instance.UserId }; } EditEntity.ModifiedBy = GloableData.Instance.UserId; EditEntity.RecordStatus = UI.GetValue(chkRecordStatus); EditEntity.GroupName = UI.GetValue(txtGroupName); }
//用编辑框数据填充实体 /// <summary> /// 用编辑框数据填充实体 /// </summary> private void BuildEntity() { if (CurrentOperationStatus == OperationStatus.New) { EditEntity = new RightFunctionGroup { Sysid = Sysid.NewId(""), CreatedBy = GloableData.Instance.UserId } } ; EditEntity.ModifiedBy = GloableData.Instance.UserId; EditEntity.GroupName = UI.GetValue(txtFuncGroupName); EditEntity.Sequence = UI.GetInt(txtSequence); EditEntity.RecordStatus = UI.GetValue(chkIsEnable); }
//用编辑框数据填充实体 /// <summary> /// 用编辑框数据填充实体 /// </summary> private void BuildEntity() { if (CurrentOperationStatus == OperationStatus.New) { EditEntity = new RightFunction { Sysid = Sysid.NewId(""), CreatedBy = GloableData.Instance.UserId } } ; EditEntity.ModifiedBy = GloableData.Instance.UserId; EditEntity.FuncCode = UI.GetValue(txtFuncCode); EditEntity.FuncName = UI.GetValue(txtFuncName); EditEntity.FuncParam = UI.GetValue(txtFuncParam); EditEntity.RecordStatus = UI.GetValue(chkIsEnable); }
//用编辑框数据填充实体 /// <summary> /// 用编辑框数据填充实体 /// </summary> private void BuildEntity() { if (CurrentOperationStatus == OperationStatus.New) { EditEntity = new DictionaryItem { Sysid = Sysid.NewId(""), CreatedBy = GloableData.Instance.UserId } } ; EditEntity.Sequence = UI.GetInt(txtSequence); EditEntity.Remark = UI.GetValue(txtRemark); EditEntity.Name = UI.GetValue(txtName); EditEntity.Code = UI.GetValue(txtCode); EditEntity.DictionaryCode = UI.GetValue(ddlDictionaryCode); EditEntity.ModifiedBy = GloableData.Instance.UserId; }
//用编辑框数据填充实体 /// <summary> /// 用编辑框数据填充实体 /// </summary> private List <Right> BuildEntity() { var rights = new List <Right>(); var userGroupSysid = UI.GetValue(ddlUserGroup); foreach (var groupNode in treeRight.Nodes) { foreach (var functionNode in groupNode.Nodes) { foreach (var commandNode in functionNode.Nodes) { if (!commandNode.Checked) { continue; } var rightMenu = commandNode.Tag as RightMenu; if (rightMenu == null) { continue; } var right = new Right { Sysid = Sysid.NewId(""), UserGroupSysid = userGroupSysid, FunctionGroupSysid = rightMenu.GroupSysid, FunctionSysid = rightMenu.FunctionSysid, CommandSysid = rightMenu.CommandSysid, CreatedBy = GloableData.Instance.UserId }; rights.Add(right); } } } return(rights); }