Ejemplo n.º 1
0
    protected void Anular_MOI(object sender, ImageClickEventArgs e)
    {
        PanelDatos.Visible = true;
        ImageButton btnSeleccionar = ((ImageButton)sender);

        lblIde_MOI.Text = btnSeleccionar.CommandArgument;

        BL_PERSONAL objPersona = new BL_PERSONAL();
        DataTable   dtResul    = new DataTable();

        chkEstado.Checked = true;
        string Personal = gridPersonal.DataKeys[0].Values[0].ToString();

        dtResul = objPersona.Anular_Moi((Convert.ToInt32(btnSeleccionar.CommandArgument)));

        string cleanMessage = string.Empty;

        if (dtResul.Rows.Count == 0)
        {
            cleanMessage = "Movimiento anulado";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }

        Response.Redirect("~/RRHH/frmRequerimiento.aspx");
    }