void UpdateDictamen() { ENTDictamen oENTDictamen = new ENTDictamen(); ENTResponse oENTResponse = new ENTResponse(); ENTSession SessionEntity = new ENTSession(); BPDictamen oBPDictamen = new BPDictamen(); try { // Validaciones if (this.ddlResolucionDictamen.Enabled) { if (this.ddlResolucionDictamen.SelectedItem.Value == "0") { throw (new Exception("Es necesario seleccionar una Resolución de Dictamen")); } } if (this.ckeDictamen.Text.Trim() == "") { throw (new Exception("Es necesario ingresar un detalle del dictamen")); } // Obtener sesión SessionEntity = (ENTSession)Session["oENTSession"]; // Validaciones de sesión if (SessionEntity.FuncionarioId == 0) { throw new Exception("No cuenta con permisos para crear diligencias debido a que usted no es un funcionario"); } // Formulario oENTDictamen.DictamenId = Int32.Parse( this.hddAtencionDictamenId.Value ); oENTDictamen.AtencionId = Int32.Parse(this.hddAtencionId.Value); oENTDictamen.FuncionarioId = SessionEntity.FuncionarioId; oENTDictamen.ResolucionDictamenId = ( this.ddlResolucionDictamen.Enabled ? Int32.Parse(this.ddlResolucionDictamen.SelectedValue) : 0 ); oENTDictamen.Dictamen = this.ckeDictamen.Text.Trim(); // Transacción oENTResponse = oBPDictamen.UpdateDictamen(oENTDictamen); // Errores y Warnings if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); } }catch (Exception ex){ throw (ex); } }
void SelectResolucionDictamen() { ENTDictamen oENTDictamen = new ENTDictamen(); ENTResponse oENTResponse = new ENTResponse(); BPDictamen oBPDictamen = new BPDictamen(); try { // Formulario oENTDictamen.ResolucionDictamenId = 0; oENTDictamen.Nombre = ""; // Transacción oENTResponse = oBPDictamen.SelectResolucionDictamen(oENTDictamen); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } // Mensaje de la BD if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(oENTResponse.sMessage) + "');", true); } // Llenado de combo this.ddlResolucionDictamen.DataTextField = "Nombre"; this.ddlResolucionDictamen.DataValueField = "ResolucionDictamenId"; this.ddlResolucionDictamen.DataSource = oENTResponse.dsResponse.Tables[1]; this.ddlResolucionDictamen.DataBind(); // Agregar Item de selección this.ddlResolucionDictamen.Items.Insert(0, new ListItem("[Seleccione]", "0")); }catch (Exception ex){ throw (ex); } }