protected void Carga_Datos() { iCom_BusinessEntity.Concepto oBE = new iCom_BusinessEntity.Concepto(); iCom_BusinessLogic.Concepto oBL = new iCom_BusinessLogic.Concepto(); oBE.idconcepto = 0; try { dtDatos = oBL.Consultar(oBE); if (dtDatos.Rows.Count > 0) { gvDatos.DataSource = dtDatos; gvDatos.DataBind(); return; } else { return; } } catch (Exception ex) { ResgitraLog(ex.Message); return; } }
protected void Carga_Datos() { iCom_BusinessEntity.Concepto oBE = new iCom_BusinessEntity.Concepto(); iCom_BusinessLogic.Concepto oBL = new iCom_BusinessLogic.Concepto(); try { oBE.idconcepto = int.Parse(Application["idconcepto"].ToString()); dtDatos = oBL.Consultar(oBE); if (dtDatos.Rows.Count > 0) { txtConcepto.Text = dtDatos.Rows[0]["nombreconcepto"].ToString(); txtAbreviatura.Text = dtDatos.Rows[0]["abreviatura"].ToString(); if (dtDatos.Rows[0]["ingresoegreso"].ToString() == "False") { rblIE.SelectedIndex = 0; } else { rblIE.SelectedIndex = 1; } txtDecripcion.Text = dtDatos.Rows[0]["descripcion"].ToString(); txtImporte.Text = dtDatos.Rows[0]["importe"].ToString(); //txtIVA.Text = dtDatos.Rows[0]["iva"].ToString(); txtDiasVencimiento.Text = dtDatos.Rows[0]["diasvencimiento"].ToString(); if (dtDatos.Rows[0]["porcentajepaanticipado"].ToString() != "0") { rblPagoAnticipado.SelectedIndex = 0; txtValorDesc.Text = dtDatos.Rows[0]["porcentajepaanticipado"].ToString(); } else { rblPagoAnticipado.SelectedIndex = 1; txtValorDesc.Text = dtDatos.Rows[0]["fijopaanticipado"].ToString(); } if (dtDatos.Rows[0]["porcentajerecarmora"].ToString() != "0") { rblMora.SelectedIndex = 0; txtValorRecargo.Text = dtDatos.Rows[0]["porcentajerecarmora"].ToString(); } else { rblMora.SelectedIndex = 1; txtValorRecargo.Text = dtDatos.Rows[0]["fijorecarmora"].ToString(); } if (dtDatos.Rows[0]["aplicadoimportedia"].ToString() == "True") { rblAplicadoA.SelectedIndex = 0; } if (dtDatos.Rows[0]["aplicadoimportemes"].ToString() == "True") { rblAplicadoA.SelectedIndex = 1; } if (dtDatos.Rows[0]["aplicadoimporte"].ToString() == "True") { rblAplicadoA.SelectedIndex = 2; } return; } else { return; } } catch (Exception ex) { ResgitraLog(ex.Message); return; } }