//新增数据 /// <summary> /// 新增数据 /// </summary> /// <returns></returns> internal override bool Add() { EditEntity = null; pageViewMain.SelectedPage = pageEditData; UI.ClearUi(pageEditData); UI.ReadOnlyUi(pageEditData, false); return(true); }
//用编辑框数据填充实体 /// <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> /// <returns></returns> internal override bool Delete() { if (EditEntity == null) { UI.ShowWarn("请选择待删除数据"); return(false); } if (!UI.Confirm("确定要删除吗?")) { return(false); } if (!RightUserGroupBll.DeleteRightUserGroup(EditEntity)) { UI.ShowError("删除失败"); return(false); } EditEntity = null; UI.ClearUi(pageEditData); return(true); }