Esempio n. 1
0
        /// <summary>
        /// Returns a list of WorkflowNote objects
        /// </summary>
        /// <param name="positionDescriptionID">Position Description ID</param>
        /// <param name="dummy">Not used. Any value would be fine. This parameter is uses solely to resolve function signature ambiguity (same function  name, same number of parameters and parameter type)</param>
        /// <returns>a list of WorkflowNote objects</returns>
        public static List <WorkflowNote> GetByPositionDescriptionID(long positionDescriptionID, bool dummy)
        {
            List <WorkflowNote> list = null;

            try
            {
                DbCommand commandWrapper = GetDbCommand("spr_GetWorkflowNoteByPositionDescriptionID");
                commandWrapper.Parameters.Add(new SqlParameter("@positionDescriptionID", positionDescriptionID));

                DataTable table = ExecuteDataTable(commandWrapper);

                list = WorkflowNote.GetCollection(table);
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(list);
        }
Esempio n. 2
0
        internal static List <WorkflowNote> GetCollection(DataTable dataItems)
        {
            List <WorkflowNote> listCollection = new List <WorkflowNote>();
            WorkflowNote        current        = null;

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

            return(listCollection);
        }
Esempio n. 3
0
        public static List <WorkflowNote> GetByWorkflowRecordID(int workflowRecordID)
        {
            List <WorkflowNote> list = null;

            DbCommand commandWrapper = GetDbCommand("spr_GetWorkflowNoteByWorkflowRecID");

            try
            {
                commandWrapper.Parameters.Add(new SqlParameter("@workflowRecID", workflowRecordID));

                DataTable table = ExecuteDataTable(commandWrapper);

                list = WorkflowNote.GetCollection(table);
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(list);
        }
Esempio n. 4
0
        public List <WorkflowNote> GetWorkflowNote()
        {
            List <WorkflowNote> childDataCollection = null;

            if (base.ValidateKeyField(this._workflowRecID))
            {
                try
                {
                    DataTable dt = ExecuteDataTable("spr_GetWorkflowNoteByWorkflowStatusID", this._workflowRecID);

                    // fill collection list
                    childDataCollection = WorkflowNote.GetCollection(dt);
                }
                catch (Exception ex)
                {
                    HandleException(ex);
                }
            }

            return(childDataCollection);
        }
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)
        {
            WorkflowNote WorkflowNoteobj = obj as WorkflowNote;

            return((WorkflowNoteobj == null) ? false : (this.WorkflowNoteID == WorkflowNoteobj.WorkflowNoteID));
        }