コード例 #1
0
        public void Edit(WorkstationJob element)
        {
            try
            {
                if (element == null)
                {
                    throw new ArgumentNullException("element", "WorkstationJob can not be null");
                }

                WorkstationJob obj = this.workstationJobs.Find(p => p.Guid == element.Guid);
                if (obj == null)
                {
                    throw new ArgumentNullException("element", "WorkstationJob doesn't find");
                }
                else
                {
                    this.workstationJobs.Remove(obj);
                    this.workstationJobs.Add(element);
                    // TODO BASE DE DATOS
                }
            }
            catch (Exception ex)
            {
                throw new ArgumentNullException("element", "SecGroup exception in remove operation: " + ex.Message);
            }
        }
コード例 #2
0
        public void Add(WorkstationJob element)
        {
            try
            {
                if (element == null)
                {
                    throw new ArgumentNullException("element", "WorkstationJob can not be null");
                }

                this.workstationJobs.Add(element);
                // TODO BASE DE DATOS
            }
            catch (Exception ex)
            {
                throw new ArgumentNullException("element", "WorkstationJob exception in add operation: " + ex.Message);
            }
        }