Esempio n. 1
0
        /** INSTANCE METHODS **/

        public bool Save()
        {
            // Get the Display Name
            if (DisplayName.Trim() == String.Empty)
            {
                this.DisplayName = GetDisplayName(this.Username);
            }

            DataAccessLayerBaseClass DBLayer = DataAccessLayerBaseClassHelper.GetDataAccessLayer();

            if (Id <= DefaultValues.GetUserIdMinValue())
            {
                int TempId = DBLayer.CreateNewUser(this);
                if (TempId > 0)
                {
                    _Id = TempId;
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(DBLayer.UpdateUser(this));
            }
        }
Esempio n. 2
0
        /** CONSTRUCTORS **/

        public Issue(int id, int projectId, string title, int categoryId, int milestoneId, int priorityId, int statusId, int assignedId, int ownerId, string creatorUsername)
            : this
            (
                id,
                projectId,
                title,
                categoryId,
                String.Empty,
                milestoneId,
                String.Empty,
                String.Empty,
                priorityId,
                String.Empty,
                String.Empty,
                statusId,
                String.Empty,
                String.Empty,
                String.Empty,
                assignedId,
                String.Empty,
                ownerId,
                creatorUsername,
                DefaultValues.GetUserIdMinValue(),
                creatorUsername,
                DefaultValues.GetDateTimeMinValue()
            )
        {
        }
Esempio n. 3
0
 public Project(int id, string name, string description, string managerDisplayName, string creatorDisplayName, DateTime dateCreated)
     : this(id, name, description, DefaultValues.GetUserIdMinValue(), managerDisplayName, String.Empty, creatorDisplayName, dateCreated)
 {
 }