private void BtnSave_Click(object sender, EventArgs e) { List <ConditionSpecVO> addlist = new List <ConditionSpecVO>(); try { if (!string.IsNullOrEmpty(txtCondition_Code.Text) && !string.IsNullOrEmpty(txtCondition_Name.Text)) { Condition_Spec_MasterService service = new Condition_Spec_MasterService(); ConditionSpecVO inspect = new ConditionSpecVO { Item_Code = lblItem.Text, Wc_Code = lblwork.Text, Condition_Code = txtCondition_Code.Text, Condition_Name = txtCondition_Name.Text, //Spec_Desc = , USL = nudusl.Value, SL = nudsl.Value, LSL = nudlsl.Value, Condition_Unit = txttype.Text, Remark = txtRemark.Text, }; addlist.Add(inspect); if (service.InsertConditionSpec(addlist)) { this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show("이미 등록된 검사항목입니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else { MessageBox.Show("필수 항목을 입력해주세요.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } catch (Exception err) { Program.Log.WriteError(err.Message); MessageBox.Show(err.ToString(), "알림", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void GetDatas() { Condition_Spec_MasterService sservice = new Condition_Spec_MasterService(); dgvConditionList.DataSource = sservice.GetAll(); }