protected void btnSave_Click(object sender, EventArgs e) { try { image.StrCon = axVarSes.Lee <string>("strCon"); image.ImageId = Convert.ToInt32(axVarSes.Lee <string>("strImageId")); image.UpdatedBy = Convert.ToInt32(axVarSes.Lee <string>("strUserID")); body.StrCon = axVarSes.Lee <string>("strCon"); body.Name = tbName.Text; body.BodyPartId = Convert.ToInt32(axVarSes.Lee <string>("strBodyPartId")); body.UpdatedBy = Convert.ToInt32(axVarSes.Lee <string>("strUserID")); image.ImageUrl = tbUrl.Text; image.ImageTitle = tbTitle.Text; if (body.Modify()) { if (image.Modify()) { pnOK.Visible = true; lblOK.Text = "Datos actualizados satisfactoriamente."; pnmodify.Visible = false; cargarGrid(); } else { pnError.Visible = true; lblError.Text = "Los datos se actualizaron parcialmente. " + image.Message; } } else { pnError.Visible = true; lblError.Text = "No se pudieron actualizar los datos. " + body.Message; } } catch (Exception ex) { pnError.Visible = true; lblError.Text = "No se pudieron actualizar los datos. " + e.ToString(); } }