⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 issue.cs

📁 BugNET is an issue tracking and project issue management solution built using the ASP.NET web applic
💻 CS
📖 第 1 页 / 共 3 页
字号:
			{
				get{return (_CreatorDisplayName);}
			}

			/// <summary>
			/// Reporter User Name
			/// </summary>
			public string CreatorUserName 
			{
				get{return (_CreatorUserName);}
			}

            /// <summary>
            /// Gets the reporter user id.
            /// </summary>
            /// <value>The reporter user id.</value>
			public Guid CreatorUserId 
			{
				get{return (_CreatorUserId);}
			}

            /// <summary>
            /// Gets the owner username.
            /// </summary>
            /// <value>The owner username.</value>
            public string OwnerUserName
            {
                get{ return (_OwnerUserName);}
                set{ _OwnerUserName = value;}
            }


            /// <summary>
            /// Gets the display name of the owner.
            /// </summary>
            /// <value>The display name of the owner.</value>
            public string OwnerDisplayName
            {
                get { return (_OwnerDisplayName); }
            }

            /// <summary>
            /// Gets or sets the owner id.
            /// </summary>
            /// <value>The owner id.</value>
            public Guid OwnerUserId
            {
                get{ return (_OwnerUserId); }
                set{ _OwnerUserId = value;}
            }
            /// <summary>
            /// Gets or sets the assigned to user id.
            /// </summary>
            /// <value>The assigned to user id.</value>
			public Guid AssignedUserId
			{
				get{ return (_AssignedUserId);}
				set{ _AssignedUserId = value;}
			}

            /// <summary>
            /// Gets the date created.
            /// </summary>
            /// <value>The date created.</value>
			public DateTime DateCreated 
			{
				get{return (_DateCreated);}
			}

            /// <summary>
            /// Gets the id.
            /// </summary>
            /// <value>The id.</value>
			public int Id 
			{
				get{return (_Id);}
			}

            /// <summary>
            /// Gets the full id.
            /// </summary>
            /// <value>The full id.</value>
			public string FullId 
			{
				get{return (string.Concat(_ProjectCode,"-",_Id));}
			}

            /// <summary>
            /// Gets the last update.
            /// </summary>
            /// <value>The last update.</value>
			public DateTime LastUpdate
			{
				get{return (_LastUpdate);}
			}

            /// <summary>
            /// Gets the due date.
            /// </summary>
            /// <value>The due date.</value>
            public DateTime DueDate
            {
                get{ return (_DueDate); }
                set{ _DueDate = value;}
            }

            /// <summary>
            /// Gets the name of the last update display.
            /// </summary>
            /// <value>The name of the last update display.</value>
			public string LastUpdateDisplayName
			{
				get{return (_LastUpdateDisplayName);}
			}

            /// <summary>
            /// Gets or sets the name of the last update user.
            /// </summary>
            /// <value>The name of the last update user.</value>
			public string LastUpdateUserName
			{
				get{
					if (string.IsNullOrEmpty(_LastUpdateUserName))
						return string.Empty;
					else
						return _LastUpdateUserName;
				}
				set{_LastUpdateUserName = value;}
			}

            /// <summary>
            /// Gets or sets the version id.
            /// </summary>
            /// <value>The version id.</value>
            public int MilestoneId
            {
                get{ return _MilestoneId; }
                set{ _MilestoneId = value; }
            }

            /// <summary>
            /// Gets the name of the version.
            /// </summary>
            /// <value>The name of the version.</value>
			public string MilestoneName 
			{
				get {return _MilestoneName; }
			}

            /// <summary>
            /// Gets the milestone image URL.
            /// </summary>
            /// <value>The milestone image URL.</value>
            public string MilestoneImageUrl
            {
                get { return _MilestoneImageUrl; }
            }


            /// <summary>
            /// Gets or sets the type id.
            /// </summary>
            /// <value>The type id.</value>
			public int IssueTypeId 
			{
				get {return _IssueTypeId;}
				set {_IssueTypeId=value; }
			}

            /// <summary>
            /// Gets the name of the type.
            /// </summary>
            /// <value>The name of the type.</value>
			public string IssueTypeName 
			{
				get {return _IssueTypeName; }
			}

            /// <summary>
            /// Gets the issue type image URL.
            /// </summary>
            /// <value>The issue type image URL.</value>
            public string IssueTypeImageUrl
            {
                get { return _IssueTypeImageUrl; }
            }


            /// <summary>
            /// Gets or sets the resolution id.
            /// </summary>
            /// <value>The resolution id.</value>
			public int ResolutionId 
			{
				get {return _ResolutionId; }
				set {_ResolutionId=value; }
			}

            /// <summary>
            /// Gets the name of the resolution.
            /// </summary>
            /// <value>The name of the resolution.</value>
			public string ResolutionName 
			{
				get {return _ResolutionName; }
			}

            /// <summary>
            /// Gets the resolution image URL.
            /// </summary>
            /// <value>The resolution image URL.</value>
            public string ResolutionImageUrl
            {
                get { return _ResolutionImageUrl; }
            }


            /// <summary>
            /// Gets or sets the priority id.
            /// </summary>
            /// <value>The priority id.</value>
			public int PriorityId 
			{
				get {return _PriorityId; }
				set {_PriorityId=value; }
			}

            /// <summary>
            /// Gets the name of the priority.
            /// </summary>
            /// <value>The name of the priority.</value>
			public string PriorityName 
			{
				get {return _PriorityName; }
			}

            /// <summary>
            /// Gets the priority image URL.
            /// </summary>
            /// <value>The priority image URL.</value>
            public string PriorityImageUrl
            {
                get { return _PriorityImageUrl; }
            }


            /// <summary>
            /// Gets the project id.
            /// </summary>
            /// <value>The project id.</value>
			public int ProjectId 
			{
				get {return _ProjectId; }
			}

            /// <summary>
            /// Gets the name of the project.
            /// </summary>
            /// <value>The name of the project.</value>
			public string ProjectName
			{
				get {return _ProjectName; }
			}

            /// <summary>
            /// Gets the project code.
            /// </summary>
            /// <value>The project code.</value>
			public string ProjectCode
			{
				get {return _ProjectCode; }
			}

            /// <summary>
            /// Gets or sets the status id.
            /// </summary>
            /// <value>The status id.</value>
			public int StatusId 
			{
				get {return _StatusId; }
				set {_StatusId=value; }
			}

            /// <summary>
            /// Gets the name of the status.
            /// </summary>
            /// <value>The name of the status.</value>
			public string StatusName 
			{
				get {return _StatusName; }
			}

            /// <summary>
            /// Gets the status image URL.
            /// </summary>
            /// <value>The status image URL.</value>
            public string StatusImageUrl
            {
                get { return _StatusImageUrl; }
            }


            /// <summary>
            /// Gets or sets the summary.
            /// </summary>
            /// <value>The summary.</value>
			public string Title
			{
				get 
				{
					if (_Title == null ||_Title.Length==0)
						return string.Empty;
					else
						return _Title;
				}
				set{ _Title=value;}
			}

            /// <summary>
            /// Gets or sets the description.
            /// </summary>
            /// <value>The description.</value>
			public string Description
			{
				get 
				{
					if (_Description == null ||_Description.Length==0)
						return string.Empty;
					else
						return _Description;
				}
				set{_Description=value;}
			}

		#endregion

		#region Instance Methods
			/// <summary>
			/// Saves the bug
			/// </summary>
			/// <returns></returns>
			public bool Save() 
			{			
				if (Id <= Globals.NewId) 
				{
					int TempId = DataProviderManager.Provider.CreateNewIssue(this);

					if (TempId>0) 
					{						
						_Id = TempId;					

                        //TODO:Re-implement this as project notification.
						// Add project manager to email notification
                        //Project currentProject = Project.GetProjectById(this.ProjectId);
                        //IssueNotification projectManagerNotification = new IssueNotification(this.Id, currentProject.ManagerUserName);
                        //projectManagerNotification.Save();
						return true;
					} 
					else
						return false;
				} 
				else 
				{
                    List<IssueHistory> issueChanges = GetIssueChanges();
					if (issueChanges.Count > 0)
                    {
                       
						bool result = DataProviderManager.Provider.UpdateIssue(this);
                        if (result)
                        {
                            //Update IssueHistory table for any changes made
                            string changes = UpdateIssueHistory(issueChanges);
                            IssueNotification.SendIssueNotifications(Id,changes);
                            if (_NewAssignee)
                                IssueNotification.SendNewAssigneeNotification(Id, this.AssignedDisplayName);
                        }
						return result;
					}
					return true;
					
				
				}
			}
			
            /// <summary>
            /// Updates the IssueHistory objects in the changes arraylist
            /// </summary>
            /// <param name="issueChanges">The issue changes.</param>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -