Exemple #1
0
        private void LoadSiteListView()
        {
            _sListView                  = new SiteListView();
            _sListView.MySortBrush      = SystemBrushes.ControlLight;
            _sListView.MyHighlightBrush = Brushes.Goldenrod;
            _sListView.GridLines        = true;
            _sListView.MultiSelect      = false;
            _sListView.Dock             = DockStyle.Fill;
            _sListView.ControlPadding   = 4;
            _sListView.HeaderStyle      = ColumnHeaderStyle.None;

            _comTestingArea               = new ComboBox();
            _comTestingArea.ValueMember   = "Id";
            _comTestingArea.DisplayMember = "CategoryName";
            _comTestingArea.DataSource    = _lstCategories;

            //add columns and items
            _sListView.Columns.Add(new EXColumnHeader("Category/Region Name", 200));
            EXEditableColumnHeader exEditCol = new EXEditableColumnHeader("Category/Region", _comTestingArea, 200);

            _sListView.Columns.Add(exEditCol);


            _sListView.EditableListViewSubitemValueChanged += new EventHandler <EXEditableListViewSubitemEventArgs>(_sListView_EditableListViewSubitemValueChanged);
            panel1.Controls.Add(_sListView);
        }
Exemple #2
0
        private void InitOtherListView()
        {
            _othListView                  = new SiteListView();
            _othListView.MySortBrush      = SystemBrushes.ControlLight;
            _othListView.MyHighlightBrush = Brushes.Goldenrod;
            _othListView.GridLines        = true;
            _othListView.MultiSelect      = false;
            _othListView.Dock             = DockStyle.Fill;
            _othListView.ControlPadding   = 4;
            _othListView.HeaderStyle      = ColumnHeaderStyle.Nonclickable;

            //add columns and items

            EXColumnHeader exEditCol = new EXColumnHeader("", 120);

            _othListView.Columns.Add(exEditCol);

            //string[] testname = Enum.GetNames(typeof(OtherTestNameEnum));
            var results = DataRepository.GetTestByPlatform(ClassOfMorbidityTestEnum.OtherTest.ToString());

            //for (int i = 0; i < testname.Length; i++)
            foreach (Test t in results)
            {
                EXEditableColumnHeader exCol = new EXEditableColumnHeader(t.TestName, 60);
                _othListView.Columns.Add(exCol);
            }

            _othListView.EditableListViewSubitemValueChanged += new EventHandler <EXEditableListViewSubitemEventArgs>(_othListView_EditableListViewSubitemValueChanged);

            tabOther.Controls.Add(_othListView);
        }
        private void LoadSiteListView()
        {
            _sListView                  = new SiteListView();
            _sListView.MySortBrush      = SystemBrushes.ControlLight;
            _sListView.MyHighlightBrush = Brushes.Goldenrod;
            _sListView.GridLines        = true;
            _sListView.MultiSelect      = false;
            _sListView.Dock             = DockStyle.Fill;
            _sListView.ControlPadding   = 4;
            _sListView.HeaderStyle      = ColumnHeaderStyle.Nonclickable;

            _comSupplies = new ComboBox();
            _comSupplies.Items.AddRange(Enum.GetNames(typeof(CollectionSupplieAppliedToEnum)));

            //add columns and items
            _sListView.Columns.Add(new EXColumnHeader("Product", 150));
            _sListView.Columns.Add(new EXColumnHeader("B.Unit", 60));
            EXEditableColumnHeader exEditCol = new EXEditableColumnHeader("U.Rate", 60);

            _sListView.Columns.Add(exEditCol);
            _sListView.Columns.Add(new EXColumnHeader("Quantify According to...", 100));

            exEditCol = new EXEditableColumnHeader("Supplies Apply to", _comSupplies, 100);
            _sListView.Columns.Add(exEditCol);

            _sListView.EditableListViewSubitemValueChanged += new EventHandler <EXEditableListViewSubitemEventArgs>(_sListView_EditableListViewSubitemValueChanged);
            _sListView.SelectedIndexChanged += new EventHandler(sListView_SelectedIndexChanged);
            panProduct.Controls.Add(_sListView);
        }
Exemple #4
0
        private void InitCD4ListView()
        {
            _cd4ListView                  = new SiteListView();
            _cd4ListView.MySortBrush      = SystemBrushes.ControlLight;
            _cd4ListView.MyHighlightBrush = Brushes.Goldenrod;
            _cd4ListView.GridLines        = true;
            _cd4ListView.MultiSelect      = false;
            _cd4ListView.Dock             = DockStyle.Fill;
            _cd4ListView.ControlPadding   = 4;
            _cd4ListView.HeaderStyle      = ColumnHeaderStyle.Nonclickable;

            //add columns and items
            EXEditableColumnHeader exEditCol = new EXEditableColumnHeader("", 120);

            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month1", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month2", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month3", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month4", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month5", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month6", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month7", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month8", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month9", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month10", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month11", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month12", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Tests/ year after month 12", 100);
            _cd4ListView.Columns.Add(exEditCol);

            _cd4ListView.EditableListViewSubitemValueChanged += new EventHandler <EXEditableListViewSubitemEventArgs>(_cd4ListView_EditableListViewSubitemValueChanged);

            tabCD4.Controls.Add(_cd4ListView);
        }
