Beispiel #1
0
        private void bUpdate_Click(object sender, EventArgs e)
        {
            string strID      = dataGridViewX1.SelectedCells[0].Value.ToString().Trim();
            string strName    = dataGridViewX1.SelectedCells[1].Value.ToString().Trim();
            string strPinYin  = dataGridViewX1.SelectedCells[2].Value.ToString().Trim();
            string strSex     = dataGridViewX1.SelectedCells[3].Value.ToString().Trim();
            string strInDate  = dataGridViewX1.SelectedCells[4].Value.ToString().Trim();
            string strOutDate = dataGridViewX1.SelectedCells[5].Value.ToString().Trim();
            string strSound   = dataGridViewX1.SelectedCells[6].Value.ToString().Trim();

            sgFrmUpdate sgFrmUpdate = new sgFrmUpdate(strID, strName, strPinYin, strSex, strInDate, strOutDate, strSound);

            sgFrmUpdate.uMD += new upManData(sgFrmUpdate_uMD);
            sgFrmUpdate.Show();
        }
Beispiel #2
0
        private void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            //MessageBox.Show(dataGridViewX1.Rows[e.RowIndex].Cells[0].Value.ToString());
            string strID      = dataGridViewX1.Rows[e.RowIndex].Cells[0].Value.ToString();
            string strName    = dataGridViewX1.Rows[e.RowIndex].Cells[1].Value.ToString();
            string strPinYin  = dataGridViewX1.Rows[e.RowIndex].Cells[2].Value.ToString();
            string strSex     = dataGridViewX1.Rows[e.RowIndex].Cells[3].Value.ToString();
            string strInDate  = dataGridViewX1.Rows[e.RowIndex].Cells[4].Value.ToString();
            string strOutDate = dataGridViewX1.Rows[e.RowIndex].Cells[5].Value.ToString();
            string strSound   = dataGridViewX1.Rows[e.RowIndex].Cells[6].Value.ToString();

            sgFrmUpdate sgFrmUpdate = new sgFrmUpdate(strID, strName, strPinYin, strSex, strInDate, strOutDate, strSound);

            sgFrmUpdate.uMD += new upManData(sgFrmUpdate_uMD);
            sgFrmUpdate.Show();
        }