Exemplo n.º 1
0
        private void dataG_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != -1 && e.RowIndex != -1)
            {

                string id = "";
                try
                {
                    id = dataG[0, e.RowIndex].Value.ToString();
                }
                catch (Exception) { }

                if (id != "")
                {
                    if (e.ColumnIndex == 2)
                    {
                        listSuppConst mt = new listSuppConst(id);
                        mt.ShowDialog();
                    }
                    if (e.ColumnIndex == 3)
                    {
                        listDriverConst mt = new listDriverConst(id);
                        mt.ShowDialog();
                    }
                    if (e.ColumnIndex == 4)
                    {
                        listFaceConst mt = new listFaceConst(id);
                        mt.ShowDialog();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void dataG_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            string id = "";
            try
            {
                id = dataG[0, dataG.SelectedRows[0].Index].Value.ToString();
            }
            catch (Exception) { }

            if (id != "")
            {
                if (this.t == "1")
                {
                    listSuppConst mt = new listSuppConst(id);
                    mt.ShowDialog();
                }
                if (this.t == "2")
                {
                    listDriverConst mt = new listDriverConst(id);
                    mt.ShowDialog();
                }
                if (this.t == "3")
                {
                    listFaceConst mt = new listFaceConst(id);
                    mt.ShowDialog();
                }

            }
        }