InsertPais_FastCatalog() public method

Crea un nuevo Pais desde el wucFastCatalog
BPEstado.InsertPais_FastCatalog 17-Julio-2014 Ruben.Cobos
public InsertPais_FastCatalog ( ENTPais oENTPais ) : ENTResponse
oENTPais SIAQ.Entity.Object.ENTPais Entidad de Pais con los parámetros necesarios para crear el registro
return SIAQ.Entity.Object.ENTResponse
Example #1
0
        private void InsertPais()
        {
            BPPais oBPPais = new BPPais();
            ENTPais oENTPais = new ENTPais();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTPais.Nombre = this.txtNombre.Text.Trim();
                oENTPais.Descripcion = this.txtNombre.Text.Trim();
                oENTPais.Activo = 1;

                // Transacción
                oENTResponse = oBPPais.InsertPais_FastCatalog(oENTPais);

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

                // Id Generado
                this.hddItemCreatedID.Value = oENTResponse.dsResponse.Tables[1].Rows[0]["NewIdentity"].ToString();

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