示例#1
0
        public ManageSkuMiniPanel(DataRow in_source, Control in_parent, DataTable in_pointsOfSale) : this()
        {
            _source     = in_source;
            _skuInStock = SkuInStock.Restore(Article.Restore((int)(long)_source["id"]), Registry.CurrentPointOfSale);
            Parent      = in_parent;

            T_Name.Text            = _skuInStock.Article.Name;
            T_PriceOfSell.Text     = _skuInStock.Article.PriceOfSell.ToString();
            T_InStock.Text         = _skuInStock.TotalAmount.ToString();
            T_PriceOfPurchase.Text = _skuInStock.Article.PriceOfPurchase.ToString();
            T_PriceOfSellPlan.Text = _skuInStock.Article.PriceOfSell.ToString();
            T_Amount.Text          = "0";

            CB_PointsOfSale.Items.AddRange(LiteBizItem.FromTable(in_pointsOfSale).ToArray());
            if (CB_PointsOfSale.Items.Count != 0)
            {
                CB_PointsOfSale.SelectedIndex = 0;
            }
            else
            {
                CB_PointsOfSale.Enabled = false;
                B_Move.Enabled          = false;
            }

            if (_skuInStock.Article.Matrix.IsSingleCell)
            {
                _selectedCell = _skuInStock[0, 0];

                T_CellX.Visible = false;
                T_CellY.Visible = false;
                B_Net.Visible   = false;

                PAN_NoNet.Visible = true;
            }
        }
示例#2
0
 public static void SelectBizItem(this ComboBox in_comboBox, int in_id)
 {
     for (int i = 0; i < in_comboBox.Items.Count; i++)
     {
         LiteBizItem item = in_comboBox.Items[i] as LiteBizItem;
         if (item.Value == in_id)
         {
             in_comboBox.SelectedIndex = i;
             break;
         }
     }
 }
示例#3
0
        public PanelAddSku()
        {
            InitializeComponent();

            PAN_SkuParams.Enabled = false;

            _defaultWidth  = Width;
            _defaultHeight = Height;

            LB_Sku.Text    = string.Format(Resources.SKU_IN_STOCK, Registry.CurrentPointOfSale.Name);
            LU_Search.Text = string.Format(Resources.CLICK_TO_VIEW_SELL_MOVE_SKU, Registry.CurrentPointOfSale.Name);

            Width = Math.Max(Math.Max(LB_Sku.Width, LU_Search.Width), Width);

            CB_NetType.Items.AddRange(LiteBizItem.FromTable(DressMatrix.ReadAll()).ToArray <LiteBizItem>());
            if (CB_NetType.Items.Count != 0)
            {
                CB_NetType.SelectedIndex = 0;
            }

            _modified = false;
        }