public int uspUPD_MOD_REQUERIMIENTO_PERSONAL(BE_MOD_REQUERIMIENTO_PERSONAL oBE) { object[] Parametros = new[] { (object)UC_FormWeb.mSQLFieldOrNull(oBE.REQ_PERSONAL, tgSQLFieldType.NUMERIC), (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_RESPONSABLE, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_ETAPAS, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.DNI, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.APE_PATERNO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.APE_MATERNO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.NOMBRES, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_NACIMIENTO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.UBIGEO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.TELEFONOS, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_MANO_OBRA, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_CONDICION, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_EXA_MEDICO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_CHARLA_TR, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_CHARLA_SSK, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_CHARLA_ALTURA, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_CHARLA_ESP_CONFINADO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_CHARL_CALIENTE, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_ENTREGA_FILE_TR, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.FEC_ACCESO_PLANTA, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_FOTOCHECK, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.OBSERVACIONES, tgSQLFieldType.TEXT), }; return(Convert.ToInt32(new Utilitarios().ExecuteScalar("uspUPD_MOD_REQUERIMIENTO_PERSONAL", Parametros))); }
public int uspUPD_MOD_REQUERIMIENTO_PERSONAL(BE_MOD_REQUERIMIENTO_PERSONAL oBE) { try { return(new DA_MOD_REQUERIMIENTO().uspUPD_MOD_REQUERIMIENTO_PERSONAL(oBE)); } catch (Exception ex) { throw ex; } }
protected void btnGuardar_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; if (lblCodigo.Text.Trim() == string.Empty) { cleanMessage = "Falta seleccionar personal"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { if (ddlEtapas.SelectedIndex == 0) { cleanMessage = "Seleccionar etapa"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } //else if (txtDni.Text.Trim() == string.Empty) //{ // cleanMessage = "Ingresar N° documento"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} else if (txtPaterno.Text.Trim() == string.Empty) { cleanMessage = "Ingresar apellido paterno"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtMaterno.Text.Trim() == string.Empty) { cleanMessage = "Ingresar apellido materno"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtNombres.Text.Trim() == string.Empty) { cleanMessage = "Ingresar nombres"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } //else if (ddlCiudad .SelectedIndex == 0) //{ // cleanMessage = "Seleccionar ciudad"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} //else if (ddlProvincia.SelectedIndex == 0) //{ // cleanMessage = "Seleccionar provincia"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} //else if (ddlDistrito.SelectedIndex == 0) //{ // cleanMessage = "Seleccionar distrito"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} //else if (ddlMano .SelectedIndex == 0) //{ // cleanMessage = "Seleccionar mano de obra"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} //else if (ddlCondicion.SelectedIndex == 0) //{ // cleanMessage = "Seleccionar condición"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} //else if (ddlFotocheck.SelectedIndex == 0) //{ // cleanMessage = "Seleccionar fotocheck"; // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); //} else { BE_MOD_REQUERIMIENTO_PERSONAL oBESol = new BE_MOD_REQUERIMIENTO_PERSONAL(); oBESol.REQ_PERSONAL = Convert.ToInt32(string.IsNullOrEmpty(lblCodigo.Text) ? "0" : lblCodigo.Text); oBESol.IDE_RESPONSABLE = Session["IDE_USUARIO"].ToString(); oBESol.IDE_ETAPAS = Convert.ToInt32(ddlEtapas.SelectedValue); oBESol.DNI = txtDni.Text.Trim(); oBESol.APE_PATERNO = txtPaterno.Text.Trim(); oBESol.APE_MATERNO = txtMaterno.Text.Trim(); oBESol.NOMBRES = txtNombres.Text.Trim(); oBESol.FEC_NACIMIENTO = txtFechaNac.Text.Trim(); string UBIGEO; if (ddlDistrito.SelectedIndex == 0) { UBIGEO = string.Empty; } else { UBIGEO = ddlDistrito.SelectedValue.ToString(); } oBESol.UBIGEO = UBIGEO; oBESol.TELEFONOS = txtTelefonos.Text.Trim(); string MANO; if (ddlMano.SelectedIndex == 0) { MANO = "0"; } else { MANO = ddlMano.SelectedValue.ToString(); } oBESol.IDE_MANO_OBRA = Convert.ToInt32(MANO); string CONDICION; if (ddlCondicion.SelectedIndex == 0) { CONDICION = "0"; } else { CONDICION = ddlCondicion.SelectedValue.ToString(); } oBESol.IDE_CONDICION = Convert.ToInt32(CONDICION); oBESol.FEC_EXA_MEDICO = txtMedico.Text.Trim(); oBESol.FEC_CHARLA_TR = txtTr.Text.Trim(); oBESol.FEC_CHARLA_SSK = txtSSK.Text.Trim(); oBESol.FEC_CHARLA_ALTURA = txtAltura.Text.Trim(); oBESol.FEC_CHARLA_ESP_CONFINADO = txtEspacio.Text.Trim(); oBESol.FEC_CHARL_CALIENTE = txtCaliente.Text.Trim(); oBESol.FEC_ENTREGA_FILE_TR = txtFile.Text.Trim(); oBESol.FEC_ACCESO_PLANTA = txtPlanta.Text.Trim(); string FOTOCHECK; if (ddlFotocheck.SelectedIndex == 0) { FOTOCHECK = "0"; } else { FOTOCHECK = ddlFotocheck.SelectedValue.ToString(); } oBESol.IDE_FOTOCHECK = Convert.ToInt32(FOTOCHECK); oBESol.OBSERVACIONES = txtObservaciones.Text.Trim(); int dtrpta = 0; dtrpta = new BL_MOD_REQUERIMIENTO().uspUPD_MOD_REQUERIMIENTO_PERSONAL(oBESol); if (dtrpta > 0) { cleanMessage = "Registro exitoso."; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); CleanControl(this.Controls); Listar(); btnMasivo.Focus(); } } } }