Exemple #5
0
        private void LoadSiteListView()
        {
            _sListView                  = new SiteListView();
            _sListView.MySortBrush      = SystemBrushes.ControlLight;
            _sListView.MyHighlightBrush = Brushes.Goldenrod;
            _sListView.GridLines        = true;
            _sListView.MultiSelect      = false;
            _sListView.Dock             = DockStyle.Fill;
            _sListView.ControlPadding   = 4;
            _sListView.HeaderStyle      = ColumnHeaderStyle.None;

            _comTestingArea               = new ComboBox();
            _comTestingArea.ValueMember   = "Id";
            _comTestingArea.DisplayMember = "CategoryName";
            //_comTestingArea.DataSource = _lstCategories;

            //add columns and items
            _sListView.Columns.Add(new EXColumnHeader("Region Name", 100));
            _sListView.Columns.Add(new EXColumnHeader("ART Site", 100));
            var colMsite = new EXEditableColumnHeader("Mapped Site", _comTestingArea, 200);

            _sListView.Columns.Add(colMsite);
            var colCat = new EXEditableColumnHeader("Category/Region", _comTestingArea, 200);

            _sListView.Columns.Add(colCat);
            _sListView.Columns.Add(new EXColumnHeader("CURRENT P.T", 130));
            _sListView.Columns.Add(new EXColumnHeader("CURRENT P.Pre-T", 130));
            _sListView.Columns.Add(new EXColumnHeader("EVER STARTED P.T", 130));
            _sListView.Columns.Add(new EXColumnHeader("EVER STARTED P.Pre-T", 130));
            _sListView.Columns.Add(new EXColumnHeader("VCT", 100));
            _sListView.Columns.Add(new EXColumnHeader("CD4", 100));
            _sListView.Columns.Add(new EXColumnHeader("Chemistry", 100));
            _sListView.Columns.Add(new EXColumnHeader("Hematology", 100));
            _sListView.Columns.Add(new EXColumnHeader("Viral Load", 100));
            _sListView.Columns.Add(new EXColumnHeader("Other Tests", 100));
            _sListView.Columns.Add(new EXColumnHeader("Consumables", 100));
            _sListView.Columns.Add(new EXColumnHeader("Exist", 100));
            _sListView.Columns.Add(new EXColumnHeader("Remarks", 165));

            _sListView.EditableListViewSubitemValueChanged += new EventHandler <EXEditableListViewSubitemEventArgs>(_sListView_EditableListViewSubitemValueChanged);
            _sListView.ComboBoxBeforeVisible += new EventHandler <EXEditableListViewComboBoxEventArgs>(_sListView_ComboBoxBeforeVisible);
            //panel1.Controls.Add(_sListView);
        }
Exemple #6
0
        private void LoadSiteListView()
        {
            _sListView = new SiteListView();
            _sListView.MySortBrush = SystemBrushes.ControlLight;
            _sListView.MyHighlightBrush = Brushes.Goldenrod;
            _sListView.GridLines = true;
            _sListView.MultiSelect = false;
            _sListView.Dock = DockStyle.Fill;
            _sListView.ControlPadding = 4;
            _sListView.HeaderStyle = ColumnHeaderStyle.None;

            _comTestingArea = new ComboBox();
            _comTestingArea.ValueMember = "Id";
            _comTestingArea.DisplayMember = "CategoryName";
            _comTestingArea.DataSource = _lstCategories;

            //add columns and items
            _sListView.Columns.Add(new EXColumnHeader("Category/Region Name", 200));
            EXEditableColumnHeader exEditCol = new EXEditableColumnHeader("Category/Region", _comTestingArea, 200);
            _sListView.Columns.Add(exEditCol);

            _sListView.EditableListViewSubitemValueChanged += new EventHandler<EXEditableListViewSubitemEventArgs>(_sListView_EditableListViewSubitemValueChanged);
            panel1.Controls.Add(_sListView);
        }
        private void LoadSiteListView()
        {
            _sListView = new SiteListView();
            _sListView.MySortBrush = SystemBrushes.ControlLight;
            _sListView.MyHighlightBrush = Brushes.Goldenrod;
            _sListView.GridLines = true;
            _sListView.MultiSelect = false;
            _sListView.Dock = DockStyle.Fill;
            _sListView.ControlPadding = 4;
            _sListView.HeaderStyle = ColumnHeaderStyle.Nonclickable;

            _comSupplies = new ComboBox();
            _comSupplies.Items.AddRange(Enum.GetNames(typeof(CollectionSupplieAppliedToEnum)));

            //add columns and items
            _sListView.Columns.Add(new EXColumnHeader("Product", 150));
            _sListView.Columns.Add(new EXColumnHeader("B.Unit", 60));
            EXEditableColumnHeader exEditCol = new EXEditableColumnHeader("U.Rate", 60);
            _sListView.Columns.Add(exEditCol);
            _sListView.Columns.Add(new EXColumnHeader("Quantify According to...", 100));

            exEditCol = new EXEditableColumnHeader("Supplies Apply to", _comSupplies, 100);
            _sListView.Columns.Add(exEditCol);

            _sListView.EditableListViewSubitemValueChanged += new EventHandler<EXEditableListViewSubitemEventArgs>(_sListView_EditableListViewSubitemValueChanged);
            _sListView.SelectedIndexChanged += new EventHandler(sListView_SelectedIndexChanged);
            panProduct.Controls.Add(_sListView);
        }
        private void this_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            EXListViewItem lstvItem = this.GetItemAt(e.X, e.Y) as EXListViewItem;
            if (lstvItem == null) 
                return;
            _clickeditem = lstvItem;
            int x = lstvItem.Bounds.Left;
            int i;
            for (i = 0; i < this.Columns.Count; i++)
            {
                x = x + this.Columns[i].Width;
                if (x > e.X)
                {
                    x = x - this.Columns[i].Width;
                    _clickedsubitem = lstvItem.SubItems[i];
                    _col = i;
                    break;
                }
            }
            
            if (!(this.Columns[i] is EXColumnHeader)) 
                return;
            
            EXColumnHeader col = (EXColumnHeader)this.Columns[i];
            if (col.GetType() == typeof(EXEditableColumnHeader))
            {
                EXEditableColumnHeader editcol = (EXEditableColumnHeader) col;
                if (editcol.MyControl != null)
                {
                    Control c = editcol.MyControl;
                    if (c.Tag != null)
                    {
                        this.Controls.Add(c);
                        c.Tag = null;
                        if (c is ComboBox)
                        {
                            ((ComboBox)c).SelectedValueChanged += new EventHandler(cmbx_SelectedValueChanged);
                        }
                        c.Leave += new EventHandler(c_Leave);
                    }

                    if (c is ComboBox)
                    {
                        if(ComboBoxBeforeVisible != null)
                            ComboBoxBeforeVisible(this, new EXEditableListViewComboBoxEventArgs(_clickeditem, (EXListViewSubItem)_clickedsubitem) );
                    }

                    c.Location = new Point(x, this.GetItemRect(this.Items.IndexOf(lstvItem)).Y);
                    c.Width = this.Columns[i].Width;
                    if (c.Width > this.Width) c.Width = this.ClientRectangle.Width;
                    c.Text = _clickedsubitem.Text;
                    c.Visible = true;
                    c.BringToFront();
                    c.Focus();
                }
                else
                {
                    txtbx.Location = new Point(x, this.GetItemRect(this.Items.IndexOf(lstvItem)).Y);
                    txtbx.Width = this.Columns[i].Width;
                    if (txtbx.Width > this.Width) txtbx.Width = this.ClientRectangle.Width;
                    txtbx.Text = _clickedsubitem.Text;
                    txtbx.Visible = true;
                    txtbx.BringToFront();
                    txtbx.Focus();
                }
            }
            else if (col.GetType() == typeof(EXBoolColumnHeader))
            {
                EXBoolColumnHeader boolcol = (EXBoolColumnHeader)col;
                if (boolcol.Editable)
                {
                    EXBoolListViewSubItem boolsubitem = (EXBoolListViewSubItem)_clickedsubitem;
                    if (boolsubitem.BoolValue == true)
                    {
                        boolsubitem.BoolValue = false;
                    }
                    else
                    {
                        boolsubitem.BoolValue = true;
                    }

                    if (BoolListViewSubItemValueChanged != null)
                    {
                        BoolListViewSubItemValueChanged(this, new EXBoolListViewSubItemEventArgs(_clickeditem, boolsubitem));
                    }
                    this.Invalidate(boolsubitem.Bounds);
                }
            }
        }
