protected void btnUpdate_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "function", "<script>reallowOp();</script>", false); try { string error = string.Empty; if (string.IsNullOrEmpty(this.TxtDescObject.Text.Trim())) { error = "WarningDescriptionProjectNotEmpty"; ScriptManager.RegisterStartupScript(this, this.GetType(), "ErrorObjectLength", "parent.ajaxDialogModal('" + error + "', 'warning');", true); return; } DescrizioneFascicolo descFasc = new DescrizioneFascicolo(); descFasc.SystemId = (GridDescriptionProject.Rows[this.GridDescriptionProject.SelectedIndex].FindControl("lblSystemid") as Label).Text; descFasc.Codice = this.TxtCodObject.Text; descFasc.Descrizione = this.TxtDescObject.Text; descFasc.IdRegistro = (GridDescriptionProject.Rows[this.GridDescriptionProject.SelectedIndex].FindControl("lblIdRegistro") as Label).Text; descFasc.IdAmm = (GridDescriptionProject.Rows[this.GridDescriptionProject.SelectedIndex].FindControl("lblIdAmm") as Label).Text; ResultDescrizioniFascicolo resultUpdateDescFasc = ResultDescrizioniFascicolo.OK; if (!ProjectManager.AggiornaDescrizioneFascicolo(descFasc, out resultUpdateDescFasc)) { error = GetErrorMessage(resultUpdateDescFasc); ScriptManager.RegisterStartupScript(this, this.GetType(), "ErrorObjectLength", "parent.ajaxDialogModal('" + error + "', 'warning');", true); return; } (GridDescriptionProject.Rows[this.GridDescriptionProject.SelectedIndex].FindControl("lblCodObject") as Label).Text = descFasc.Codice; (GridDescriptionProject.Rows[this.GridDescriptionProject.SelectedIndex].FindControl("lblDescObject") as Label).Text = descFasc.Descrizione; this.UpdPnlGridDescriptionProject.Update(); this.grid_rowindex.Value = string.Empty; this.HighlightSelectedRow(); EnableButton(); this.TxtCodObject.Text = string.Empty; this.TxtDescObject.Text = string.Empty; this.UpdPnlCodeObject.Update(); } catch (System.Exception ex) { UIManager.AdministrationManager.DiagnosticError(ex); } }