Ejemplo n.º 1
0
        private void buttonCommon2_Click(object sender, EventArgs e)
        {
            string now = DateTime.Now.ToShortDateString();
            ProductionControllerDetailNCVCForm pro = new ProductionControllerDetailNCVCForm("All", model_cmb.Text, "All Line", now);

            pro.ShowDialog(this);
        }
Ejemplo n.º 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["colFinal_App"].Selected)//holder
            {
                process = "Final_App";
            }
            else if (production_controller_dgv.Rows[i].Cells["colEn2"].Selected)//En2
            {
                process = "En2";
            }
            else if (production_controller_dgv.Rows[i].Cells["colEn1"].Selected)//en1
            {
                process = "En1";
            }
            else if (production_controller_dgv.Rows[i].Cells["colTrustGap"].Selected)//insertcase
            {
                process = "TrustGap";
            }
            else if (production_controller_dgv.Rows[i].Cells["colRotor"].Selected)//RA
            {
                process = "Rotor";
            }
            else if (production_controller_dgv.Rows[i].Cells["colBracket"].Selected)//SolderRing
            {
                process = "Bracket";
            }
            else if (production_controller_dgv.Rows[i].Cells["colBracketMetal"].Selected)//SolderWire
            {
                process = "BracketMetal";
            }
            else if (production_controller_dgv.Rows[i].Cells["colCaseAssy"].Selected)//Wingding
            {
                process = "CaseAssy";
            }
            else if (production_controller_dgv.Rows[i].Cells["colCaseMG"].Selected)//Welding
            {
                process = "CaseMG";
            }
            else if (production_controller_dgv.Rows[i].Cells["colMGBonding"].Selected)//Core
            {
                process = "MGBonding";
            }
            //action
            if ((j >= 6) && (date_rab.Checked == true))
            {
                ProductionControllerDetailNCVCForm pro = new ProductionControllerDetailNCVCForm(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_CNCVCForm form = new ProductionControllerChart_CNCVCForm(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);
            }
        }