Example #1
0
        public bool Delete()
        {
            EventActivityTable EAT = new EventActivityTable();

            EAT.SetValueProperty(this);
            return(EAT.Delete());
        }
Example #2
0
        public int Insert(JDataBase db = null)
        {
            EventActivityTable AT = new EventActivityTable();

            AT.SetValueProperty(this);
            if (db == null)
            {
                Code = AT.Insert();
            }
            else
            {
                Code = AT.Insert(db);
            }

            return(Code);
            //JDataBase _db = db;
            //if (db == null)
            //    _db = new JDataBase();
            //try
            //{
            //    _db.setQuery(@"
            //            insert into [AUTBusEventActivity] values
            //            (
            //            (select isnull(max(Code),0)+1 from [AUTBusEventActivity] where code < 10000)
            //            ," + Event + @"
            //            ," + activity + @"
            //            ," + Priority + @"
            //            , getdate()
            //            )
            //            select isnull(max(Code),0) from [AUTBusEventActivity] where code < 10000
            //            ");
            //    Code = (int)_db.Query_ExecutSacler();
            //}
            //    finally
            //    {
            //        if (db == null)
            //            _db.Dispose();
            //    }

            //    return Code;
        }