/// <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; }
/// <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; }
/// <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(); }
/// <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(); }
/// <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()); }
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(); } }
/// <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; }
/// <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()); }