Example #1
0
        public void LoadJobs()
        {
            try
            {
                JobBLL    JobBLL = new JobBLL();
                DataTable Jobs;
                Jobs = JobBLL.All("All");
                comboBoxPuesto.DisplayMember = "Text";
                comboBoxPuesto.ValueMember   = "Value";

                List <Object> items = new List <object>();
                items.Add(new { Text = "Seleccione un opciĆ³n", Value = "0" });
                foreach (DataRow Job in Jobs.Rows)
                {
                    items.Add(new { Text = Job[JobML.DataBase.Name].ToString(), Value = Job[JobML.DataBase.Id].ToString() });
                }
                comboBoxPuesto.DataSource = items;
            }
            catch (Exception ex)
            {
                MessageBox.Show(String.Format("LoadJobs: {0}", ex.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
 public void LoadDataGridView()
 {
     dataGridViewDataPuesto.DataSource = JobBLL.All();
 }