Files
lserp_cs_5.0/插件库/Lskj.BaseInfo/frmBackSelect.cs
T
2026-07-10 15:25:05 +08:00

71 lines
2.7 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.data;
namespace Lskj.BaseInfo
{
public partial class frmBackSelect : FormBase
{
public int SelectStepCode = 0;
public string ComfirmMsg = string.Empty;
public frmBackSelect(string typeCode, int CurrStepcode, int billType, string parmaryKey,string parmaryValue, string masterTable, string column_Prefix)
{
InitializeComponent();
string sql = "select * from (select stepCode,stepName " +
"from p_systemdlltabflowtypestep " +
"where typeCode='" + typeCode + "'" +
" and billType=" + billType.ToString() +
" and stepCode<" + CurrStepcode +
"union all " +
"select 0,'退回至提交人') x order by stepcode desc ";
sql = @"select * from (select distinct a.stepCode,c.stepName
from p_baseflowstep a
inner join " + masterTable + @" b on a.flowsourcekey=b." + parmaryKey + @"
inner join p_systemdlltabflowtypestep c on a.stepCode=c.stepCode and c.billType=b." + column_Prefix + @"billtype
where a.flowSourceKey='" + parmaryValue + @"'
and isnull(a.autoStep,0)=0
and ISNULL(a.operDirection,'F')='F'
and a.stepCode<" + CurrStepcode +
"union all " +
"select 0,'退回至提交人') x order by stepcode desc ";
//DataTable dt = SqlHelper.ExecuteDataSet(sql).Tables[0];
searchStep.setDataSource(sql, "stepCode", "stepName");
searchStep.getComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
searchStep.getComboBox.SelectedValue = 9999;
}
private void simpleButton1_Click(object sender, EventArgs e)
{
if (searchStep.Text == "")
{
MessageBox.Show("请选择返退步骤");
return;
}
if ((txtYj.Text.Trim()) == "")
{
MessageBox.Show("请输入返退意见");
return;
}
SelectStepCode = Convert.ToInt32(searchStep.getComboBox.SelectedValue);
ComfirmMsg = txtYj.Text;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void simpleButton2_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
}
}