示例#1
0
        private void 查看ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AskPriceView apv = new AskPriceView();

            apv.askpriceID = this.dataGridView1[1, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
            apv.model      = this.dataGridView1[2, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
            apv.price      = this.dataGridView1[4, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
            apv.num        = this.dataGridView1[5, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
            apv.type       = this.dataGridView1[6, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
            apv.remark     = this.dataGridView1[13, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
            apv.username   = username;
            if (apv.ShowDialog() == DialogResult.Cancel)
            {
                init();
            }
        }
示例#2
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (this.dataGridView1.CurrentCell != null)
     {
         if (this.dataGridView1.CurrentCell.RowIndex != -1)
         {
             if (this.dataGridView1[1, this.dataGridView1.CurrentCell.RowIndex].Value != null)
             {
                 AskPriceView apv = new AskPriceView();
                 apv.askpriceID = this.dataGridView1[1, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
                 apv.model      = this.dataGridView1[2, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
                 apv.price      = this.dataGridView1[4, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
                 apv.num        = this.dataGridView1[5, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
                 apv.type       = this.dataGridView1[6, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
                 apv.remark     = this.dataGridView1[13, this.dataGridView1.CurrentCell.RowIndex].Value.ToString();
                 apv.username   = username;
                 if (apv.ShowDialog() == DialogResult.Cancel)
                 {
                     init();
                 }
             }
         }
     }
 }