Beispiel #1
0
        private void lv_ProductListing_MouseClick(object sender, MouseEventArgs e)
        {
            Int64  pID       = Int64.Parse(lv_ProductListing.SelectedItems[0].SubItems[0].Text);
            string pName     = lv_ProductListing.SelectedItems[0].SubItems[1].Text;
            string pCode     = lv_ProductListing.SelectedItems[0].SubItems[2].Text;
            string pCompany  = lv_ProductListing.SelectedItems[0].SubItems[3].Text;
            string pStock    = lv_ProductListing.SelectedItems[0].SubItems[4].Text;
            string pCategory = lv_ProductListing.SelectedItems[0].SubItems[5].Text;

            ListViewClicked lv = new ListViewClicked(pID, pName, pCode, pCompany, pStock, pCategory);

            lv.Show();
        }
Beispiel #2
0
        // =================================== end of search in database type in textbox ============================

        private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0 && e.ColumnIndex != 6)
            {
                Int64  pID        = Int64.Parse(dataGridView.Rows[e.RowIndex].Cells[0].Value.ToString());
                string pName      = dataGridView.Rows[e.RowIndex].Cells[1].Value.ToString();
                string pCode      = dataGridView.Rows[e.RowIndex].Cells[2].Value.ToString();
                string pCompany   = dataGridView.Rows[e.RowIndex].Cells[3].Value.ToString();
                string pStockUnit = dataGridView.Rows[e.RowIndex].Cells[4].Value.ToString();
                string pCategory  = dataGridView.Rows[e.RowIndex].Cells[5].Value.ToString();


                ListViewClicked lv = new ListViewClicked(pID, pName, pCode, pCompany, pStockUnit, pCategory);
                lv.Show();
            }
        }