private void cbCia_SelectedIndexChanged(object sender, EventArgs e) { if (cbCia.SelectedIndex != 0) { cbTipoNomina.Enabled = true; SonaTipoNomina objTnom = new SonaTipoNomina(); DataTable dtTnom = objTnom.obtTipoNomina(5, cbCia.SelectedIndex, 0, ""); llenarCombo(cbTipoNomina, dtTnom, "Descripción"); // quite el acento //cbArea.Enabled = true; SonaCompania objCia = new SonaCompania(); DataTable dtPlanta = objCia.ObtenerPlantel(4, 0, cbCia.SelectedItem.ToString(), ""); //llenarCombo(cbArea, dtPlanta, "Descripción"); // quite el acento cbArea.Enabled = true; DataTable dtArea = objCia.ObtenerPlantel(4, 0, cbCia.SelectedItem.ToString(), ""); llenarCombo(cbArea, dtArea, "Descripción"); // quite el acento } else { cbTipoNomina.Enabled = false; //cbArea.Enabled = false; } }
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox4.SelectedIndex > 0) { SonaTipoNomina objTnom = new SonaTipoNomina(); DataTable dtTnom = objTnom.obtTipoNomina(5, Convert.ToInt32(comboBox4.SelectedValue), 0, ""); Utilerias.llenarComboxDataTable(cbTipoNomina, dtTnom, "Clave", "Descripción"); SonaCompania objCia = new SonaCompania(); DataTable dtArea = objCia.ObtenerPlantel(9, Convert.ToInt32(comboBox4.SelectedValue), "", ""); Utilerias.llenarComboxDataTable(comboBox1, dtArea, "Clave", "Descripción"); } }
//*********************************************************************************************** //Autor: Victor Jesús Iturburu Vergara //Fecha creación:09-04-2017 Última Modificacion: 17-04-2017 //Descripción: ------------------------------- //*********************************************************************************************** //----------------------------------------------------------------------------------------------- // C O M B O S //----------------------------------------------------------------------------------------------- private void cbCia_SelectedIndexChanged(object sender, EventArgs e) { if (cbCia.SelectedIndex != 0) { cbTipoNomina.Enabled = true; SonaTipoNomina objTnom = new SonaTipoNomina(); DataTable dtTnom = objTnom.obtTipoNomina(5, cbCia.SelectedIndex, 0, ""); // llenarCombo(cbTipoNomina, dtTnom, "Descripción"); // quite el acento Utilerias.llenarComboxDataTable(cbTipoNomina, dtTnom, "Clave", "Descripción"); cbArea.Enabled = true; SonaCompania objCia = new SonaCompania(); DataTable dtPlanta = objCia.ObtenerPlantel(4, 0, cbCia.SelectedItem.ToString(), ""); llenarCombo(cbArea, dtPlanta, "Descripción"); // quite el acento } else { cbTipoNomina.Enabled = false; cbArea.Enabled = false; } /*if (cbCia.SelectedIndex != 0) * { * * cbTipoNomina.Enabled = true; * SonaTipoNomina objTnom = new SonaTipoNomina(); * DataTable dtTnom = objTnom.obtTipoNomina(5, cbCia.SelectedIndex, 0, ""); * llenarCombo(cbTipoNomina, dtTnom, "Descripción"); * * cbArea.Enabled = true; * SonaCompania objCia = new SonaCompania(); * DataTable dtPlanta = objCia.ObtenerPlantel(4, 0, cbCia.SelectedItem.ToString(), ""); * llenarCombo(cbArea, dtPlanta, "Descripción"); * } * else * { * cbTipoNomina.Enabled = false; * cbArea.Enabled = false; * }*/ }