Пример #1
0
        public static bool UpdateManagernRecord(Manager theManager)
        {
            if (theManager.ManagerId <= 0)
            {
                throw new ArgumentException("Id del Task Manager no puede ser <= 0");
            }
            try
            {
                ManagerTableAdapter localAdapter = new ManagerTableAdapter();

                localAdapter.UpdateManagerRecord(theManager.Status?1:0,
                                                 theManager.SleepTimeSeconds, theManager.NumberOfOverlapsAllowed, theManager.ManagerId);

                log.Debug("Se modifico el Task Manager con id = " + theManager.ManagerId);
                return(true);
            }
            catch (Exception q)
            {
                log.Error("An error was ocurred while updating Task Manager", q);
                return(false);
            }
        }
Пример #2
0
        public static bool UpdateManagerRecord(int Managerid, bool status,
                                               long sleepTime, int numberOfOverlapsAllowed)
        {
            if (Managerid <= 0)
            {
                throw new ArgumentException("Id del Task Manager no puede ser <= 0");
            }
            try
            {
                ManagerTableAdapter localAdapter = new ManagerTableAdapter();

                localAdapter.UpdateManagerRecord(status ? 1 : 0, sleepTime, numberOfOverlapsAllowed, Managerid);

                log.Debug("Se modifico el Task Manager con id = " + Managerid);
                return(true);
            }
            catch (Exception q)
            {
                log.Error("An error was ocurred while updating Task Manager", q);
                return(false);
            }
        }