Exemplo n.º 1
0
        private void cboSelectionType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            UVoucherBuyProduct control = this;

            if (control.OnChanged != null)
            {
                control.OnChanged(control, null);
            }

            ComboBox cbo = sender as ComboBox;

            if (lkupItem != null)
            {
                lkupItem.Lookup         = LookupSearchType2.ServiceLookup;
                lkupItem.SelectedObject = null;
            }

            if (cbo.SelectedIndex == 0)
            {
                lkupItem.Lookup = LookupSearchType2.ServiceLookup;
            }
            else if (cbo.SelectedIndex == 1)
            {
                lkupItem.Lookup = LookupSearchType2.InventoryItemLookup;
            }
            else if (cbo.SelectedIndex == 2)
            {
                lkupItem.Lookup = LookupSearchType2.ItemCategoryLookup;
            }

            lkupItem.SelectedObject = null;

            updateObject();
        }
Exemplo n.º 2
0
        private void lkupItem_SelectedObjectChanged(object sender, EventArgs e)
        {
            UVoucherBuyProduct control = this;

            if (control.OnChanged != null)
            {
                control.OnChanged(control, null);
            }

            if (lkupItem != null)
            {
                lblUnit.Content = "";

                if (lkupItem.Lookup == LookupSearchType2.ServiceLookup)
                {
                    MService sv = (MService)lkupItem.SelectedObject;
                    if (sv != null)
                    {
                        lblUnit.Content = sv.ServiceUOMName;
                    }
                }
                else if (lkupItem.Lookup == LookupSearchType2.InventoryItemLookup)
                {
                    MInventoryItem sv = (MInventoryItem)lkupItem.SelectedObject;
                    if (sv != null)
                    {
                        lblUnit.Content = sv.ItemUOMName;
                    }
                }

                updateObject();
            }
        }
Exemplo n.º 3
0
        private void txtQuantity_TextChanged(object sender, TextChangedEventArgs e)
        {
            UVoucherBuyProduct control = this;

            if (control.OnChanged != null)
            {
                control.OnChanged(control, null);
            }

            updateObject();
        }
Exemplo n.º 4
0
        private void cbxEnable_Unchecked(object sender, RoutedEventArgs e)
        {
            UVoucherBuyProduct control = this;

            if (control.OnChanged != null)
            {
                control.OnChanged(control, null);
            }

            MPackageVoucher v = (MPackageVoucher)ProductSelected;

            if (v == null)
            {
                return;
            }

            v.EnabledFlag = "N";
        }