Beispiel #1
0
 private void BtnSubmit_Click(object sender, EventArgs e)
 {
     if (info1.MachineSeq > 0 && info1.ThroughNum != "" && info1.CigaretteCode != "" && info1.CigaretteName != "")
     {
         info = info1;
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
     else
     {
         MessageBox.Show("请先点击选择您要的通道,再进行提交!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #2
0
        private void BtnNewCheck_Click(object sender, EventArgs e)
        {
            w_SortReplaceHandle frm = new w_SortReplaceHandle();

            frm.ShowDialog();

            SortReplaceInfo info = new SortReplaceInfo();

            info = frm.ReturnObj;
            TxtNewThrough.Text = info.MachineSeq.ToString();
            LblNewCode.Text    = info.CigaretteCode;
            LblNewName.Text    = info.CigaretteName;
        }
Beispiel #3
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     info1 = new SortReplaceInfo();
     if (e.RowIndex > -1)
     {
         if (this.dataGridView1.CurrentRow != null && this.dataGridView1.CurrentRow.Index != -1)
         {
             BtnSubmit.Enabled   = true;
             info1.MachineSeq    = Convert.ToDecimal(dataGridView1.CurrentRow.Cells[0].Value);
             info1.ThroughNum    = dataGridView1.CurrentRow.Cells[1].Value.ToString();
             info1.CigaretteCode = dataGridView1.CurrentRow.Cells[2].Value.ToString();
             info1.CigaretteName = dataGridView1.CurrentRow.Cells[3].Value.ToString();
         }
         else
         {
             BtnSubmit.Enabled = false;
         }
     }
 }