Ejemplo n.º 1
0
 public AmbleStock()
 {
     InitializeComponent();
     if (!UserCombine.GetuserCanBeLogistics().Contains((int)UserInfo.Job))
     {
         tsbImport.Enabled = false;
         tsbAdd.Enabled    = false;
         tsbDelete.Enabled = false;
     }
 }
Ejemplo n.º 2
0
        public SoItemsControl()
        {
            InitializeComponent();

            this.cbCurrency.Items.AddRange(
                Enum.GetNames(typeof(Currency))
                );
            if (!UserCombine.GetUserCanBeFinance().Contains((int)UserInfo.Job) && !UserCombine.GetuserCanBeLogistics().Contains((int)UserInfo.Job))
            {
                tbTrackingNo.ReadOnly = true;
                tbQtyShipped.ReadOnly = true;
            }
        }
Ejemplo n.º 3
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!UserCombine.GetuserCanBeLogistics().Contains((int)UserInfo.Job))
            {
                return;
            }

            if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
            {
                if (e.RowIndex > dataGridView1.RowCount - 1)
                {
                    return;
                }

                //get the real index.
                int stockId = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value);

                AmbleClient.AmbleStock.stockDataSet.amblestockRow selectedRow = null;

                foreach (AmbleClient.AmbleStock.stockDataSet.amblestockRow row in this.stockDataSet1.amblestock.Rows)
                {
                    if (row.stockId == stockId)
                    {
                        selectedRow = row;
                        break;
                    }
                }
                if (selectedRow != null)
                {
                    StockOp op = new StockOp(false);
                    op.FillTheTable(selectedRow);
                    if (DialogResult.OK == op.ShowDialog())
                    {
                        Stock_Load(this, null);
                    }
                }
            }
            RestoreSelectedRow();
        }