65 lines
1.8 KiB
C#
65 lines
1.8 KiB
C#
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;
|
|
using CommonLib;
|
|
using DevExpress.XtraEditors;
|
|
|
|
namespace Lskj.Common
|
|
{
|
|
public partial class FrmProject : Form
|
|
{
|
|
public string ModuleId;
|
|
public string OperatorId;
|
|
public DataTable PejectTable = new DataTable();
|
|
|
|
public FrmProject()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
private void FrmProject_Load(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
listBoxControl1.Items.Clear();
|
|
foreach (DataRow item in PejectTable.Rows)
|
|
{
|
|
listBoxControl1.Items.Add(item["ProjectName"] + "");
|
|
}
|
|
}
|
|
catch (Exception)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|
{
|
|
string projectName = listBoxControl1.SelectedItem + "";
|
|
if (!string.IsNullOrEmpty(projectName))
|
|
{
|
|
string sqlValue = string.Format("delete P_SystemReportProjectTab where ModuleId='{0}' and OperatorId='{1}' and ProjectName='{2}'", ModuleId, OperatorId, projectName);
|
|
int result = SqlHelper.ExecuteNonQuery(sqlValue);
|
|
if (result > 0)
|
|
{
|
|
XtraMessageBox.Show("删除成功.");
|
|
listBoxControl1.Items.Remove(projectName);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
XtraMessageBox.Show("请选择一项删除.");
|
|
}
|
|
}
|
|
|
|
private void simpleButton2_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|