public override int Add() { FormBatchSheet form = new FormBatchSheet(); form.ShowDialog(); return(base.Add()); }
private void plCode_DoubleClick(object sender, EventArgs e) { FormBatchSheet form = new FormBatchSheet( ); if (form.ShowDialog( ) == DialogResult.OK) { _model = form.getModel; if (_model == null) { return; } plCode.Text = _model.plCode; } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } billNum = path = string.Empty; if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code1", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("配料单") == true) { if (IngredientTable == null || IngredientTable.IsDisposed) { IngredientTable = new FormBatchSheet(dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString()); IngredientTable.Show();//未打开,直接打开。 } else { IngredientTable.Activate();//已打开,获得焦点,置顶。 } } } else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code2", StringComparison.OrdinalIgnoreCase)) { if (Authority.ProcessControText("成品出库单") == true) { if (FinishedTable == null || FinishedTable.IsDisposed) { FinishedTable = new FormFinishedProductAssociation(dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString()); FinishedTable.Show();//未打开,直接打开。 } else { FinishedTable.Activate();//已打开,获得焦点,置顶。 } } } if (!string.IsNullOrEmpty(path)) { Reflected(path); } }
private void button1_Click(object sender, EventArgs e) { FormBatchSheet form = new FormBatchSheet(); form.ShowDialog(); }