public insertcatEstado ( ENTEstado entEstado ) : |
||
entEstado | SIAQ.Entity.Object.ENTEstado | |
Результат |
private void insertEstado() { BPEstado oBPEstado = new BPEstado(); ENTEstado oENTEstado = new ENTEstado(); ENTResponse oENTResponse = new ENTResponse(); try { // Formilario oENTEstado.PaisId = Int32.Parse(this.ddlActionPais.SelectedItem.Value); oENTEstado.Nombre = this.txtActionNombre.Text.Trim(); oENTEstado.Descripcion = this.txtActionDescripcion.Text.Trim(); oENTEstado.Activo = Int16.Parse(this.ddlActionStatus.SelectedItem.Value); // Transacción oENTResponse = oBPEstado.insertcatEstado(oENTEstado); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); } // Transacción exitosa ClearActionPanel(); // Actualizar Grid selectEstado(); // Mensaje al usuario ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('Estado creado con éxito!'); focusControl('" + this.txtNombre.ClientID + "');", true); } catch (Exception ex) { throw (ex); } }