public UserTask Clone() { UserTask newUserTask = new UserTask(); TaskCategory taskCategory = null; if (this.category != null) { taskCategory = new TaskCategory(); taskCategory.CategoryID = this.category.CategoryID; taskCategory.CategoryName = this.category.CategoryName; taskCategory.InnerSortID = this.category.InnerSortID; taskCategory.UserID = this.category.UserID; } newUserTask.ActivityID = this.activityID; newUserTask.ApplicationName = this.appID; newUserTask.Body = this.body; newUserTask.Category = taskCategory; newUserTask.Emergency = this.emergency; newUserTask.ExpireTime = this.expireTime; newUserTask.Level = this.level; newUserTask.ProcessID = this.processID; newUserTask.ProgramName = this.progID; newUserTask.Purpose = this.purpose; newUserTask.ReadTime = this.readTime; newUserTask.ResourceID = this.resourceID; newUserTask.SendToUserID = this.sendToUserID; newUserTask.SendToUserName = this.SendToUserName; newUserTask.SourceID = this.sourceID; newUserTask.SourceName = this.sourceName; newUserTask.Status = this.status; newUserTask.TaskID = this.taskID; newUserTask.TaskStartTime = this.taskStartTime; newUserTask.TaskTitle = this.taskTitle; newUserTask.TopFlag = this.topFlag; newUserTask.Url = this.url; newUserTask.DeliverTime = this.deliverTime; newUserTask.DraftDepartmentName = this.draftDepartmentName; newUserTask.CompletedTime = this.completedTime; newUserTask.DraftUserID = this.draftUserID; newUserTask.DraftUserName = this.draftUserName; return(newUserTask); }
/// <summary> /// 更新待办箱分类 /// </summary> /// <param name="taskCategory">处理夹对象</param> public void UpdateCategory(TaskCategory taskCategory) { string strSql = ORMapping.GetUpdateSql(taskCategory, TSqlBuilder.Instance); DbHelper.RunSqlWithTransaction(strSql, ConnectionDefine.DBConnectionName); }
/// <summary> /// 添加待办箱分类 /// </summary> /// <param name="taskCategory">处理夹对象</param> public void InsertCategory(TaskCategory taskCategory) { string strSql = ORMapping.GetInsertSql(taskCategory, TSqlBuilder.Instance); DbHelper.RunSqlWithTransaction(strSql); }