Esempio n. 1
0
 private void BindingJobs(int deptId, string searchKey)
 {
     try
     {
         HR_JobPositionController _controller = new HR_JobPositionController();
         List <HR_JobPosition>    _list       = _controller.GetJobPositions(deptId, -1, searchKey);
         if (_list == null)
         {
             _list = new List <HR_JobPosition>();
         }
         dgvJobs.DataSource = _list;
     }
     catch (Exception ex)
     {
         SingletonLogger.Instance.Error(this.Name, ex);
     }
 }
Esempio n. 2
0
        public static void BindingJob2Combo(ComboBox cbo)
        {
            try
            {
                HR_JobPositionController _controller = new HR_JobPositionController();
                List <HR_JobPosition>    _list       = _controller.GetJobPositions(-1, -1, string.Empty);

                HR_JobPosition _item = new HR_JobPosition();
                _item.Id   = -1;
                _item.Name = "-- Chọn vị trí --";
                _list.Insert(0, _item);
                cbo.DataSource    = _list;
                cbo.DisplayMember = "Name";
                cbo.ValueMember   = "Id";
            }
            catch (Exception ex)
            {
                SingletonLogger.Instance.Error("BindingCntrol.BindingJob2Combo", ex);
            }
        }