public int Mant_Insert_Reconocimiento(BE_RRHH_COMPETENCIAS_EVAL oBEReconocimiento) { try { return(new DA_RRHH_COMPETENCIAS_EVAL().Mant_Insert_Reconocimiento(oBEReconocimiento)); } catch (Exception ex) { throw ex; } }
public int Mant_Insert_Reconocimiento(BE_RRHH_COMPETENCIAS_EVAL oBE) { object[] Parametros = new[] { (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_COMPETENCIA, tgSQLFieldType.NUMERIC), (object)UC_FormWeb.mSQLFieldOrNull(oBE.DNI_EVALUADO, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.DNI_SUPERVISOR, tgSQLFieldType.TEXT), (object)UC_FormWeb.mSQLFieldOrNull(oBE.IDE_FACTOR, tgSQLFieldType.NUMERIC), (object)UC_FormWeb.mSQLFieldOrNull(oBE.SUSTENTO, tgSQLFieldType.TEXT), }; return(Convert.ToInt32(new Utilitarios().ExecuteScalar("uspINS_RRHH_COMPETENCIAS_EVAL", Parametros))); }
protected void btnIngresar_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; if (ddlPersonal.SelectedIndex < 1) { cleanMessage = "Seleccionar personal"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (ddlCompetencia.SelectedIndex < 1) { cleanMessage = "Seleccionar competencia"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtSustento.Text.Trim() == string.Empty) { cleanMessage = "Ingresar sustento"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { BE_RRHH_COMPETENCIAS_EVAL oBESol = new BE_RRHH_COMPETENCIAS_EVAL(); oBESol.IDE_COMPETENCIA = 0; oBESol.DNI_EVALUADO = ddlPersonal.SelectedValue.ToString(); oBESol.DNI_SUPERVISOR = Session["IDE_USUARIO"].ToString(); oBESol.IDE_FACTOR = Convert.ToInt32(ddlCompetencia.SelectedValue); oBESol.SUSTENTO = txtSustento.Text.Trim(); int dtrpta = 0; dtrpta = new BL_RRHH_COMPETENCIAS_EVAL().Mant_Insert_Reconocimiento(oBESol); if (dtrpta > 0) { BL_RRHH_COMPETENCIAS_EVAL ob = new BL_RRHH_COMPETENCIAS_EVAL(); ob.EnviarCorreoCompetencia(dtrpta); cleanMessage = "Registro exitoso, en poco tiempo estaremos informando sobre la situación de este reconocimiento, gracias"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); Limipiar(); } } //ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "JSFunction();", true); }
protected void btnRegistro_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; int dtrpta = 0; int cantidad = 0; if (GridView1.Rows.Count > 0) { foreach (GridViewRow row in GridView1.Rows) { string evaluado; string evaluador; string competencia; int CODIGO; string sustento; evaluador = Server.HtmlDecode(((string)(row.Cells[2].Text.Replace(" ", String.Empty))).Trim()); evaluado = Server.HtmlDecode(((string)(row.Cells[4].Text.Replace(" ", String.Empty))).Trim()); competencia = Server.HtmlDecode(((string)(row.Cells[6].Text)).Trim()); sustento = Server.HtmlDecode(((string)(row.Cells[7].Text)).Trim()); if (evaluado == string.Empty) { cleanMessage = "Ingresar número de DNI del Reconocedor"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (evaluado == string.Empty) { cleanMessage = "Ingresar número de DNI Reconocido"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (competencia == string.Empty) { cleanMessage = "Ingresar competencia"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (sustento == string.Empty) { cleanMessage = "Ingresar sustento"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { //Regex replace_a_Accents = new Regex("[á|à|ä|â]", RegexOptions.Compiled); //competencia = replace_a_Accents.Replace(competencia, "a"); //Regex replace_e_Accents = new Regex("[é|è|ë|ê]", RegexOptions.Compiled); //competencia = replace_a_Accents.Replace(competencia, "e"); //Regex replace_i_Accents = new Regex("[í|ì|ï|î]", RegexOptions.Compiled); //competencia = replace_a_Accents.Replace(competencia, "i"); //Regex replace_o_Accents = new Regex("[ó|ò|ö|ô]", RegexOptions.Compiled); //competencia = replace_a_Accents.Replace(competencia, "o"); //Regex replace_u_Accents = new Regex("[ú|ù|ü|û]", RegexOptions.Compiled); //competencia = replace_a_Accents.Replace(competencia, "u"); CODIGO = ConsultaCompetencia(competencia); BE_RRHH_COMPETENCIAS_EVAL oBESol = new BE_RRHH_COMPETENCIAS_EVAL(); oBESol.IDE_COMPETENCIA = 0; oBESol.DNI_EVALUADO = evaluado; oBESol.DNI_SUPERVISOR = evaluador; oBESol.IDE_FACTOR = CODIGO; oBESol.SUSTENTO = sustento; dtrpta = new BL_RRHH_COMPETENCIAS_EVAL().Mant_Insert_Reconocimiento(oBESol); if (dtrpta > 0) { cantidad++; } } } if (dtrpta > 0) { BL_RRHH_COMPETENCIAS_EVAL ob = new BL_RRHH_COMPETENCIAS_EVAL(); cleanMessage = "Registro exitoso, total (" + cantidad.ToString() + ")"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } } }