private void btn_amend_Click(object sender, EventArgs e) { int count = this.troughdata.SelectedRows.Count; if (count > 0) { String type = this.troughdata.CurrentRow.Cells["type"].Value + ""; if (type.Equals("30") || type.Equals("40")) { return; } amend_id = this.troughdata.SelectedRows[0].Cells["id"].Value.ToString(); sign = "1"; String cigarettetype = this.troughdata.CurrentRow.Cells["ctype"].Value + ""; String type1 = this.troughdata.CurrentRow.Cells["type"].Value + ""; win_trough_handle trough_handle = new win_trough_handle(sign, amend_id, cigarettetype, type1); trough_handle.WindowState = FormWindowState.Normal; trough_handle.StartPosition = FormStartPosition.CenterScreen; trough_handle.ShowDialog(); seek(); } else { MessageBox.Show("请点击选择您要修改的设备通道!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public win_cigarette_choose(win_trough_handle form, List <string> lst) { InitializeComponent(); init(); win_parent = form; infolst = lst; }
private void button2_Click(object sender, EventArgs e) { win_trough_handle trough_handle = new win_trough_handle("0", "", "40", "10"); trough_handle.WindowState = FormWindowState.Normal; trough_handle.StartPosition = FormStartPosition.CenterScreen; trough_handle.ShowDialog(); }
private void btn_new_Click(object sender, EventArgs e) { sign = "0"; win_trough_handle trough_handle = new win_trough_handle(sign, "", "30", ""); trough_handle.WindowState = FormWindowState.Normal; trough_handle.StartPosition = FormStartPosition.CenterScreen; trough_handle.ShowDialog(); seek(); }
private void btn_amend_Click(object sender, EventArgs e) { int count = this.troughdata.SelectedRows.Count; if (count > 0) { amend_id = this.troughdata.SelectedRows[0].Cells[1].Value.ToString(); sign = "1"; win_trough_handle trough_handle = new win_trough_handle(sign, amend_id, "30", ""); trough_handle.WindowState = FormWindowState.Normal; trough_handle.StartPosition = FormStartPosition.CenterScreen; trough_handle.ShowDialog(); seek(); } else { MessageBox.Show("请点击选择您要修改的分拣通道!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }