insertLugarDiligencia() 공개 메소드

Metodo para insertar LugarDiligencia del sistema
BPLugarDiligencia.insertLugarDiligencia 27/ene/2014 Generador
public insertLugarDiligencia ( ENTLugarDiligencia oENTLugarDiligencia ) : ENTResponse
oENTLugarDiligencia SIAQ.Entity.Object.ENTLugarDiligencia
리턴 SIAQ.Entity.Object.ENTResponse
예제 #1
0
        private void insertLugarDiligencia()
        {
            BPLugarDiligencia oBPLugarDiligencia = new BPLugarDiligencia();
            ENTLugarDiligencia oENTLugarDiligencia = new ENTLugarDiligencia();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formilario
                oENTLugarDiligencia.Nombre = this.txtActionNombre.Text.Trim();
                oENTLugarDiligencia.Descripcion = this.txtActionDescripcion.Text.Trim();

                // Transacción
                oENTResponse = oBPLugarDiligencia.insertLugarDiligencia(oENTLugarDiligencia);

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

                // Transacción exitosa
                ClearActionPanel();

                // Actualizar Grid
                selectLugarDiligencia();

                // Mensaje al usuario
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('Lugar creado con éxito!'); focusControl('" + this.txtNombre.ClientID + "');", true);

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