示例#1
0
        public Form12()
        {
            InitializeComponent();
            String cadenaConexion = @"Data Source=LOCALHOST;Initial Catalog=HOSPITAL;Persist Security Info=True;User ID=SA;Password=MCSD2018";

            this.helper          = new HelperDepartamentos(cadenaConexion);
            departamentos        = new List <Departamento>();
            this.codigoEmpleados = new List <int>();
            List <String> oficios = this.helper.GetOficios();

            this.departamentos = this.helper.GetDepartamentos();

            foreach (String ofi in oficios)
            {
                this.cmbOficio.Items.Add(ofi);
            }
            foreach (Departamento d in departamentos)
            {
                this.cmbDepartamento.Items.Add(d);
                this.cmbDepartamentos.Items.Add(d);
            }
        }
 public DepartamentosController()
 {
     this.helper = new HelperDepartamentos();
 }