コード例 #1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            var editar = new frmAddProducto(_ticketdetalletId, "Edit", _serviceId, _protocolId, _modo);

            if (_tmpTicketDetalleList != null)
            {
                editar._TempTicketDetalleList = _tmpTicketDetalleList;
            }
            editar.ShowDialog();
            if (editar._TempTicketDetalleList != null)
            {
                _tmpTicketDetalleList = editar._TempTicketDetalleList;

                var dataList = _tmpTicketDetalleList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);
                grdTicketDetalle.DataSource = new TicketDetalleList();
                grdTicketDetalle.DataSource = dataList;
                grdTicketDetalle.Refresh();
                lblRecordCount2.Text = string.Format("Se encontraron {0} registros.", dataList.Count());
            }
        }
コード例 #2
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            var nuevo = new frmAddProducto(string.Empty, "New", _serviceId, _protocolId, _modo);

            if (_tmpTicketDetalleList != null)
            {
                nuevo._TempTicketDetalleList = _tmpTicketDetalleList;
            }
            nuevo.ShowDialog();
            this.grdTicketDetalle.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
            if (nuevo._TempTicketDetalleList != null)
            {
                _tmpTicketDetalleList = nuevo._TempTicketDetalleList;

                var dataList = _tmpTicketDetalleList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);
                grdTicketDetalle.DataSource = new TicketDetalleList();
                grdTicketDetalle.DataSource = dataList;
                grdTicketDetalle.Refresh();
                lblRecordCount2.Text = string.Format("Se encontraron {0} registros.", dataList.Count());
            }
        }