示例#1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (formHelper.inputCheck(groupBox1))
            {
                SetPara();

                if (this.Text.Trim().Equals("更新沥青罐参数"))
                {
                    if (eLogic.InsertLiquidMatter(eclass, 2))
                    {
                        //MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MessageBox.Show("修改记录失败,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    if (eLogic.InsertLiquidMatter(eclass, 1))
                    {
                        //MessageBox.Show("新增记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MessageBox.Show("新增记录失败,请从新操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }