예제 #1
0
        /// <summary>
        /// form loading
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LineItemCycleTimeForm_Load(object sender, EventArgs e)
        {
            LoadLine();
            //LoadSapItem();

            Line_cmb.Select();
            Update_btn.Enabled = false;
        }
예제 #2
0
        /// <summary>
        /// form loading
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LineRestTimeMasterForm_Load(object sender, EventArgs e)
        {
            LoadLine();

            Line_cmb.Select();

            Ok_btn.Enabled = false;
        }
예제 #3
0
 /// <summary>
 /// for load, loads Line in Combo
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void LineAndWorkContentForm_Load(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     LoadLine();
     LoadWorkContentType();
     Cursor.Current = Cursors.Default;
     Line_cmb.Select();
 }
예제 #4
0
        /// <summary>
        /// for load, loads Line and binds treeview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LineDefectiveReasonForm_Load(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            LoadLine();

            //BindTreeView();
            Cursor.Current = Cursors.Default;
            Line_cmb.Select();
        }
예제 #5
0
        /// <summary>
        /// Search
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Search_btn_Click(object sender, EventArgs e)
        {
            if (Line_cmb.Text == string.Empty || Line_cmb.SelectedIndex < 0)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, LineId_lbl.Text);
                popUpMessage.Warning(messageData, Text);
                Line_cmb.Select();
                return;
            }

            GridBind(FormConditionVo());
        }
예제 #6
0
        private void AddGroupMachineForm_Load(object sender, EventArgs e)
        {
            // Create method which get Line and Customer information for combo box
            Customer_cmb.Select();

            if (string.Equals(mode, CommonConstants.MODE_UPDATE))
            {
                LoadCustomerLinesData(updateData);
                Customer_cmb.Enabled = false;
                Line_cmb.Select();
            }
        }
예제 #7
0
        /// <summary>
        /// event to get the record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Search_btn_Click(object sender, EventArgs e)
        {
            if (Line_cmb.Text.Trim().Length == 0)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, LineId_lbl.Text);
                logger.Info(messageData);
                popUpMessage.ConfirmationOkCancel(messageData, Text);
                Line_cmb.Focus();
                return;
            }

            Cursor.Current = Cursors.WaitCursor;
            string sapItem = SapItem_cmb.Text;

            GridBind(FormConditionVo());

            SapItem_cmb.Text = sapItem;

            Cursor.Current = Cursors.Default;
        }
예제 #8
0
        /// <summary>
        /// updates Line Machine
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Update_btn_Click(object sender, EventArgs e)
        {
            if (LineItem_dgv.RowCount == 0) // || LineItem_dgv.SelectedRows.Count == 0
            {
                return;
            }

            if (Line_cmb.Text == string.Empty || Line_cmb.SelectedIndex < 0)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, LineId_lbl.Text);
                popUpMessage.Warning(messageData, Text);
                Line_cmb.Focus();
                return;
            }

            ValueObjectList <ValueObject> inVoList = new ValueObjectList <ValueObject>();

            LineItemCycleTimeVo deleteInVo = new LineItemCycleTimeVo();

            deleteInVo.LineId = Convert.ToInt32(Line_cmb.SelectedValue);

            ValueObjectList <LineItemCycleTimeVo> addInVo = new ValueObjectList <LineItemCycleTimeVo>();

            foreach (DataGridViewRow row in LineItem_dgv.Rows)
            {
                if (row.Cells["clmstdcycletime"].Value != null && !row.Cells["clmstdcycletime"].Value.ToString().Equals(string.Empty))
                {
                    decimal cycleTime = Convert.ToDecimal(row.Cells["clmstdcycletime"].Value);
                    if (cycleTime > 0)
                    {
                        LineItemCycleTimeVo selectedItem = (LineItemCycleTimeVo)row.DataBoundItem;

                        LineItemCycleTimeVo addVo = new LineItemCycleTimeVo();
                        addVo.LineId       = Convert.ToInt32(Line_cmb.SelectedValue);
                        addVo.StdCycleTime = cycleTime;
                        addVo.SapItemCode  = row.Cells["colSapItemCode"].Value.ToString();

                        addInVo.add(addVo);
                    }
                }
            }

            inVoList.add(deleteInVo);
            inVoList.add(addInVo);
            //if (inVo == null || inVo.GetList() == null || inVo.GetList().Count == 0)
            //{
            //    messageData = new MessageData("mmci00047", Properties.Resources.mmci00047, LineId_lbl.Text);
            //    popUpMessage.Information(messageData, Text);
            //    LineItem_dgv.Focus();
            //    return;
            //}

            UpdateResultVo outVo = null;

            try
            {
                Cursor.Current = Cursors.WaitCursor;
                outVo          = (UpdateResultVo)base.InvokeCbm(new AddUpdateLineItemCycleTimeMasterMntCbm(), inVoList, false);
                Cursor.Current = Cursors.Default;
            }
            catch (Framework.ApplicationException exception)
            {
                Cursor.Current = Cursors.Default;
                popUpMessage.ApplicationError(exception.GetMessageData(), Text);
                logger.Error(exception.GetMessageData());
            }

            if (outVo == null)
            {
                return;
            }
            messageData = new MessageData("mmci00002", Properties.Resources.mmci00002, null);
            logger.Info(messageData);
            popUpMessage.Information(messageData, Text);

            GridBind(FormConditionVo());
        }