public int uspINS_RRHH_DESEMPENIO_ETAPAS(BE_RRHH_DESEMPENIO_ETAPAS oBE)
        {
            object[] Parametros = new[] {
                (object)UC_FormWeb.mSQLFieldOrNull(oBE.ANIO, tgSQLFieldType.NUMERIC),
                (object)UC_FormWeb.mSQLFieldOrNull(oBE.USER_REGISTRO, tgSQLFieldType.TEXT),
            };

            return(Convert.ToInt32(new Utilitarios().ExecuteScalar("uspINS_RRHH_DESEMPENIO_ETAPAS", Parametros)));
        }
 public int uspINS_RRHH_DESEMPENIO_ETAPAS_ID(BE_RRHH_DESEMPENIO_ETAPAS oBE)
 {
     try
     {
         return(new DA_RRHH_DESEMPENIO_ETAPAS().uspINS_RRHH_DESEMPENIO_ETAPAS_ID(oBE));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
    protected void btnGenerar_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();
        BE_RRHH_DESEMPENIO_ETAPAS oBESol = new BE_RRHH_DESEMPENIO_ETAPAS();

        oBESol.ANIO          = Convert.ToInt32(ddlanio.SelectedValue);
        oBESol.USER_REGISTRO = Session["IDE_USUARIO"].ToString();

        int dtrpta = 0;

        dtrpta = new BL_RRHH_DESEMPENIO_ETAPAS().uspINS_RRHH_DESEMPENIO_ETAPAS(oBESol);
        Listar();
    }
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        //if (CheckCompetencia.SelectedIndex != -1)
        int cantidad = 0;

        if (ddlestapas.SelectedIndex > -1)
        {
            foreach (ListItem li in ddlestapas.Items)
            {
                if (li.Selected)
                {
                    DataTable dt = new DataTable();
                    BE_RRHH_DESEMPENIO_ETAPAS oBESol = new BE_RRHH_DESEMPENIO_ETAPAS();
                    oBESol.ANIO          = Convert.ToInt32(ddlanio.SelectedValue);
                    oBESol.USER_REGISTRO = Session["IDE_USUARIO"].ToString();
                    oBESol.CODIGO_ETAPA  = Convert.ToInt32(li.Value);
                    oBESol.CECOS         = ddlCentro.SelectedValue.ToString();
                    int dtrpta = 0;
                    dtrpta = new BL_RRHH_DESEMPENIO_ETAPAS().uspINS_RRHH_DESEMPENIO_ETAPAS_ID(oBESol);
                    if (dtrpta > 0)
                    {
                        cantidad++;
                    }
                }
            }

            if (cantidad > 0)
            {
                Listar();
                string cleanMessage = "Registro satisfactorio";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            }
            else
            {
                string cleanMessage = "Algunas etapas ya se encuetran registradas";
                ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            }
        }
        else
        {
            string cleanMessage = "Debe seleccionar alguna etapa";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
    }