private void btnMModle_Click(object sender, EventArgs e) { InfoVindicate frmIV = new InfoVindicate(); frmIV.Text = "新建材料规格"; if (frmIV.ShowDialog() == DialogResult.OK) { SetMModel(); } }
private void btnPModel_Click(object sender, EventArgs e) { InfoVindicate frmVindicate = new InfoVindicate(); frmVindicate.Text = "新建产品规格"; if (frmVindicate.ShowDialog(this) == DialogResult.OK) { SetcbxModel(); } }
private void btnMKind_Click(object sender, EventArgs e) { InfoVindicate frmIV = new InfoVindicate(); frmIV.Text = "新建材料种类"; if (frmIV.ShowDialog(this) == DialogResult.OK) { SetMKind(); } }
private void btnPName_Click(object sender, EventArgs e) { InfoVindicate frmVindicate = new InfoVindicate(); if (!string.IsNullOrEmpty(cbxKind.Text.Trim())) { frmVindicate.KindId = Convert.ToInt32(cbxKind.SelectedValue.ToString()); } else { MessageBox.Show("产品种类不能为空!请选择材料各类!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cbxKind.Focus(); return; } frmVindicate.Text = "新建产品名称"; if (frmVindicate.ShowDialog(this) == DialogResult.OK) { cobBoBoxLinkage(); } }
private void btnKName_Click(object sender, EventArgs e) { InfoVindicate frmIV = new InfoVindicate(); frmIV.Text = "新建材料名称"; if (!string.IsNullOrEmpty(cbxMKind.Text.Trim())) { frmIV.KindId = Convert.ToInt32(cbxMKind.SelectedValue.ToString()); } else { MessageBox.Show("材料种类不能为空!请选择材料各类!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cbxMKind.Focus(); return; } if (frmIV.ShowDialog(this) == DialogResult.OK) { // 检查材料种类是否为空; if (!Check.CheckEmpty(cbxMKind.Text.Trim())) { MessageBox.Show("材料种类不能为空!请选择材料各类后在录入材料名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); cbxMKind.Focus(); return; } else { int mkId = Convert.ToInt32(cbxMKind.SelectedValue.ToString()); if (mLogic.InitialMNameComboBox(mkId).Rows.Count != 0) { cobBoBoxLinkage(); } else { cbxName.DataSource = mLogic.InitialMNameComboBox(mkId); } } } }