Beispiel #1
0
        private void InputPacking_Load(object sender, EventArgs e)
        {
            seticon_forbutton();
            String txt  = "";
            Int32  xPos = 173;
            Int32  yPos = 135;//66;



            //Product Type
            MainMenu frm = new MainMenu();
            //get data from table
            List <object[]> data = new List <object[]>();

            //species
            data = frm.get_data_table_string("tbproductsetup", "", "");
            string producttype = "";

            cbproducttype.Items.Clear();
            if (data.Count > 0)
            {
                for (int i = 0; i < data.Count; i++)
                {
                    producttype = data[i][5].ToString();
                    cbproducttype.Items.Add(producttype);
                }
                if (data.Count == 1)
                {
                    cbproducttype.Text = producttype.Trim();
                }
            }



            data = frm.get_data_table_string("tbgrade", "module", "retouching");

            frmRetouching fcut = new frmRetouching();

            if (data.Count > 0)
            {
                for (int i = 0; i < data.Count; i++)
                {
                    txt = data[i][1].ToString();
                    tombolgrade(100, 60, 24, xPos, yPos, txt, Color.WhiteSmoke);
                    xPos = xPos + 104;
                    //tombolgrade(Int32 width, Int32 height, Int32 fontsize, Int32 xPos, Int32 yPos, String txt, Color btncolor);
                }
            }


            txt  = "";
            xPos = 173;
            yPos = 205;   //135;

            //get data from table
            data = frm.get_data_table_string("tbpackingsize", "", "");

            if (data.Count > 0)
            {
                for (int i = 0; i < data.Count; i++)
                {
                    txt = data[i][1].ToString();
                    tombolpackingsize(160, 60, 24, xPos, yPos, txt, Color.WhiteSmoke);
                    xPos = xPos + 164;
                    //tombolgrade(Int32 width, Int32 height, Int32 fontsize, Int32 xPos, Int32 yPos, String txt, Color btncolor);
                }
            }



//Existing packing


            List <object[]> dtlot = new List <object[]>();
            MainMenu        flot  = new MainMenu();

            dtlot = flot.get_data_listpacking_daysearlier(7);
            String previntlotcode = "";

            if (dtlot.Count > 0)
            {
                for (int i = 0; i < dtlot.Count; i++)
                {
                    if (!previntlotcode.Equals(dtlot[i][2].ToString()))
                    {
                        cbexistingpacking.Items.Add(dtlot[i][2]);
                    }
                    previntlotcode = dtlot[i][2].ToString();
                }
            }
        }