AIMS/AIMS.UI/OperationFront/frmStopOperation.cs
2023-08-13 21:05:09 +08:00

66 lines
1.8 KiB
C#

using AIMSBLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AIMS.OperationFront.UI
{
public partial class frmStopOperation : Form
{
public List<int> ApplyIdList = new List<int>();
public frmStopOperation()
{
InitializeComponent();
}
private void frmStopOperation_Load(object sender, EventArgs e)
{
}
private void tsbCancel_Click(object sender, EventArgs e)
{
if (ApplyIdList.Count > 0)
{
if (txtContent.Text.Trim() == "")
{
MessageBox.Show("停止原因不能为空");
return;
}
if (tsbCancel.Text.Trim() == "停止申请")
{
try
{
for (int i = 0; i < ApplyIdList.Count; i++)
{
BOperationApply.UpdateStopOperation(ApplyIdList[i], txtContent.Text.Trim());
}
MessageBox.Show("停止成功!");
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
catch (Exception ex)
{
MessageBox.Show("停止失败!" + ex.Message);
}
}
else
{
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
}
}
private void tsbExit_Click(object sender, EventArgs e)
{
Close();
}
}
}