private void selectLugarDiligencia_ForEdit(Int32 LugarDiligenciaId) { BPLugarDiligencia oBPLugarDiligencia = new BPLugarDiligencia(); ENTLugarDiligencia oENTLugarDiligencia = new ENTLugarDiligencia(); ENTResponse oENTResponse = new ENTResponse(); try { // Formulario oENTLugarDiligencia.LugarDiligenciaId = LugarDiligenciaId; oENTLugarDiligencia.Nombre = this.txtActionNombre.Text.Trim(); // Transacción oENTResponse = oBPLugarDiligencia.SelectLugarDiligencia(oENTLugarDiligencia); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } this.lblActionMessage.Text = oENTResponse.sMessage; // Llenado de controles this.txtActionNombre.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Nombre"].ToString(); this.txtActionDescripcion.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Descripcion"].ToString(); } catch (Exception ex) { throw (ex); } }
private void selectLugarDiligencia() { BPLugarDiligencia oBPLugarDiligencia = new BPLugarDiligencia(); ENTLugarDiligencia oENTLugarDiligencia = new ENTLugarDiligencia(); ENTResponse oENTResponse = new ENTResponse(); String sMessage = ""; try { // Formulario oENTLugarDiligencia.Nombre = this.txtNombre.Text.Trim(); // Transacción oENTResponse = oBPLugarDiligencia.SelectLugarDiligencia(oENTLugarDiligencia); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } if (oENTResponse.sMessage != "") { sMessage = "alert('" + oENTResponse.sMessage + "');"; } // Llenado de controles this.gvLugar.DataSource = oENTResponse.dsResponse.Tables[1]; this.gvLugar.DataBind(); // Mensaje al usuario ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), sMessage, true); } catch (Exception ex) { throw (ex); } }