public InsertExpedienteResolucion ( |
||
oENTVisitaduria | Entidad de Visitaduria con los parámetros necesarios para realizar la transacción | |
return |
// Funciones el programador void InsertExpedienteResolucion() { ENTVisitaduria oENTVisitaduria = new ENTVisitaduria(); ENTResponse oENTResponse = new ENTResponse(); ENTSession SessionEntity = new ENTSession(); BPVisitaduria oBPVisitaduria = new BPVisitaduria(); try { // Validaciones if (this.ddlTipoResolucion.SelectedIndex == 0) { throw new Exception("El campo [Tipo de Resolución] es requerido"); } if (this.ddlTipoResolucion.SelectedItem.Value == "1") { throw new Exception("Es necesario determinar el Tipo de Resolución"); } if (this.ckeDetalle.Text.Trim() == "") { throw (new Exception("Es necesario ingresar un detalle de la resolución")); } // Obtener sesión SessionEntity = (ENTSession)Session["oENTSession"]; // Formulario oENTVisitaduria.ExpedienteId = Int32.Parse(this.hddExpedienteId.Value); oENTVisitaduria.FuncionarioId = SessionEntity.FuncionarioId; oENTVisitaduria.TipoResolucionId = Int32.Parse(this.ddlTipoResolucion.SelectedItem.Value); oENTVisitaduria.Detalle = this.ckeDetalle.Text.Trim(); // Transacción oENTResponse = oBPVisitaduria.InsertExpedienteResolucion(oENTVisitaduria); // Errores y Warnings if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); } }catch (Exception ex){ throw (ex); } }