InsertAtencionDoctor() public method

Crea una nueva asignación de un funcionario a un Expediente de Atención a Víctimas
BPAtencion.InsertAtencionDoctor 19-Junio-2014 Ruben.Cobos
public InsertAtencionDoctor ( ENTAtencion oENTAtencion ) : ENTResponse
oENTAtencion SIAQ.Entity.Object.ENTAtencion
return SIAQ.Entity.Object.ENTResponse
Beispiel #1
0
        // Funciones el programador
        void InsertAtencionDoctor()
        {
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            BPAtencion oBPAtencion = new BPAtencion();

            try
            {

                // Validaciones
                if (this.ddlDoctor.SelectedItem.Value == "0") { throw (new Exception("Es necesario seleccionar un doctor")); }

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);
                oENTAtencion.FuncionarioId = Int32.Parse(this.ddlDoctor.SelectedItem.Value);

                // Transacción
                oENTResponse = oBPAtencion.InsertAtencionDoctor(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

            }catch (Exception ex){
                throw (ex);
            }
        }
        // Funciones el programador
        void UpdateAtencion_NumeroFolio()
        {
            ENTAtencion oENTAtencion = new ENTAtencion();
            ENTResponse oENTResponse = new ENTResponse();

            BPAtencion oBPAtencion = new BPAtencion();

            try
            {

                // Validaciones
                if (this.txtNumeroFolio.Text.Trim() == "") { throw (new Exception("Es necesario ingresar un número de folio")); }

                // Formulario
                oENTAtencion.AtencionId = Int32.Parse(this.hddAtencionId.Value);
                oENTAtencion.NumeroFolio = this.txtNumeroFolio.Text.Trim();

                // Transacción
                oENTResponse = oBPAtencion.InsertAtencionDoctor(oENTAtencion);

                // Errores y Warnings
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }

            }catch (Exception ex){
                throw (ex);
            }
        }