Esempio n. 1
0
        private void FillControls()
        {
            orderDateLabel.Text = ((DateTime)order.Order_orderDate).Date.ToString("MM/dd/yyyy");
            orderComboBox.Text  = order.Order_orderDesc;
            group = ((OrdersView)owningView).Controls["groupComboBox"].Text;

            if (otl != null)
            {
                //set the correct list of available orders showing based on the OrdersView group
                String existingOrderValue = orderComboBox.Text;
                orderComboBox.Clear();

                if (group.Equals("All Groups"))
                {
                    //orderComboBox.Items.AddRange(otl.Select(g => ((OrderTypeObject)g).orderDescription).ToArray());
                    AutoCompleteUtils.fillComboBoxFromArray(orderComboBox, otl.Select(g => ((OrderTypeObject)g).orderDescription).ToArray());
                }
                else
                {
                    AutoCompleteUtils.fillComboBoxFromArray(orderComboBox,
                                                            otl.Where(g => ((OrderTypeObject)g).grouping.Equals(group))
                                                            .Select(t => ((OrderTypeObject)t).orderDescription).ToArray());
                }


                if (!String.IsNullOrEmpty(existingOrderValue))
                {
                    orderComboBox.setText(existingOrderValue);
                }
            }
        }
Esempio n. 2
0
        private void orderComboBox_Enter(object sender, EventArgs e)
        {
            //set the correct list of available orders showing based on the OrdersView group
            String existingOrderValue = orderComboBox.Text;

            orderComboBox.Clear();

            group = ((OrdersView)owningView).Controls["groupComboBox"].Text;

            if (otl != null)
            {
                if (group.Equals("All Groups"))
                {
                    //orderComboBox.Items.AddRange(otl.Select(g => ((OrderTypeObject)g).orderDescription).ToArray());
                    AutoCompleteUtils.fillComboBoxFromArray(orderComboBox, otl.Select(g => ((OrderTypeObject)g).orderDescription).ToArray());
                }
                else
                {
                    AutoCompleteUtils.fillComboBoxFromArray(orderComboBox,
                                                            otl.Where(g => ((OrderTypeObject)g).grouping.Equals(group))
                                                            .Select(t => ((OrderTypeObject)t).orderDescription).ToArray());
                }


                if (!String.IsNullOrEmpty(existingOrderValue))
                {
                    orderComboBox.setText(existingOrderValue);
                }
            }
        }
Esempio n. 3
0
        private void OrderTypesLoaded(HraListLoadedEventArgs e)
        {
            otl = SessionManager.Instance.MetaData.OrderTypes;

            groupComboBox.Clear();
            AutoCompleteUtils.fillComboBoxFromArray(groupComboBox, otl.Select(g => ((OrderTypeObject)g).grouping).Distinct().ToArray());
            groupComboBox.addItem("All Groups");

            groupComboBox.setText("All Groups");
        }