Exemple #1
0
        private void OpenSelectedAutoPartDetail(int rowIndex)
        {
            int id = (int)dataGridView1.Rows[rowIndex].Cells["IdColumn"].Value;

            selectedId = id;

            if (!AllowSelect)
            {
                ViewItemForm form = new ViewItemForm();
                form.AutoPartDetailId = id;
                form.FormClosed      += new FormClosedEventHandler(form_FormClosed);
                form.Owner            = this.ParentForm;
                form.Show();
            }
            else
            {
                DataGridViewRow row = dataGridView1.Rows[rowIndex];
                if (row != null)
                {
                    string partNumber = row.Cells["PartNumberColumn"].Value.ToString();
                    int    qty        = (int)row.Cells["QtyColumn"].Value;

                    SearchItemForm f = (SearchItemForm)this.ParentForm;
                    f.PartId     = id;
                    f.Quantity   = qty;
                    f.PartNumber = partNumber;
                }
            }
        }
Exemple #2
0
        private void FindItemButton_Click(object sender, EventArgs e)
        {
            SearchItemForm form = new SearchItemForm();

            form.Owner         = this.ParentForm;
            form.ItemSelected += this.ItemSelected;
            form.Show();
        }
Exemple #3
0
        private void MtlSearchItem_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            SearchItemForm searchItemForm = new SearchItemForm();

            searchItemForm.Location = this.Location;
            searchItemForm.ShowDialog();
            this.Close();
        }