Exemplo n.º 1
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="folderEntity">文件夹的基类表结构定义</param>
 /// <param name="statusCode">状态返回码</param>
 /// <returns>主键</returns>
 public string Add(BaseFolderEntity folderEntity, out string statusCode)
 {
     string returnValue = string.Empty;
     // 检查文件夹名是否重复
     if (this.Exists(new KeyValuePair<string, object>(BaseFolderEntity.FieldParentId, folderEntity.ParentId), new KeyValuePair<string, object>(BaseFolderEntity.FieldFolderName, folderEntity.FolderName)))
     {
         // 文件夹名已重复
         statusCode = StatusCode.ErrorNameExist.ToString();
     }
     else
     {
         returnValue = this.AddEntity(folderEntity);
         // 运行成功
         statusCode = StatusCode.OKAdd.ToString();
     }
     return returnValue;
 }
Exemplo n.º 2
0
        public string Add(BaseUserInfo userInfo, BaseFolderEntity folderEntity, out string statusCode, out string statusMessage)
        {
            // 写入调试信息
            #if (DEBUG)
                int milliStart = BaseBusinessLogic.StartDebug(userInfo, MethodBase.GetCurrentMethod());
            #endif

            // 加强安全验证防止未授权匿名调用
            #if (!DEBUG)
                LogOnService.UserIsLogOn(userInfo);
            #endif

            statusCode = string.Empty;
            statusMessage = string.Empty;
            string returnValue = string.Empty;
            using (IDbHelper dbHelper = DbHelperFactory.GetHelper(BaseSystemInfo.UserCenterDbType))
            {
                try
                {
                    dbHelper.Open(UserCenterDbConnection);
                    BaseFolderManager folderManager = new BaseFolderManager(dbHelper, userInfo);
                    returnValue = folderManager.Add(folderEntity, out statusCode);
                    statusMessage = folderManager.GetStateMessage(statusCode);
                    BaseLogManager.Instance.Add(dbHelper, userInfo, this.serviceName, MethodBase.GetCurrentMethod());
                }
                catch (Exception ex)
                {
                    BaseExceptionManager.LogException(dbHelper, userInfo, ex);
                    throw ex;
                }
                finally
                {
                    dbHelper.Close();
                }
            }

            // 写入调试信息
            #if (DEBUG)
                BaseBusinessLogic.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
            #endif

            return returnValue;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 批量进行保存
 /// </summary>
 /// <param name="dataTable">数据表</param>
 /// <returns>影响行数</returns>
 public override int BatchSave(DataTable dataTable)
 {
     int returnValue = 0;
     BaseFolderEntity folderEntity = new BaseFolderEntity();
     foreach (DataRow dataRow in dataTable.Rows)
     {
         // 删除状态
         if (dataRow.RowState == DataRowState.Deleted)
         {
             string id = dataRow[BaseFolderEntity.FieldId, DataRowVersion.Original].ToString();
             if (id.Length > 0)
             {
                 returnValue += this.DeleteEntity(id);
             }
         }
         // 被修改过
         if (dataRow.RowState == DataRowState.Modified)
         {
             string id = dataRow[BaseFolderEntity.FieldId, DataRowVersion.Original].ToString();
             if (id.Length > 0)
             {
                 folderEntity.GetFrom(dataRow);
                 returnValue += this.UpdateEntity(folderEntity);
             }
         }
         // 添加状态
         if (dataRow.RowState == DataRowState.Added)
         {
             folderEntity.GetFrom(dataRow);
             returnValue += this.AddEntity(folderEntity).Length > 0 ? 1 : 0;
         }
         if (dataRow.RowState == DataRowState.Unchanged)
         {
             continue;
         }
         if (dataRow.RowState == DataRowState.Detached)
         {
             continue;
         }
     }
     return returnValue;
 }
Exemplo n.º 4
0
        /// <summary>
        /// 重命名
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="id">主键</param>
        /// <param name="newName">新名称</param>
        /// <param name="enabled">有效</param>
        /// <param name="statusCode">状态码</param>
        /// <param name="statusMessage">状态信息</param>
        /// <returns>影响行数</returns>
        public int Rename(BaseUserInfo userInfo, string id, string newName, bool enabled, out string statusCode, out string statusMessage)
        {
            // 写入调试信息
            #if (DEBUG)
                int milliStart = BaseBusinessLogic.StartDebug(userInfo, MethodBase.GetCurrentMethod());
            #endif

            // 加强安全验证防止未授权匿名调用
            #if (!DEBUG)
                LogOnService.UserIsLogOn(userInfo);
            #endif

            statusCode = string.Empty;
            statusMessage = string.Empty;
            int returnValue = 0;

            using (IDbHelper dbHelper = DbHelperFactory.GetHelper(BaseSystemInfo.UserCenterDbType))
            {
                try
                {
                    dbHelper.Open(UserCenterDbConnection);
                    BaseFolderEntity folderEntity = new BaseFolderEntity();
                    BaseFolderManager folderManager = new BaseFolderManager(dbHelper, userInfo);
                    DataTable dataTable = folderManager.GetDataTableById(id);
                    folderEntity.GetSingle(dataTable);
                    folderEntity.FolderName = newName;
                    folderEntity.Enabled = enabled? 1:0;
                    returnValue = folderManager.Update(folderEntity, out statusCode);
                    statusMessage = folderManager.GetStateMessage(statusCode);
                    BaseLogManager.Instance.Add(dbHelper, userInfo, this.serviceName, MethodBase.GetCurrentMethod());
                }
                catch (Exception ex)
                {
                    BaseExceptionManager.LogException(dbHelper, userInfo, ex);
                    throw ex;
                }
                finally
                {
                    dbHelper.Close();
                }
            }

            // 写入调试信息
            #if (DEBUG)
                BaseBusinessLogic.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
            #endif

            return returnValue;
        }
Exemplo n.º 5
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="folderEntity">文件夹的基类表结构定义</param>
 /// <param name="statusCode">状态返回码</param>
 /// <returns>影响行数</returns>
 public int Update(BaseFolderEntity folderEntity, out string statusCode)
 {
     int returnValue = 0;
     //if (DbLogic.IsModifed(DbHelper, BaseFolderEntity.TableName, folderEntity.Id, folderEntity.ModifiedUserId, folderEntity.ModifiedOn))
     //{
     //    // 数据已经被修改
     //    statusCode = StatusCode.ErrorChanged.ToString();
     //}
     //else
     //{
         // 检查文件夹名是否重复
         if (this.Exists(new KeyValuePair<string, object>(BaseFolderEntity.FieldParentId, folderEntity.ParentId), new KeyValuePair<string, object>(BaseFolderEntity.FieldFolderName, folderEntity.FolderName), folderEntity.Id))
         {
             // 文件夹名已重复
             statusCode = StatusCode.ErrorNameExist.ToString();
         }
         else
         {
             returnValue = this.UpdateEntity(folderEntity);
             if (returnValue == 1)
             {
                 // 运行成功
                 statusCode = StatusCode.OKUpdate.ToString();
             }
             else
             {
                 statusCode = StatusCode.ErrorDeleted.ToString();
             }
         }
     //}
     return returnValue;
 }
Exemplo n.º 6
0
        /// <summary>
        /// 检查相应的系统必备文件夹
        /// </summary>
        public void FolderCheck()
        {
            BaseFolderEntity folderEntity = new BaseFolderEntity();
            folderEntity.Enabled = 1;
            folderEntity.AllowDelete = 0;
            folderEntity.AllowEdit = 0;
            folderEntity.Description = AppMessage.FileService_SystemCreateDirectory;
            // 01:判断公司文件夹是否存在?
            if (!this.Exists("CompanyFile"))
            {
                folderEntity.FolderName = AppMessage.FileService_CompanyFile;
                folderEntity.AllowDelete = 0;
                folderEntity.AllowEdit = 0;
                folderEntity.Id = "CompanyFile";
                this.AddEntity(folderEntity);
            }
            // 02:部门文件夹
            if (!string.IsNullOrEmpty(UserInfo.DepartmentId) && !this.Exists(UserInfo.DepartmentId))
            {
                folderEntity.FolderName = UserInfo.DepartmentName;
                folderEntity.ParentId = "CompanyFile";
                folderEntity.AllowDelete = 0;
                folderEntity.AllowEdit = 0;
                folderEntity.Id = UserInfo.DepartmentId;
                this.AddEntity(folderEntity);

                if (this.Exists(UserInfo.DepartmentId + "_Public"))
                {
                    folderEntity = new BaseFolderEntity();
                    folderEntity.FolderName = "公共文档";
                    folderEntity.ParentId = UserInfo.DepartmentId;
                    folderEntity.IsPublic = 1;
                    folderEntity.AllowDelete = 0;
                    folderEntity.AllowEdit = 0;
                    folderEntity.Id = UserInfo.DepartmentId + "_Public";
                    this.AddEntity(folderEntity);
                }
            }
            // 03:用户空间
            /*
            if (!this.Exists("UserSpace"))
            {
                folderEntity.FolderName = AppMessage.FileService_UserSpace;
                folderEntity.AllowDelete = 0;
                folderEntity.AllowEdit = 0;
                folderEntity.Id = "UserSpace";
                this.AddEntity(folderEntity);
            }
            */
            // 04:判断用户的空间是否存在?
            if (!this.Exists(UserInfo.Id))
            {
                folderEntity.FolderName = UserInfo.RealName + AppMessage.FileService_Folder;
                folderEntity.ParentId = "UserSpace";
                if (!string.IsNullOrEmpty(UserInfo.DepartmentId))
                {
                    folderEntity.ParentId = UserInfo.DepartmentId;
                }
                folderEntity.Id = UserInfo.Id;
                folderEntity.AllowDelete = 0;
                folderEntity.AllowEdit = 0;
                this.AddEntity(folderEntity);
            }
            // 05:判断已经已发文件是否存在?
            if (!this.Exists(UserInfo.Id + "_Send"))
            {
                folderEntity.FolderName = AppMessage.FileService_SendFile;
                folderEntity.ParentId = UserInfo.Id;
                folderEntity.AllowDelete = 1;
                folderEntity.AllowEdit = 1;
                folderEntity.Id = UserInfo.Id + "_Send";
                this.AddEntity(folderEntity);
            }
            // 06:判断接收文件是否存在?
            if (!this.Exists(UserInfo.Id + "_Receive"))
            {
                folderEntity.FolderName = AppMessage.FileService_ReceiveFile;
                folderEntity.ParentId = UserInfo.Id;
                folderEntity.AllowDelete = 1;
                folderEntity.AllowEdit = 1;
                folderEntity.Id = UserInfo.Id + "_Receive";
                this.AddEntity(folderEntity);
            }
        }
Exemplo n.º 7
0
partial         void SetEntityExpand(SQLBuilder sqlBuilder, BaseFolderEntity folderEntity);
Exemplo n.º 8
0
        /// <summary>
        /// 发送文件
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="fileName">文件名</param>
        /// <param name="file">文件内容</param>
        /// <param name="toUserId">发送给谁主键</param>
        /// <returns>文件主键</returns>
        public string Send(BaseUserInfo userInfo, string fileName, byte[] file, string toUserId)
        {
            // 写入调试信息
            #if (DEBUG)
                int milliStart = BaseBusinessLogic.StartDebug(userInfo, MethodBase.GetCurrentMethod());
            #endif

            // 加强安全验证防止未授权匿名调用
            #if (!DEBUG)
                LogOnService.UserIsLogOn(userInfo);
            #endif

            string returnValue = string.Empty;
            using (IDbHelper dbHelper = DbHelperFactory.GetHelper(BaseSystemInfo.UserCenterDbType))
            {
                try
                {
                    dbHelper.Open(UserCenterDbConnection);
                    BaseFolderEntity folderEntity = new BaseFolderEntity();
                    BaseFolderManager folderManager = new BaseFolderManager(dbHelper, userInfo);
                    // 检查相应的系统必备文件夹
                    folderManager.FolderCheck();
                    BaseUserEntity userEntity = new BaseUserManager(dbHelper, userInfo).GetEntity(toUserId);
                    if (!string.IsNullOrEmpty(userEntity.Id))
                    {
                        // 04:判断发送者的空间是否存在?
                        // 05:判断已收文件夹是否存在?
                        if (!folderManager.Exists(userEntity.Id.ToString()))
                        {
                            folderEntity.FolderName = userEntity.RealName + AppMessage.FileService_File;
                            folderEntity.ParentId = "UserSpace";
                            folderEntity.Id = userEntity.Id.ToString();
                            folderEntity.Enabled = 1;
                            folderEntity.DeletionStateCode = 0;
                            folderManager.AddEntity(folderEntity);
                        }
                        // 06:判断来自谁的文件夹是否存在?
                        // 07:判断发给谁的文件夹是否存在?
                        if (!folderManager.Exists(toUserId + "_Receive"))
                        {
                            folderEntity.FolderName = AppMessage.FileService_ReceiveFile;
                            folderEntity.ParentId = toUserId;
                            folderEntity.Id = toUserId + "_Receive";
                            folderEntity.Enabled = 1;
                            folderEntity.DeletionStateCode = 0;
                            folderManager.AddEntity(folderEntity);
                        }
                        if (!folderManager.Exists(userInfo.Id + "_Send_" + toUserId))
                        {
                            folderEntity.FolderName = userEntity.RealName + "(" + userEntity.UserName + ")";
                            folderEntity.ParentId = userInfo.Id + "_Send";
                            folderEntity.Id = userInfo.Id + "_Send_" + toUserId;
                            folderEntity.Enabled = 1;
                            folderEntity.DeletionStateCode = 0;
                            folderManager.AddEntity(folderEntity);
                        }
                        if (!folderManager.Exists(toUserId + "_Receive_" + userInfo.Id))
                        {
                            folderEntity.FolderName = userInfo.RealName + "(" + userInfo.UserName + ")";
                            folderEntity.ParentId = toUserId + "_Receive";
                            folderEntity.Id = toUserId + "_Receive_" + userInfo.Id;
                            folderEntity.Enabled = 1;
                            folderEntity.DeletionStateCode = 0;
                            folderManager.AddEntity(folderEntity);
                        }
                        // 08:已发送文件夹多一个文件。
                        // 09:已接收文件夹多一个文件。
                        BaseFileEntity fileEntity = new BaseFileEntity();
                        fileEntity.FileName = fileName;
                        fileEntity.Contents = file;
                        fileEntity.Enabled = 1;
                        fileEntity.ReadCount = 0;
                        fileEntity.FolderId = userInfo.Id + "_Send_" + toUserId;
                        // 把修改人显示出来
                        fileEntity.ModifiedBy = userInfo.RealName;
                        fileEntity.ModifiedUserId = userInfo.Id;
                        fileEntity.ModifiedOn = DateTime.Now;
                        BaseFileManager fileManager = new BaseFileManager(dbHelper, userInfo);
                        fileManager.AddEntity(fileEntity);
                        fileEntity.FolderId = toUserId + "_Receive_" + userInfo.Id;
                        returnValue = fileManager.AddEntity(fileEntity);
                        // string webHostUrl = BaseSystemInfo.WebHostUrl;
                        // if (string.IsNullOrEmpty(webHostUrl))
                        // {
                        //    webHostUrl = "WebHostUrl";
                        // }
                        // 10:应该还发一个短信提醒一下才对。
                        BaseMessageEntity messageEntity = new BaseMessageEntity();
                        messageEntity.Id = Guid.NewGuid().ToString();
                        messageEntity.CategoryCode = MessageCategory.Send.ToString();
                        messageEntity.FunctionCode = MessageFunction.Message.ToString();
                        messageEntity.ObjectId = returnValue;
                        messageEntity.ReceiverId = toUserId;
                        // target=\"_blank\"
                        messageEntity.Contents = AppMessage.FileService_SendFileFrom + " <a href={WebHostUrl}Download.aspx?Id=" + returnValue + ">" + fileName + "</a>" + AppMessage.FileService_CheckReceiveFile;
                        messageEntity.IsNew = (int)MessageStateCode.New;
                        messageEntity.ReadCount = 0;
                        messageEntity.DeletionStateCode = 0;
                        messageEntity.Enabled = 1;
                        BaseMessageManager messageManager = new BaseMessageManager(dbHelper, userInfo);
                        returnValue = messageManager.Add(messageEntity);
                    }
                    BaseLogManager.Instance.Add(dbHelper, userInfo, this.serviceName, MethodBase.GetCurrentMethod());
                }
                catch (Exception ex)
                {
                    BaseExceptionManager.LogException(dbHelper, userInfo, ex);
                    throw ex;
                }
                finally
                {
                    dbHelper.Close();
                }
            }

            // 写入调试信息
            #if (DEBUG)
                BaseBusinessLogic.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
            #endif

            return returnValue;
        }
Exemplo n.º 9
0
 /// <summary>
 /// 更新实体
 /// </summary>
 /// <param name="baseFolderEntity">实体</param>
 public int UpdateEntity(BaseFolderEntity baseFolderEntity)
 {
     SQLBuilder sqlBuilder = new SQLBuilder(DbHelper);
     sqlBuilder.BeginUpdate(this.CurrentTableName);
     this.SetEntity(sqlBuilder, baseFolderEntity);
     if (UserInfo != null)
     {
         sqlBuilder.SetValue(BaseFolderEntity.FieldModifiedUserId, UserInfo.Id);
         sqlBuilder.SetValue(BaseFolderEntity.FieldModifiedBy, UserInfo.RealName);
     }
     sqlBuilder.SetDBNow(BaseFolderEntity.FieldModifiedOn);
     sqlBuilder.SetWhere(BaseFolderEntity.FieldId, baseFolderEntity.Id);
     return sqlBuilder.EndUpdate();
 }
Exemplo n.º 10
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="baseFolderEntity">实体</param>
 public int Update(BaseFolderEntity baseFolderEntity)
 {
     return this.UpdateEntity(baseFolderEntity);
 }
Exemplo n.º 11
0
 /// <summary>
 /// 获取实体
 /// </summary>
 /// <param name="id">主键</param>
 public BaseFolderEntity GetEntity(string id)
 {
     BaseFolderEntity baseFolderEntity = new BaseFolderEntity(this.GetDataTable(new KeyValuePair<string, object>(BaseFolderEntity.FieldId, id)));
     return baseFolderEntity;
 }
Exemplo n.º 12
0
 /// <summary>
 /// 添加实体
 /// </summary>
 /// <param name="baseFolderEntity">实体</param>
 public string AddEntity(BaseFolderEntity baseFolderEntity)
 {
     string sequence = string.Empty;
     this.Identity = false;
     if (baseFolderEntity.SortCode == null || baseFolderEntity.SortCode == 0)
     {
         BaseSequenceManager sequenceManager = new BaseSequenceManager(DbHelper, this.Identity);
         sequence = sequenceManager.GetSequence(this.CurrentTableName);
         baseFolderEntity.SortCode = int.Parse(sequence);
     }
     if (baseFolderEntity.Id != null)
     {
         sequence = baseFolderEntity.Id.ToString();
     }
     SQLBuilder sqlBuilder = new SQLBuilder(DbHelper, this.Identity, this.ReturnId);
     sqlBuilder.BeginInsert(this.CurrentTableName, BaseFolderEntity.FieldId);
     if (!this.Identity)
     {
         if (string.IsNullOrEmpty(baseFolderEntity.Id))
         {
             sequence = BaseBusinessLogic.NewGuid();
             baseFolderEntity.Id = sequence ;
         }
         sqlBuilder.SetValue(BaseFolderEntity.FieldId, baseFolderEntity.Id);
     }
     else
     {
         if (!this.ReturnId && (DbHelper.CurrentDbType == DbTypes.Oracle || DbHelper.CurrentDbType == DbTypes.DB2))
         {
             if (DbHelper.CurrentDbType == DbTypes.Oracle)
             {
                 sqlBuilder.SetFormula(BaseFolderEntity.FieldId, "SEQ_" + this.CurrentTableName.ToUpper() + ".NEXTVAL ");
             }
             if (DbHelper.CurrentDbType == DbTypes.DB2)
             {
                 sqlBuilder.SetFormula(BaseFolderEntity.FieldId, "NEXT VALUE FOR SEQ_" + this.CurrentTableName.ToUpper());
             }
         }
         else
         {
             if (this.Identity && (DbHelper.CurrentDbType == DbTypes.Oracle || DbHelper.CurrentDbType == DbTypes.DB2))
             {
                 if (string.IsNullOrEmpty(baseFolderEntity.Id))
                 {
                     if (string.IsNullOrEmpty(sequence))
                     {
                         BaseSequenceManager sequenceManager = new BaseSequenceManager(DbHelper, this.Identity);
                         sequence = sequenceManager.GetSequence(this.CurrentTableName);
                     }
                     baseFolderEntity.Id = sequence;
                 }
                 sqlBuilder.SetValue(BaseFolderEntity.FieldId, baseFolderEntity.Id);
             }
         }
     }
     this.SetEntity(sqlBuilder, baseFolderEntity);
     if (UserInfo != null)
     {
         sqlBuilder.SetValue(BaseFolderEntity.FieldCreateUserId, UserInfo.Id);
         sqlBuilder.SetValue(BaseFolderEntity.FieldCreateBy, UserInfo.RealName);
     }
     sqlBuilder.SetDBNow(BaseFolderEntity.FieldCreateOn);
     if (UserInfo != null)
     {
         sqlBuilder.SetValue(BaseFolderEntity.FieldModifiedUserId, UserInfo.Id);
         sqlBuilder.SetValue(BaseFolderEntity.FieldModifiedBy, UserInfo.RealName);
     }
     sqlBuilder.SetDBNow(BaseFolderEntity.FieldModifiedOn);
     if (this.Identity && (DbHelper.CurrentDbType == DbTypes.SqlServer || DbHelper.CurrentDbType == DbTypes.Access))
     {
         sequence = sqlBuilder.EndInsert().ToString();
     }
     else
     {
         sqlBuilder.EndInsert();
     }
     return sequence;
 }
Exemplo n.º 13
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="baseFolderEntity">实体</param>
 /// <param name="identity">自增量方式</param>
 /// <param name="returnId">返回主键</param>
 /// <returns>主键</returns>
 public string Add(BaseFolderEntity baseFolderEntity, bool identity, bool returnId)
 {
     this.Identity = identity;
     this.ReturnId = returnId;
     return this.AddEntity(baseFolderEntity);
 }
Exemplo n.º 14
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="baseFolderEntity">实体</param>
 /// <returns>主键</returns>
 public string Add(BaseFolderEntity baseFolderEntity)
 {
     return this.AddEntity(baseFolderEntity);
 }
Exemplo n.º 15
0
 /// <summary>
 /// 设置实体
 /// </summary>
 /// <param name="folderEntity">实体</param>
 private void SetEntity(SQLBuilder sqlBuilder, BaseFolderEntity folderEntity)
 {
     sqlBuilder.SetValue(BaseFolderEntity.FieldParentId, folderEntity.ParentId);
     sqlBuilder.SetValue(BaseFolderEntity.FieldFolderName, folderEntity.FolderName);
     sqlBuilder.SetValue(BaseFolderEntity.FieldStateCode, folderEntity.StateCode);
     sqlBuilder.SetValue(BaseFolderEntity.FieldSortCode, folderEntity.SortCode);
     sqlBuilder.SetValue(BaseFolderEntity.FieldAllowEdit, folderEntity.AllowEdit);
     sqlBuilder.SetValue(BaseFolderEntity.FieldAllowDelete, folderEntity.AllowDelete);
     sqlBuilder.SetValue(BaseFolderEntity.FieldIsPublic, folderEntity.IsPublic);
     sqlBuilder.SetValue(BaseFolderEntity.FieldEnabled, folderEntity.Enabled);
     sqlBuilder.SetValue(BaseFolderEntity.FieldDeletionStateCode, folderEntity.DeletionStateCode);
     sqlBuilder.SetValue(BaseFolderEntity.FieldDescription, folderEntity.Description);
     SetEntityExpand(sqlBuilder, folderEntity);
 }
Exemplo n.º 16
0
 private BaseFolderEntity GetEntity()
 {
     BaseFolderEntity folderEntity = new BaseFolderEntity();
     folderEntity.ParentId = this.ucFolder.SelectedId;
     folderEntity.FolderName = this.txtFolderName.Text;
     folderEntity.Enabled = this.chkEnabled.Checked ? 1:0;
     folderEntity.Description = this.txtDescription.Text;
     return folderEntity;
 }
Exemplo n.º 17
0
 /// <summary>
 /// 加载窗体
 /// </summary>
 public override void FormOnLoad()
 {
     // 文件夹信息
     this.folderEntity = DotNetService.Instance.FolderService.GetEntity(UserInfo, this.FolderId);
     // 显示内容
     this.ShowEntity();
     this.ActiveControl = this.txtFolderName;
     // 定位焦点
     this.txtFolderName.Focus();
 }