protected void btn_editarRazaoSocial_Click(object sender, EventArgs e) { if (txt_RazaoSocial.ReadOnly == false) { if (CompanyDB.UpdateRazaoSocial(txt_RazaoSocial.Text, Convert.ToInt32(Session["id"])) == 0) { ltl_status.Text = "<script type=text/javascript> toastr.success('Dados atualizados com sucesso') </script>"; txt_RazaoSocial.ReadOnly = true; txt_nomeFantasia.Enabled = false; btn_editarRazaoSocial.Text = ""; btn_editarRazaoSocial.Text = "<i class='fa fa-pencil-alt'></i>"; Page_Load(this, EventArgs.Empty); } else { ltl_status.Text = "<script type=text/javascript> toastr.error('Algo deu errado, tente novamente mais tarde') </script>"; } } else { btn_editarRazaoSocial.Text = "<i class='fa fa-check'></i>"; txt_RazaoSocial.ReadOnly = false; txt_RazaoSocial.Enabled = true; } }