Example #1
0
        /// <summary>
        /// 保存按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void saveBtn_Click(object sender, EventArgs e)
        {
            Alter alter = getAlterInfo();

            try
            {
                if (this.isUpdate)
                {
                    AlterDao.Update(alter);
                }
                else
                {
                    AlterDao.Add(alter);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
            this.isUpdate = true;
        }
Example #2
0
        /// <summary>
        /// 保存
        /// </summary>
        private void saveInfo()
        {
            Alter alter = getPrintInfo();

            try
            {
                if (this.isUpdate)
                {
                    AlterDao.Update(alter);
                }
                else
                {
                    object id = AlterDao.Add(alter);

                    MessageBox.Show("当前流水号为 " + id);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }
        }