コード例 #1
0
        private void buttonCommon2_Click(object sender, EventArgs e)
        {
            string now = DateTime.Now.ToShortDateString();
            ProductionControllerDetailForm pro = new ProductionControllerDetailForm("All", model_cmb.Text, "All Line", now);

            pro.ShowDialog(this);
        }
コード例 #2
0
        private void production_controller_dgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int    i       = e.RowIndex;
            int    j       = e.ColumnIndex;
            string date    = String.Format("{0:yyyy/MM/dd}", DateTime.Parse(production_controller_dgv.Rows[i].Cells["colStarday"].Value.ToString()));
            string process = "";

            //colTotalNG
            if (production_controller_dgv.Rows[i].Cells["colTotalNG"].Selected)//totalNG
            {
                process = "All";
            }
            else if (production_controller_dgv.Rows[i].Cells["colHolderNG"].Selected)//holder
            {
                process = "Holder";
            }
            else if (production_controller_dgv.Rows[i].Cells["colAppCheck"].Selected)//appcheck
            {
                process = "App Check";
            }
            else if (production_controller_dgv.Rows[i].Cells["colEn2"].Selected)//En2
            {
                process = "En2";
            }
            else if (production_controller_dgv.Rows[i].Cells["colFundou"].Selected)//fundou
            {
                process = "Fundou";
            }
            else if (production_controller_dgv.Rows[i].Cells["colEn1"].Selected)//en1
            {
                process = "En1";
            }
            else if (production_controller_dgv.Rows[i].Cells["colInsertCase"].Selected)//insertcase
            {
                process = "Insert Case";
            }
            else if (production_controller_dgv.Rows[i].Cells["colRANG"].Selected)//RA
            {
                process = "RA";
            }
            else if (production_controller_dgv.Rows[i].Cells["colSolder"].Selected)//SolderRing
            {
                process = "Solder Ring";
            }
            else if (production_controller_dgv.Rows[i].Cells["colSolderWire"].Selected)//SolderWire
            {
                process = "Solder Wire";
            }
            else if (production_controller_dgv.Rows[i].Cells["colWingding"].Selected)//Wingding
            {
                process = "Wingding";
            }
            else if (production_controller_dgv.Rows[i].Cells["colWelding"].Selected)//Welding
            {
                process = "Welding";
            }
            else if (production_controller_dgv.Rows[i].Cells["colCore"].Selected)//Core
            {
                process = "Core";
            }
            //action
            if (j > 7 && (date_rab.Checked == true) && j != 9)
            {
                ProductionControllerDetailForm pro = new ProductionControllerDetailForm(process, model_cmb.Text, line_cmb.Text, date);
                pro.ShowDialog(this);
            }
            else if (time_rab.Checked == true)
            {
                MessageBox.Show("Not Action", "Note", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (j == 2 && (date_rab.Checked == true)) //ColStartDay
            {
                int confirm_status_C = 3;                  //vao bieu do tron main
                ProductionControllerChart_CForm form = new ProductionControllerChart_CForm(model_cmb.Text, line_cmb.Text, process, ref production_controller_dgv, i, confirm_status_C);
                form.ShowDialog(this);
            }
            else
            {
                MessageBox.Show("Process is available!", "Note", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }