Example #1
0
        private void FillOrderLinesListView(ListViewPanelItem lvpi, Gizmox.WebGUI.Forms.ListView lvSub, string orderID)
        {
            var dtOrderLines = _northWind.Order_Details;

            lvpi.Panel.Height = 0;
            int cnt = 0;

            lvSub.Items.Clear();

            foreach (DataRow row in dtOrderLines.Rows)
            {
                if (row["OrderID"].ToString() == orderID)
                {
                    var lvi = new ListViewItem();
                    lvi.SubItems.Add(row["Quantity"].ToString());
                    lvi.SubItems.Add(GetProductDescrption(row["ProductID"].ToString()));
                    lvi.SubItems.Add("$ " + row["UnitPrice"]);
                    lvSub.Items.Add(lvi);
                    cnt += 1;
                }
            }
            lvpi.Panel.Height = cnt * 18;
            ((RowTag)lvpi.ListView.Items[0].Tag).Container.Panel.Height =
                ((lvpi.ListView.Items.Count) * 19) + lvpi.Panel.Height;
        }
Example #2
0
        private Gizmox.WebGUI.Forms.ListView BuildOrderLinesListView()
        {
            var lv = new Gizmox.WebGUI.Forms.ListView();

            lv.BorderStyle = BorderStyle.None;
            lv.HeaderStyle = ColumnHeaderStyle.None;

            var ch = new ColumnHeader();

            ch.Text  = "Quantity";
            ch.Width = 30;
            ch.Type  = ListViewColumnType.Text;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            ch       = new ColumnHeader();
            ch.Text  = "Product";
            ch.Width = 300;
            ch.Type  = ListViewColumnType.Text;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            ch       = new ColumnHeader();
            ch.Text  = "Price";
            ch.Width = 100;
            ch.Type  = ListViewColumnType.Text;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            return(lv);
        }
Example #3
0
        private void FillOrderListView(ListViewPanelItem lvpi, Gizmox.WebGUI.Forms.ListView lvSub, string customerID)
        {
            var dtOrders = _northWind.Orders;

            lvpi.Panel.Height = 0;
            int cnt = 0;

            lvSub.Items.Clear();

            foreach (DataRow row in dtOrders.Rows)
            {
                if (row["CustomerID"].ToString() == customerID)
                {
                    var pnl = new Panel();
                    pnl.DockPadding.Left = 20;
                    var lvspi = new ListViewPanelItem(pnl);

                    var pb = new PictureBox();
                    pb.Size   = new Size(16, 16);
                    pb.Tag    = lvspi;
                    pb.Click += pbOrders_Click;
                    lvspi.SubItems.Add(pb);

                    var lbl = new Label();
                    lbl.Font      = new Font("Arial", 10F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
                    lbl.ForeColor = Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(134)))),
                                                   ((int)(((byte)(231)))));
                    lbl.Text     = row["OrderID"].ToString();
                    lbl.Click   += lblOrders_Click;
                    lbl.AutoSize = true;
                    lbl.Tag      = lvspi;
                    lbl.Cursor   = Cursors.Hand;
                    lvspi.SubItems.Add(lbl);

                    lvSub.Items.Add(lvspi);

                    var rowTag = new RowTag();
                    rowTag.ID           = row["OrderID"].ToString();
                    rowTag.Container    = lvpi;
                    rowTag.RowExpansion = RowExpansionType.Expanded;
                    rowTag.Label        = lbl;
                    rowTag.PictureBox   = pb;
                    lvspi.Tag           = rowTag;

                    ToggleOrdersRowExpansion(lvspi);

                    cnt += 1;
                }
            }
            lvpi.Panel.Height = cnt * 19;
        }
Example #4
0
        private void BuildCustomerListView(Gizmox.WebGUI.Forms.ListView lv)
        {
            lv.BorderStyle = BorderStyle.None;
            lv.HeaderStyle = ColumnHeaderStyle.None;

            var ch = new ColumnHeader();

            ch.Text  = "";
            ch.Width = 16;
            ch.Type  = ListViewColumnType.Control;
            ch.PreferedItemHeight = 16;
            lvMain.Columns.Add(ch);

            ch       = new ColumnHeader();
            ch.Text  = "";
            ch.Width = 300;
            ch.Type  = ListViewColumnType.Control;
            lvMain.Columns.Add(ch);
        }
Example #5
0
        private void FillCustomersListView(Gizmox.WebGUI.Forms.ListView lv)
        {
            var dtCustomers = _northWind.Customers;

            foreach (DataRow row in dtCustomers.Rows)
            {
                var pnl = new Panel();
                pnl.DockPadding.Left = 20;
                var lvpi = new ListViewPanelItem(pnl);
                pnl.Height = 200;

                var pb = new PictureBox();
                pb.Size   = new Size(16, 16);
                pb.Tag    = lvpi;
                pb.Click += pbCustomers_Click;
                lvpi.SubItems.Add(pb);

                var lbl = new Label();
                lbl.Font      = new Font("Arial", 11F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
                lbl.ForeColor = Color.FromArgb(24, 134, 231);
                lbl.Text      = row["CompanyName"].ToString();
                lbl.Click    += lblCustomers_Click;
                lbl.AutoSize  = true;
                lbl.Tag       = lvpi;
                lbl.Cursor    = Cursors.Hand;
                lvpi.SubItems.Add(lbl);

                lvMain.Items.Add(lvpi);

                var rowTag = new RowTag();
                rowTag.ID           = row["CustomerID"].ToString();
                rowTag.RowExpansion = RowExpansionType.Expanded;
                rowTag.Label        = lbl;
                rowTag.PictureBox   = pb;
                lvpi.Tag            = rowTag;

                ToggleCustomerRowExpansion(lvpi);
            }
        }
Example #6
0
        private Gizmox.WebGUI.Forms.ListView BuildOrderListView()
        {
            var lv = new Gizmox.WebGUI.Forms.ListView();

            lv.BorderStyle = BorderStyle.None;
            lv.HeaderStyle = ColumnHeaderStyle.None;

            var ch = new ColumnHeader();

            ch.Text  = "";
            ch.Width = 16;
            ch.Type  = ListViewColumnType.Control;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            ch       = new ColumnHeader();
            ch.Text  = "";
            ch.Width = 300;
            ch.Type  = ListViewColumnType.Control;
            lv.Columns.Add(ch);

            return(lv);
        }
Example #7
0
        private Gizmox.WebGUI.Forms.ListView BuildOrderLinesListView()
        {
            var lv = new Gizmox.WebGUI.Forms.ListView();
            lv.BorderStyle = BorderStyle.None;
            lv.HeaderStyle = ColumnHeaderStyle.None;

            var ch = new ColumnHeader();
            ch.Text = "Quantity";
            ch.Width = 30;
            ch.Type = ListViewColumnType.Text;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            ch = new ColumnHeader();
            ch.Text = "Product";
            ch.Width = 300;
            ch.Type = ListViewColumnType.Text;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            ch = new ColumnHeader();
            ch.Text = "Price";
            ch.Width = 100;
            ch.Type = ListViewColumnType.Text;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            return lv;
        }
Example #8
0
        private Gizmox.WebGUI.Forms.ListView BuildOrderListView()
        {
            var lv = new Gizmox.WebGUI.Forms.ListView();
            lv.BorderStyle = BorderStyle.None;
            lv.HeaderStyle = ColumnHeaderStyle.None;

            var ch = new ColumnHeader();
            ch.Text = "";
            ch.Width = 16;
            ch.Type = ListViewColumnType.Control;
            ch.PreferedItemHeight = 16;
            lv.Columns.Add(ch);

            ch = new ColumnHeader();
            ch.Text = "";
            ch.Width = 300;
            ch.Type = ListViewColumnType.Control;
            lv.Columns.Add(ch);

            return lv;
        }