Exemplo n.º 1
0
        private void Startworking_Load(object sender, EventArgs e)
        {
            //1,2호기의 버튼과 라벨을 보기위해 EQPTID 초기화
            EQPTID = "";
            //실시간 타이머 설정
            System.Windows.Forms.Timer MyTimer = new System.Windows.Forms.Timer();
            MyTimer.Interval = 1000;
            MyTimer.Tick    += new EventHandler(timer_tick);
            MyTimer.Enabled  = true;

            //DataGridView 디자인
            Common.SetGridDesign(WoGrid);
            Common.SetGridDesign(LotGrid);

            string delete_lot = $"UPDATE WORKORDER SET WOSTAT ='S' WHERE WOID ='{woid}'";

            Common.DB_Connection(delete_lot);

            Inquiry_Woid();
            Inquiry_Lot();

            WoGrid.Font = new Font("Fixsys", 13, FontStyle.Regular);
            WoGrid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            LotGrid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);


            BtnEnabled();

            //1,2호기의 생산량 조회
            string    SELECT_PRODQTY  = $"SELECT COUNT(*) FROM LOT WHERE EQPTID = '{EQPTID}' AND SUBSTR(LOTCRDTTM,1,8) = TO_CHAR(SYSDATE, 'YY/MM/DD') AND WOID = '{Selected_woid}'";
            DataTable dataTable1      = Common.DB_Connection(SELECT_PRODQTY);
            string    N_PRODQTY_VALUE = dataTable1.Rows[0][0].ToString();

            if (EQPTID == "IM001")
            {
                IM1_ProdQty_Value.Text    = $"{N_PRODQTY_VALUE} EA";
                IM2_ProdQty_Value.Visible = false;
                IM2_ProdQty.Visible       = false;
            }
            else if (EQPTID == "IM002")
            {
                IM2_ProdQty_Value.Text    = $"{N_PRODQTY_VALUE} EA";
                IM1_ProdQty_Value.Visible = false;
                IM1_ProdQty.Visible       = false;
            }
        }
Exemplo n.º 2
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     login_check();
     string[] proc = { "배합", "사출" };
     ProcCombo.Items.AddRange(proc);
     ProcCombo.SelectedIndex = 0; //콤보박스 초기값설정
     Common.SetGridDesign(WoGrid);
     DataSearch();
     if (WoGrid.Rows.Count > 0)
     {
         string[] header = new string[] { "작업코드", "제품코드", "제품명", "작업상태", "계획수량", "생산수량", "불량수량", "계획날짜", "비고" };
         for (int i = 0; i < header.Length; i++)
         {
             WoGrid.Columns[i].HeaderText = $"{header[i]}";
             WoGrid.Columns[i].ReadOnly   = true;
         }
     }
     WoGrid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
 }
Exemplo n.º 3
0
        private void Startworking_Load(object sender, EventArgs e)
        {
            //DataGridView 디자인
            Common.SetGridDesign(WoGrid);
            Common.SetGridDesign(LotGrid);

            Inquiry_Woid();
            Inquiry_Lot();
            WoGrid.Font = new Font("Fixsys", 13, FontStyle.Regular);
            WoGrid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            LotGrid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            silo1.Image             = Properties.Resources.silo1;
            silo1.SizeMode          = PictureBoxSizeMode.StretchImage;
            silo2.Image             = Properties.Resources.silo1;
            silo2.SizeMode          = PictureBoxSizeMode.StretchImage;
            silo3.Image             = Properties.Resources.silo1;
            silo3.SizeMode          = PictureBoxSizeMode.StretchImage;
            MixingMachine1.Image    = Properties.Resources.mixing;
            MixingMachine1.SizeMode = PictureBoxSizeMode.StretchImage;
            MixingMachine2.Image    = Properties.Resources.mixing;
            MixingMachine2.SizeMode = PictureBoxSizeMode.StretchImage;
        }
Exemplo n.º 4
0
 private void WoGrid_DataSourceChanged(object sender, EventArgs e)
 {
     WoGrid.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
 }