예제 #1
0
        private void ok_Click(object sender, EventArgs e)
        {
            bool flag = false;

            if (dateTime_startDate.Value <= dateTime_endDate.Value)
            {
                /*
                 text_planAsset.Text = plan_asset;
            text_eqname.Text = eq_name;
            text_eqAsset.Text = eq_asset;
            globleMaintainId = maintainId;
            dateTime_startDate.Text = startDate;
            dateTime_endDate.Text = endDate;
            text_principal.Text = principal;
            text_status.Text = status;
            richTextBox_memo.Text = memo;
                 */
                Account acc = new Account();
                flag = acc.updateMaintainById(dateTime_startDate.Text, dateTime_endDate.Text, text_principal.Text, text_status.Text, richTextBox_memo.Text, globleMaintainId);
                //flag = acc.addMaintain(globleplanId, text_status.Text, dateTime_startDate.Text, dateTime_endDate.Text, richTextBox_memo.Text, text_principal.Text);
                if (flag)
                {
                    MessageBox.Show("修改维护记录成功!");
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                else
                {
                    MessageBox.Show("修改维护记录失败,请检查网络连接!");
                }
            }
            else
            {
                MessageBox.Show("起始日期不可大于结束日期!");
            }
        }