コード例 #1
0
        private void btnAgregarBancos_Click(object sender, EventArgs e)
        {
            FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
            String            Filtro = "ID NOT IN (";
            String            IDs    = "";

            foreach (ItemSocioNegocioBanco Item in SocioNegocio.Bancos)
            {
                IDs = IDs + "'" + Item.Banco.ID + "',";
            }
            if (IDs.Length > 0)
            {
                Filtro = Filtro + IDs.Substring(0, IDs.Length - 1) + ")";
            }
            else
            {
                Filtro = "";
            }
            Banco Banco = (Banco)FrmSeleccionarPanel.GetSelectedEntity(typeof(Banco), "Banco", Filtro);

            if (Banco != null)
            {
                UltraGridRow Row = GrillaBancos.DisplayLayout.Bands[0].AddNew();
                Row.Tag = this.SocioNegocio.AddItemBanco();
                ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)Row.Tag;
                Item.Banco = Banco;
                MostrarBanco(Row);
            }
        }
コード例 #2
0
        private void GrillaBancos_CellChange(object sender, CellEventArgs e)
        {
            ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)e.Cell.Row.Tag;

            switch (e.Cell.Column.Key)
            {
            case colBancoDescripcion:
                Item.Descripcion = Convert.ToString(e.Cell.Text);
                break;

            default:
                break;
            }
            this.MostrarBanco(e.Cell.Row);
        }
コード例 #3
0
        public void MostrarBanco(UltraGridRow Row)
        {
            ItemSocioNegocioBanco item = (ItemSocioNegocioBanco)Row.Tag;

            if (item.Banco != null)
            {
                Row.Cells[colBanco].Value = item.Banco.Nombre;
            }

            if (item.Moneda != null)
            {
                Row.Cells[colMoneda].Value = item.Moneda.Simbolo;
            }
            Row.Cells[colBancoDescripcion].Value = item.Descripcion;
        }
コード例 #4
0
        private void GrillaBancos_ClickCellButton(object sender, CellEventArgs e)
        {
            ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)e.Cell.Row.Tag;

            switch (e.Cell.Column.Key)
            {
            case colMoneda:
                FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
                Moneda            moneda = (Moneda)FrmSeleccionarPanel.GetSelectedEntity(typeof(Moneda), "Moneda");
                Item.Moneda = moneda;
                break;

            default:
                break;
            }
            this.MostrarBanco(e.Cell.Row);
        }