예제 #1
0
        /// <summary>
        /// Update into CWStaffSpending
        /// </summary>
        /// <param name="cwstaffspending">CWStaffSpending</param>
        public void UpdateCWStaffSpending(CWStaffSpending cwstaffspending)
        {
            if (cwstaffspending == null)
            {
                return;
            }

            if (this._context.IsAttached(cwstaffspending))
            {
                this._context.CWStaffSpendings.Attach(cwstaffspending);
            }

            this._context.SaveChanges();
        }
예제 #2
0
        /// <summary>
        /// Insert into CWStaffSpending
        /// </summary>
        /// <param name="cwstaffspending">CWStaffSpending</param>
        public void InsertCWStaffSpending(CWStaffSpending cwstaffspending)
        {
            if (cwstaffspending == null)
            {
                return;
            }

            if (!this._context.IsAttached(cwstaffspending))
            {
                this._context.CWStaffSpendings.AddObject(cwstaffspending);
            }

            this._context.SaveChanges();
        }