Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <CigarreteLeftCountInfo> list = new List <CigarreteLeftCountInfo>();

            list = CigarreteLeftCountClass.GetLeftCount(comboBox1.SelectedIndex + 2);
            codedata.DataSource = list;
        }
Ejemplo n.º 2
0
        public w_Cigarette_LeftCount()
        {
            InitializeComponent();
            comboBox1.SelectedIndex = 0;
            List <CigarreteLeftCountInfo> list = new List <CigarreteLeftCountInfo>();

            list = CigarreteLeftCountClass.GetLeftCount(comboBox1.SelectedIndex + 2);
            codedata.DataSource = list;
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            CigarreteLeftCountInfo info = new CigarreteLeftCountInfo()
            {
                CigaretteCode = itemno,
                CigaretteName = itemName,
                MachineSeq    = Convert.ToDecimal(machineseq),
                Threshold     = Convert.ToDecimal(tbhjws.Text),
                Mantissa      = Convert.ToDecimal(tbws.Text)
            };

            if (CigarreteLeftCountClass.UpdateLeftCount(info, groupNo))
            {
                MessageBox.Show("修改成功");
            }
            else
            {
                MessageBox.Show("修改失败");
            }
        }
Ejemplo n.º 4
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (this.codedata.SelectedRows.Count < 1)
     {
         MessageBox.Show("请选择一行修改");
     }
     else
     {
         w_CigaretteHandle repleish_handle = new w_CigaretteHandle(this.codedata.CurrentRow.Cells["cigarettecode"].Value.ToString(), this.codedata.CurrentRow.Cells["cigarettename"].Value.ToString(),
                                                                   this.codedata.CurrentRow.Cells["machineseq"].Value.ToString(),
                                                                   this.codedata.CurrentRow.Cells["mantissa"].Value.ToString(),
                                                                   this.codedata.CurrentRow.Cells["THRESHOLD"].Value.ToString(),
                                                                   comboBox1.SelectedIndex + 2
                                                                   );
         repleish_handle.WindowState   = FormWindowState.Normal;
         repleish_handle.StartPosition = FormStartPosition.CenterScreen;
         repleish_handle.ShowDialog();
         List <CigarreteLeftCountInfo> list = new List <CigarreteLeftCountInfo>();
         list = CigarreteLeftCountClass.GetLeftCount(comboBox1.SelectedIndex + 2);
         codedata.DataSource = list;
     }
 }