Example #1
0
        private void FrmPOPALL_Load(object sender, EventArgs e)
        {
            WorkOrderDSService work = new WorkOrderDSService();
            List <POPVO>       pop  = work.POPFACILITY();

            int iCnt = 0;

            foreach (POPVO task in pop)
            {
                UserControl1 taskcontrol = new UserControl1(task.FCLTS_CODE);
                taskcontrol.Location = new Point(50, 25 + (225 * iCnt));
                taskcontrol.Size     = new Size(1800, 200);
                taskcontrol.Name     = $"taskControl{iCnt}";

                taskcontrol.Task_ID   = task.FCLTS_NAME;
                taskcontrol.Task_code = task.FCLTS_CODE;
                taskcontrol.Task_IP   = task.FCLTS_IP;
                taskcontrol.Task_Port = task.FCLTS_PORT;


                panel1.Controls.Add(taskcontrol);
                iCnt++;
            }
            FrmPOPMDI frm = (FrmPOPMDI)this.MdiParent;

            frm.Readed += Readed_BarCode;
        }
Example #2
0
        private void DataGridViewBinding1()
        {
            dgv1.DataSource = null;
            WorkOrderDSService work = new WorkOrderDSService();

            dt = work.POPDGV1();
            dgv1.DataSource = dt;
        }
Example #3
0
        private void ComboBinding(string code)
        {
            WorkOrderDSService work = new WorkOrderDSService();

            comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox1.ValueMember   = "WO_Code";
            comboBox1.DisplayMember = "WO_Code";
            comboBox1.DataSource    = work.ComboBinding(code);
            comboBox1.SelectedIndex = -1;
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            dgv1.DataSource = null;
            WorkOrderDSService work = new WorkOrderDSService();
            string             day1 = dateTimePicker1.Value.ToShortDateString();
            string             day2 = dateTimePicker2.Value.ToShortDateString();
            string             fac  = (comboBox1.Text.Length < 1) ? "": comboBox1.SelectedValue.ToString();
            string             facg = (comboBox2.Text.Length < 1) ? "" : comboBox2.SelectedValue.ToString();

            dgv1.DataSource = work.POPDGVselect(day1, day2, fac, facg);
            RESET();
        }
Example #5
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox1.Text.Length > 1)
            {
                string             code = comboBox1.Text;
                WorkOrderDSService work = new WorkOrderDSService();
                dgv.DataSource = work.ControlDgv(code);
                itemname.Text  = dgv.Rows[0].Cells[4].Value.ToString();
                qty.Text       = dgv.Rows[0].Cells[1].Value.ToString();

                qty1             = int.Parse(qty.Text);
                qty2             = qty1 - Convert.ToInt32(dgv.Rows[0].Cells[6].Value.ToString());
                qty3             = Convert.ToInt32(dgv.Rows[0].Cells[7].Value.ToString());
                qty4             = Convert.ToInt32(dgv.Rows[0].Cells[5].Value.ToString());
                BADQTY.Text      = dgv.Rows[0].Cells[5].Value.ToString();
                residualqty.Text = qty2.ToString();
                GOODQTY.Text     = dgv.Rows[0].Cells[7].Value.ToString();
            }
        }
Example #6
0
        private void dgv1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            WorkOrderDSService work = new WorkOrderDSService();
            DataTable          dt   = work.POPDGVselect1(dgv1.Rows[e.RowIndex].Cells[1].Value.ToString());

            if (dt != null)
            {
                WO_Code.Text     = dt.Rows[0][0].ToString();
                ITEM_CODE.Text   = dt.Rows[0][1].ToString();
                PLAN_ID.Text     = dt.Rows[0][2].ToString();
                FCLTS_NAME.Text  = dt.Rows[0][3].ToString();
                WO_PLAN_QTY.Text = (dt.Rows[0][4].ToString().Length < 1) ? "0" : dt.Rows[0][4].ToString();
                WO_QTY_OUT.Text  = (dt.Rows[0][5].ToString().Length < 1) ? "0" : dt.Rows[0][5].ToString();
                WO_QTY_PROD.Text = (dt.Rows[0][6].ToString().Length < 1) ? "0" : dt.Rows[0][6].ToString();
                WO_QTY_BAD.Text  = (dt.Rows[0][7].ToString().Length < 1) ? "0" : dt.Rows[0][7].ToString();
                WO_QTY_ALL.Text  = (int.Parse(WO_QTY_PROD.Text) + int.Parse(WO_QTY_BAD.Text)).ToString();
            }
        }