Example #1
0
        private void BindGridViewWorkers()
        {
            WorkerBusinessLogic WorkerBusinessLogic = new WorkerBusinessLogic();

            gridViewWorkers.DataSource = WorkerBusinessLogic.GetAll();
            gridViewWorkers.DataBind();
        }
        protected void BindDdListWorkers()
        {
            IList <Worker> listWorker = new List <Worker>();


            WorkerBusinessLogic workerBusinessLogic = new WorkerBusinessLogic();
            IList <Worker>      listAllWorker       = workerBusinessLogic.GetAll();

            IList <Worker> listActivityWorkers = CurrentActivity().GetWorkers();

            foreach (var worker in listAllWorker)
            {
                if (!listActivityWorkers.Contains(worker))
                {
                    listWorker.Add(worker);
                }
            }

            this.lBoxWorkers.DataSource = listWorker;
            this.lBoxWorkers.DataBind();
        }