protected void ddlCat_SelectedIndexChanged(object sender, EventArgs e) { DropDownList drp = (DropDownList)sender; GridViewRow gv = (GridViewRow)drp.NamingContainer; int index = gv.RowIndex; DropDownList ddlCat = (DropDownList)gvEquipList.Rows[index].FindControl("ddlCat"); id_equip.Value = gvEquipList.Rows[index].Cells[0].Text; id_cat.Value = ddlCat.SelectedValue; MPE_CAT.Show(); }
protected void btSimCat_Click(object sender, EventArgs e) { int returncode = EquipDAO.UpdateEquipCat(Convert.ToInt32(id_equip.Value), Convert.ToInt32(id_cat.Value)); MPE_CAT.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); }
protected void btNaoCat_Click(object sender, EventArgs e) { MPE_CAT.Hide(); DataBindGrid(); }