Пример #1
0
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            // Event for cell mouse click

            // MessageBox.Show("Cell Mouse Click Invoked");

            Point count  = dataGridView1.CurrentCellAddress;
            int   countt = count.Y;

            dataTable_selected = dataAccess.GetData("use ApteanEdgeBank select * from Customer where CustomerID=1233+" + countt.ToString(), UserDAO.connectionString);


            //  MessageBox.Show(countt.ToString());


            EditCustomerProfile nextForm = new EditCustomerProfile();

            nextForm.customerID = dataTable_selected.Rows[countt]["CustomerID"].ToString();
            // MessageBox.Show(nextForm.customerID);
            nextForm.firstName   = dataTable_selected.Rows[countt]["FirstName"].ToString();
            nextForm.middleName  = dataTable_selected.Rows[countt]["MiddleName"].ToString();
            nextForm.lastName    = dataTable_selected.Rows[countt]["LastName"].ToString();
            nextForm.dateOfBirth = dataTable_selected.Rows[countt]["DateOfBirth"].ToString();

            //nextForm.customerID=dataTable
            nextForm.ShowDialog();
        }
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            // Event for cell mouse click

               // MessageBox.Show("Cell Mouse Click Invoked");

            Point count = dataGridView1.CurrentCellAddress;
            int countt=count.Y;
            dataTable_selected = dataAccess.GetData("use ApteanEdgeBank select * from Customer where CustomerID=1233+"+countt.ToString(), UserDAO.connectionString);

              //  MessageBox.Show(countt.ToString());

            EditCustomerProfile nextForm = new EditCustomerProfile();
            nextForm.customerID = dataTable_selected.Rows[countt]["CustomerID"].ToString();
              // MessageBox.Show(nextForm.customerID);
            nextForm.firstName = dataTable_selected.Rows[countt]["FirstName"].ToString();
            nextForm.middleName = dataTable_selected.Rows[countt]["MiddleName"].ToString();
            nextForm.lastName = dataTable_selected.Rows[countt]["LastName"].ToString();
            nextForm.dateOfBirth = dataTable_selected.Rows[countt]["DateOfBirth"].ToString();

            //nextForm.customerID=dataTable
            nextForm.ShowDialog();
        }