Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            w_Through_Handle trough_handle = new w_Through_Handle("0", "0", "30", "10", "", 0, "0");

            trough_handle.WindowState   = FormWindowState.Normal;
            trough_handle.StartPosition = FormStartPosition.CenterScreen;
            trough_handle.ShowDialog();
        }
Пример #2
0
        private void btn_amend_Click(object sender, EventArgs e)
        {
            int count = this.troughdata.SelectedRows.Count;

            if (count > 0)
            {
                String type = this.troughdata.CurrentRow.Cells["GroupNo"].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["cigarettetype"].Value + "";
                String type1         = this.troughdata.CurrentRow.Cells["GroupNo"].Value + "";
                String id            = this.troughdata.CurrentRow.Cells["ID"].Value + "";
                string machineSeq    = this.troughdata.CurrentRow.Cells["MachineSeq"].Value + "";
                //decimal groupNo = Convert.ToDecimal(this.troughdata.CurrentRow.Cells["groupNo"].Value);
                decimal groupNo = 0;
                groupNo = (decimal)this.troughdata.CurrentRow.Cells["GroupNo"].Value;
                //if (tt == "特异形烟")
                //    groupNo = 1;
                //else if (tt == "立式烟仓")
                //    groupNo = 2;
                //else
                //    groupNo = 3;
                string lastCigarettecode = "";
                try
                {
                    lastCigarettecode = this.troughdata.CurrentRow.Cells["cigarettecode"].Value.ToString();
                }
                catch { }



                w_Through_Handle trough_handle = new w_Through_Handle(sign, amend_id, cigarettetype, type1, machineSeq, groupNo, lastCigarettecode);
                trough_handle.WindowState   = FormWindowState.Normal;
                trough_handle.StartPosition = FormStartPosition.CenterScreen;
                trough_handle.ShowDialog();
                Bind();
            }
            else
            {
                MessageBox.Show("请点击选择您要修改的设备通道!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }