Ejemplo n.º 1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            var frm = new frmProtocolComponentEdit(_protocolComponentId, "Edit");

            if (_tmpProtocolcomponentList != null)
            {
                frm._tmpProtocolcomponentList = _tmpProtocolcomponentList;
            }
            frm.ShowDialog();

            if (frm._tmpProtocolcomponentList != null)
            {
                _tmpProtocolcomponentList = frm._tmpProtocolcomponentList;

                var dataList = _tmpProtocolcomponentList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico);

                grdProtocolComponent.DataSource = new ProtocolComponentList();
                grdProtocolComponent.DataSource = dataList;
                grdProtocolComponent.Refresh();
                lblRecordCount2.Text = string.Format("Se encontraron {0} registros.", dataList.Count());
            }
        }
Ejemplo n.º 2
0
        private void New_Click(object sender, EventArgs e)
        {
            var frm = new frmProtocolComponentEdit(string.Empty, "New");

            if (_tmpProtocolcomponentList != null)
            {
                frm._tmpProtocolcomponentList = _tmpProtocolcomponentList;
            }

            frm.ShowDialog();

            // Refrescar grilla
            // Actualizar variable
            if (frm._tmpProtocolcomponentList != null)
            {
                _tmpProtocolcomponentList = frm._tmpProtocolcomponentList;

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