Esempio n. 1
0
        public void AddTaskStatement(string taskStatementText)
        {
            TaskStatement currentTaskStatement = new TaskStatement();

            currentTaskStatement.TaskStatementID   = -1;
            currentTaskStatement.TaskStatementText = taskStatementText;
            currentTaskStatement.Add();
        }
Esempio n. 2
0
        public void UpdateTaskStatement(long taskStatementID, string taskStatementText)
        {
            TaskStatement currentTaskStatement = new TaskStatement(taskStatementID);

            currentTaskStatement.TaskStatementID   = taskStatementID;
            currentTaskStatement.TaskStatementText = taskStatementText;

            currentTaskStatement.Update();
        }
Esempio n. 3
0
        internal static List <TaskStatement> GetCollection(DataTable dataItems)
        {
            List <TaskStatement> listCollection = new List <TaskStatement>();
            TaskStatement        current        = null;

            if (dataItems != null)
            {
                for (int i = 0; i < dataItems.Rows.Count; i++)
                {
                    current = new TaskStatement(dataItems.Rows[i]);
                    listCollection.Add(current);
                }
            }
            else
            {
                throw new Exception("You cannot create a TaskStatement collection from a null data table.");
            }

            return(listCollection);
        }
Esempio n. 4
0
        public void DeleteTaskStatement(long taskStatementID)
        {
            TaskStatement currentTaskStatement = new TaskStatement(taskStatementID);

            currentTaskStatement.Delete();
        }
Esempio n. 5
0
        /// <summary>
        /// Determines whether the specified System.Object is equal to the current object.
        /// </summary>
        /// <param name="obj">The System.Object to compare with the current object.</param>
        /// <returns>Returns true if the specified System.Object is equal to the current object; otherwise, false.</returns>
        public override bool Equals(Object obj)
        {
            TaskStatement TaskStatementobj = obj as TaskStatement;

            return((TaskStatementobj == null) ? false : (this.TaskStatementID == TaskStatementobj.TaskStatementID));
        }