protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Cuentas cuenta = new Cuentas();
CuentaOrigenDropDownList.DataSource = cuenta.Listado(" * ", "1=1", "");
CuentaOrigenDropDownList.DataTextField = "Descripcion";
CuentaOrigenDropDownList.DataValueField = "CuentaId";
CuentaOrigenDropDownList.DataBind();
CuentaDestinoDropDownList.DataSource = cuenta.Listado(" * ", "CuentaId <> " + CuentaOrigenDropDownList.SelectedValue, "");
CuentaDestinoDropDownList.DataTextField = "Descripcion";
CuentaDestinoDropDownList.DataValueField = "CuentaId";
CuentaDestinoDropDownList.DataBind();
int id;
Transferencias tran = new Transferencias();
if (Request.QueryString["id"] != null)
{
int.TryParse (Request.QueryString["id"].ToString(),out id);
if (id > 0)
{
if (!tran.Buscar(id))
{
Utilitarios.ShowToastr(this.Page, "Registro no encontrado.", "Error", "Error");
Limpiar();
}
else
{
Llenar(tran);
}
}
}
}
}