Exemplo n.º 1
0
        protected void btSimDisp_Click(object sender, EventArgs e)
        {
            int returncode = EquipDAO.UpdateEquipDisp(Convert.ToInt32(id_equip.Value), Convert.ToBoolean(Convert.ToInt32(disp.Value)));

            MPE_Disp.Hide();
            String str;

            if (returncode == -1)
            {
                str = "<script>alertify.error('Alteração feita sem sucesso!!');</script>";
            }
            else
            {
                str = "<script>alertify.success('Alteração feita com sucesso!');</script>";
            }
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", str, false);
        }
Exemplo n.º 2
0
        protected void chbxDisponivel_CheckedChanged(object sender, EventArgs e)
        {
            CheckBox drp = (CheckBox)sender;

            GridViewRow gv = (GridViewRow)drp.NamingContainer;

            int index = gv.RowIndex;

            CheckBox chbxDisponivel = (CheckBox)gvEquipList.Rows[index].FindControl("chbxDisponivel");

            id_equip.Value = gvEquipList.Rows[index].Cells[0].Text;
            if (chbxDisponivel.Checked == true)
            {
                disp.Value = "1";
            }
            else
            {
                disp.Value = "0";
            }
            MPE_Disp.Show();
        }
Exemplo n.º 3
0
 protected void btNaoDisp_Click(object sender, EventArgs e)
 {
     MPE_Disp.Hide();
     DataBindGrid();
 }