private void EmployeeForm_Load(object sender, EventArgs e) { EmployeeClass emp = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport()); string orden = "SELECT distinct `TITULO UNIVERSITARIO` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(gottendegree, orden); orden = "SELECT distinct `PUESTO` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(cargobox, orden); orden = "SELECT distinct `RELACION DE REFERENCIA` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(relationReferenceBox, orden); orden = "SELECT distinct `NOMBRE DE ALERGIA` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(AlergyNmaeBox, orden); orden = "SELECT distinct `NOMBRE DE DOLENCIA` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(DolenciaNameBox, orden); orden = "SELECT distinct `NOMBRE DE MEDICINA` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(nameMedicineBox, orden); orden = "SELECT distinct `RAZON DE MEDICINA` FROM " + UserAccessForm.getusername() + "_employee_table;"; emp.Fillcombo(MotivoMedicineBox, orden); monedatipo.Text = "DOP"; if (DireccionGestor.getorigen() == "editor") { titulolabel.Text = "EDITAR EMPLEADO"; savebuttonstrip.Text = "MODIFICAR"; emp.filleverything(dategetin, gottendegree, nameEmployeeBox, idBox, birthDateBox, telephoneNumberBox, schedule, cargobox, comboNacionalidad, ageBox, monedatipo, mensualitybox, personalReferenceBox, telephoneReferenceBox, relationReferenceBox, AlergyNmaeBox, DolenciaNameBox, nameMedicineBox, MotivoMedicineBox, trabajando, salidapicker, picturetextbox, direccionbox, sexobox, emailcombo, DireccionGestor.getordensql()); if (nameMedicineBox.Text == "NINGUNA" && MotivoMedicineBox.Text == "NINGUNA") { medicinepanel.Hide(); medicamentosopcionbox.Text = "NO"; } else { medicamentosopcionbox.Text = "SI"; medicinepanel.Show(); } if (DolenciaNameBox.Text == "NINGUNA") { dolenciaopcionbox.Text = "NO"; dolenciapanel.Hide(); } else { dolenciaopcionbox.Text = "SI"; dolenciapanel.Show(); } if (AlergyNmaeBox.Text == "NINGUNA") { alergypanel.Hide(); alergiaopcionbox.Text = "NO"; } else { alergypanel.Show(); alergiaopcionbox.Text = "SI"; } if (personalReferenceBox.Text == "NINGUNA" && telephoneReferenceBox.Text == "NINGUNA" && relationReferenceBox.Text == "NINGUNA") { referenciapanel.Hide(); referenciaopcionbox.Text = "NO"; } else { referenciaopcionbox.Text = "SI"; referenciapanel.Show(); } empleadopanel.Show(); } else { savebuttonstrip.Text = "GUARDAR"; titulolabel.Text = "AGREGAR EMPLEADO"; empleadopanel.Hide(); } if (picturetextbox.Text != "") { string path = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); string combinacion = System.IO.Path.Combine(path, UserAccessForm.getusername()); string fotopath = System.IO.Path.Combine(combinacion, picturetextbox.Text); pictureBox.ImageLocation = fotopath; } }