Exemple #9
0
        private void InitOtherListView()
        {
            _othListView = new SiteListView();
            _othListView.MySortBrush = SystemBrushes.ControlLight;
            _othListView.MyHighlightBrush = Brushes.Goldenrod;
            _othListView.GridLines = true;
            _othListView.MultiSelect = false;
            _othListView.Dock = DockStyle.Fill;
            _othListView.ControlPadding = 4;
            _othListView.HeaderStyle = ColumnHeaderStyle.Nonclickable;

            //add columns and items

            EXColumnHeader exEditCol = new EXColumnHeader("", 120);
            _othListView.Columns.Add(exEditCol);

            string[] testname = Enum.GetNames(typeof(OtherTestNameEnum));
            for (int i = 0; i < testname.Length; i++)
            {
                EXEditableColumnHeader exCol = new EXEditableColumnHeader(testname[i].Replace('_', ' '), 60);
                _othListView.Columns.Add(exCol);
            }

            _othListView.EditableListViewSubitemValueChanged += new EventHandler<EXEditableListViewSubitemEventArgs>(_othListView_EditableListViewSubitemValueChanged);

            tabOther.Controls.Add(_othListView);
        }
Exemple #10
0
        private void InitCD4ListView()
        {
            _cd4ListView = new SiteListView();
            _cd4ListView.MySortBrush = SystemBrushes.ControlLight;
            _cd4ListView.MyHighlightBrush = Brushes.Goldenrod;
            _cd4ListView.GridLines = true;
            _cd4ListView.MultiSelect = false;
            _cd4ListView.Dock = DockStyle.Fill;
            _cd4ListView.ControlPadding = 4;
            _cd4ListView.HeaderStyle = ColumnHeaderStyle.Nonclickable;

            //add columns and items
            EXEditableColumnHeader exEditCol = new EXEditableColumnHeader("", 120);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month1", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month2", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month3", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month4", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month5", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month6", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month7", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month8", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month9", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month10", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month11", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Month12", 60);
            _cd4ListView.Columns.Add(exEditCol);
            exEditCol = new EXEditableColumnHeader("Tests/ year after month 12", 100);
            _cd4ListView.Columns.Add(exEditCol);

            _cd4ListView.EditableListViewSubitemValueChanged += new EventHandler<EXEditableListViewSubitemEventArgs>(_cd4ListView_EditableListViewSubitemValueChanged);

            tabCD4.Controls.Add(_cd4ListView);
        }
Exemple #11
0
        private void LoadSiteListView()
        {
            _sListView = new SiteListView();
            _sListView.MySortBrush = SystemBrushes.ControlLight;
            _sListView.MyHighlightBrush = Brushes.Goldenrod;
            _sListView.GridLines = true;
            _sListView.MultiSelect = false;
            _sListView.Dock = DockStyle.Fill;
            _sListView.ControlPadding = 4;
            _sListView.HeaderStyle = ColumnHeaderStyle.None;

            _comTestingArea = new ComboBox();
            _comTestingArea.ValueMember = "Id";
            _comTestingArea.DisplayMember = "CategoryName";
            //_comTestingArea.DataSource = _lstCategories;

            //add columns and items
            _sListView.Columns.Add(new EXColumnHeader("Region Name", 100));
            _sListView.Columns.Add(new EXColumnHeader("ART Site", 100));
            var colMsite = new EXEditableColumnHeader("Mapped Site", _comTestingArea, 200);
            _sListView.Columns.Add(colMsite);
            var colCat = new EXEditableColumnHeader("Category/Region", _comTestingArea, 200);
            _sListView.Columns.Add(colCat);
            _sListView.Columns.Add(new EXColumnHeader("CURRENT P.T", 130));
            _sListView.Columns.Add(new EXColumnHeader("CURRENT P.Pre-T", 130));
            _sListView.Columns.Add(new EXColumnHeader("EVER STARTED P.T", 130));
            _sListView.Columns.Add(new EXColumnHeader("EVER STARTED P.Pre-T", 130));
            _sListView.Columns.Add(new EXColumnHeader("VCT", 100));
            _sListView.Columns.Add(new EXColumnHeader("CD4", 100));
            _sListView.Columns.Add(new EXColumnHeader("Chemistry", 100));
            _sListView.Columns.Add(new EXColumnHeader("Hematology", 100));
            _sListView.Columns.Add(new EXColumnHeader("Viral Load", 100));
            _sListView.Columns.Add(new EXColumnHeader("Other Tests", 100));
            _sListView.Columns.Add(new EXColumnHeader("Consumables", 100));
            _sListView.Columns.Add(new EXColumnHeader("Exist", 100));
            _sListView.Columns.Add(new EXColumnHeader("Remarks", 165));

            _sListView.EditableListViewSubitemValueChanged += new EventHandler<EXEditableListViewSubitemEventArgs>(_sListView_EditableListViewSubitemValueChanged);
            _sListView.ComboBoxBeforeVisible += new EventHandler<EXEditableListViewComboBoxEventArgs>(_sListView_ComboBoxBeforeVisible);
            //panel1.Controls.Add(_sListView);
        }