private void btnSave_Click(object sender, EventArgs e) { if (MessageBox.Show("추가하시겠습니까?", "추가여부", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ConditionMeasureVO item = new ConditionMeasureVO(); item.Item_code = Item_code; item.Wc_Code = Wc_Code; item.Condition_Code = Condition_Code; item.Condition_Val = nudusl.Value; item.Workorderno = Workorderno; bool IsSuccess = cmhService.InsertConditionMeasure(item, lblManager.Text); //품질측정 추가 조회 if (IsSuccess) { MessageBox.Show("성공적으로 추가하였습니다.", "추가성공", MessageBoxButtons.OK, MessageBoxIcon.Information); this.DialogResult = DialogResult.OK; } else { MessageBox.Show("추가에 실패하였습니다.", "추가오류", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void btnInsertMeasure_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(lblConditionCode.Text)) { Condition_Measure_HistoryService service = new Condition_Measure_HistoryService(); ConditionMeasureVO item = new ConditionMeasureVO(); item.Item_code = lblItemCode.Text; item.Wc_Code = lblWcCode.Text; item.Condition_Code = lblConditionCode.Text; item.Condition_Val = nudMeasure.Value; item.Workorderno = GlobalUsage.WorkOrderNo; if (service.InsertConditionMeasure(item, GlobalUsage.UserID)) { Program.Log.WriteInfo($"{GlobalUsage.UserID}이(가) 공정조건({lblConditionCode.Text})에 값({nudMeasure.Value})을 넣는데에 성공하였음"); SearchData(); nudMeasure.Value = 0; } else { Program.Log.WriteInfo($"{GlobalUsage.UserID}이(가) 공정조건({lblConditionCode.Text})에 값({nudMeasure.Value})을 넣으려 하였으나 실패하였음"); MessageBox.Show("입력할 수 없는 항목입니다."); } } }