Esempio n. 1
0
        //Audit Trail methods

        //Evaluates Initialize when->Reading record formulas specified at the data access layer
        protected virtual void BaitTypesRecord_ReadRecord(Object sender, System.EventArgs e)
        {
            //Apply Initialize->Reading record formula only if validation is successful.
            BaitTypesRecord BaitTypesRec = (BaitTypesRecord)sender;

            if (BaitTypesRec != null && !BaitTypesRec.IsReadOnly)
            {
            }
        }
Esempio n. 2
0
        //Evaluates Initialize when->Updating formulas specified at the data access layer
        protected virtual void BaitTypesRecord_UpdatingRecord(Object sender, System.ComponentModel.CancelEventArgs e)
        {
            //Apply Initialize->Updating formula only if validation is successful.
            BaitTypesRecord BaitTypesRec = (BaitTypesRecord)sender;

            Validate_Updating();
            if (BaitTypesRec != null && !BaitTypesRec.IsReadOnly)
            {
                BaitTypesRec.Parse(EvaluateFormula("UserID()", this, null), BaitTypesTable.UpdatedBy);
                BaitTypesRec.Parse(EvaluateFormula("Today()", this, null), BaitTypesTable.UpdatedOn);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// This is a shared function that can be used to get a BaitTypesRecord record using a where and order by clause.
        /// </summary>
        public static BaitTypesRecord GetRecord(BaseFilter join, string where, OrderBy orderBy)
        {
            SqlFilter whereFilter = null;

            if (where != null && where.Trim() != "")
            {
                whereFilter = new SqlFilter(where);
            }

            ArrayList recList = BaitTypesTable.Instance.GetRecordList(join, whereFilter, null, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MIN_BATCH_SIZE);

            BaitTypesRecord rec = null;

            if (recList.Count > 0)
            {
                rec = (BaitTypesRecord)recList[0];
            }

            return(rec);
        }