示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String caseno      = cbexistingpacking.Text.Trim();
            String boxno       = "";
            String grade       = "";
            String size        = "";
            Int32  id_species  = 0;
            String opt         = Properties.Settings.Default.username;
            String producttype = cbproducttype.Text.Trim();
            String productsize = cbproductsize.Text.Trim();

            List <object[]> dtpacking = new List <object[]>();
            MainMenu        frm       = new MainMenu();

            // dtpacking = frm.get_data_table_string("tbpacking", "case_number",caseno);
            dtpacking = frm.get_data_table_string_fieldname("tbpacking", "box_number, grade, packingsize, id_species,productname,productpacking", "case_number", caseno);
            if (dtpacking.Count > 0)
            {
                boxno       = dtpacking[0][0].ToString();
                grade       = dtpacking[0][1].ToString();
                size        = dtpacking[0][2].ToString();
                id_species  = Int32.Parse(dtpacking[0][3].ToString());
                producttype = dtpacking[0][4].ToString();
                productsize = dtpacking[0][5].ToString();
            }

            this.Hide();
            frmPacking fc = new frmPacking();

            fc.Closed += (s, args) => this.Close();

            fc.setInitialValue(caseno, boxno, grade, size, producttype, productsize);
            fc.ShowDialog();
        }
示例#2
0
        void packingentry(object sender, EventArgs e, String caseno, String boxno, String grade, String size)
        {
            String producttype = "";
            String productsize = "";

            producttype = cbproducttype.Text.Trim();
            productsize = cbproductsize.Text.Trim();
            var current = sender as Button;

            this.Hide();
            var frmPacking = new frmPacking();

            frmPacking.Closed += (s, args) => this.Close();

            frmPacking fc = new frmPacking();

            fc.setInitialValue(caseno, boxno, grade, size, producttype, productsize);
            fc.ShowDialog();
        }
示例#3
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.Rows[e.RowIndex].Cells[1].Value == null)
            {
                return;
            }

            if (e.ColumnIndex == 6 && e.RowIndex >= 0 && dataGridView1.Rows.Count > 0)
            {
                String caseno      = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
                String boxno       = "";
                String grade       = "";
                String size        = "";
                Int32  id_species  = 0;
                String opt         = Properties.Settings.Default.username;
                String producttype = lblproduktype.Text;
                String productsize = lblproduksize.Text;

                List <object[]> dtpacking = new List <object[]>();
                MainMenu        frm       = new MainMenu();
                //dtpacking = frm.get_data_table_string("tbpacking", "case_number", caseno);
                dtpacking = frm.get_data_table_string_fieldname("tbpacking", "box_number,grade,packingsize,id_species,productname,productpacking", "case_number", caseno);
                if (dtpacking.Count > 0)
                {
                    boxno       = dtpacking[0][0].ToString();
                    grade       = dtpacking[0][1].ToString();
                    size        = dtpacking[0][2].ToString();
                    id_species  = Int32.Parse(dtpacking[0][3].ToString());
                    producttype = dtpacking[0][4].ToString();
                    productsize = dtpacking[0][5].ToString();
                }

                this.Hide();
                frmPacking fc = new frmPacking();
                fc.Closed += (s, args) => this.Close();

                fc.setInitialValue(caseno, boxno, grade, size, producttype, productsize);
                fc.ShowDialog();
            }
        }