Example #1
0
 public void EditarElemento_Clic(object sender, EventArgs e)
 {
     this.Restablecer();
     this._currentRow = (ElementoListaPedidos)sender;
     this.ClickedRow  = this._currentRow.RowID;
     this.OnClickEditarElemento(e);
 }
Example #2
0
        protected override void CreateChildControls()
        {
            this.Controls.Clear();
            this.LoadSettings();
            this.Controls.Add((Control) new LiteralControl("<table cellspacing='0'>"));
            this.WriteHeader();
            if (this._dataSource != null && this._dataSource.Rows.Count > 0)
            {
                this.Controls.Add((Control) new LiteralControl("<tr>"));
                this.Controls.Add((Control) new LiteralControl("<td colspan=" + (object)this._dtConfiguracion.Columns.Count + ">"));
                this.mainContainerPanel            = new Panel();
                this.mainContainerPanel.Height     = (Unit)400;
                this.mainContainerPanel.ScrollBars = ScrollBars.Vertical;
                this.mainContainerPanel.ID         = "ContainerPedidos";
                this.Controls.Add((Control)this.mainContainerPanel);
                this.mainContainerPanel.Controls.Add((Control) new LiteralControl("<table>"));
                this.AlternativeWriteHeader(this.mainContainerPanel);
                foreach (DataRow dataRow in (InternalDataCollectionBase)this._dataSource.Rows)
                {
                    switch (this._tipoOperacion)
                    {
                    case TipoOperacionLista.Conciliacion:
                    case TipoOperacionLista.Boletin:
                        ElementoListaPedidos elementoListaPedidos = new ElementoListaPedidos();
                        elementoListaPedidos.DTConfig = this._dtConfiguracion;
                        elementoListaPedidos.ImageURL = this._imageButtonURL;
                        elementoListaPedidos.Source   = dataRow;
                        elementoListaPedidos.Editar  += new EventHandler(this.EditarElemento_Clic);
                        if (this._remark)
                        {
                            elementoListaPedidos.Remark();
                            this._remark = false;
                        }
                        this.mainContainerPanel.Controls.Add((Control)elementoListaPedidos);
                        continue;

                    default:
                        continue;
                    }
                }
                this.mainContainerPanel.Controls.Add((Control) new LiteralControl("</table>"));
            }
            this.Controls.Add((Control) new LiteralControl("</table>"));
        }