public static frmClientAccountEdit GetInstance(FrontEndAccountEntityTemp model)
 {
     if (frmCAccountEdit == null)
     {
         frmCAccountEdit = new frmClientAccountEdit(model);
     }
     return(frmCAccountEdit);
 }
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridView1.Columns[e.ColumnIndex].Name == "Operate")
     {
         //可以在此打开新窗口,把参数传递过去
         model.AccountID     = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString());
         model.ProjectNumber = this.dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
         model.ProjectName   = this.dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();
         model.Account       = this.dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString();
         frmClientAccountEdit fm = new frmClientAccountEdit();
         fm.ShowDialog();
     }
 }
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int accountid = 0;

            if (dataGridView1.Columns[e.ColumnIndex].Name == "Operate")
            {
                //可以在此打开新窗口,把参数传递过去
                accountid = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
                model     = temp.Where(x => x.AccountID == accountid).FirstOrDefault();
                frmClientAccountEdit fm = frmClientAccountEdit.GetInstance(model);
                fm.Exec(model);
                fm.ShowDialog();
            }
        }