105 lines
4.6 KiB
C#
105 lines
4.6 KiB
C#
|
|
using System;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.Configuration;
|
|||
|
|
using System.Collections;
|
|||
|
|
using System.Web;
|
|||
|
|
using System.Web.Security;
|
|||
|
|
using System.Web.UI;
|
|||
|
|
using System.Web.UI.WebControls;
|
|||
|
|
using System.Web.UI.WebControls.WebParts;
|
|||
|
|
using System.Web.UI.HtmlControls;
|
|||
|
|
|
|||
|
|
public partial class NWorkFlow_NWorkFlowNodeAdd : System.Web.UI.Page
|
|||
|
|
{
|
|||
|
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (!Page.IsPostBack)
|
|||
|
|
{
|
|||
|
|
ZWL.Common.PublicMethod.CheckSession();
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>ĸ<EFBFBD><C4B8><EFBFBD>Ϊ<EFBFBD><CEAA>
|
|||
|
|
ZWL.Common.PublicMethod.SetSessionValue("WenJianList", "");
|
|||
|
|
|
|||
|
|
string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeAddr='<27><>ʼ'");
|
|||
|
|
if (ExsistID.Trim().Length > 0)
|
|||
|
|
{
|
|||
|
|
this.DropDownList1.Items.Remove(new ListItem("<22><>ʼ"));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
string ExsistID1 = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeAddr='<27><><EFBFBD><EFBFBD>'");
|
|||
|
|
if (ExsistID1.Trim().Length > 0)
|
|||
|
|
{
|
|||
|
|
this.DropDownList1.Items.Remove(new ListItem("<22><><EFBFBD><EFBFBD>"));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
|||
|
|
{
|
|||
|
|
//<2F>жϿ<D0B6>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>Ψһ<CEA8>ԣ<EFBFBD><D4A3>м<EFBFBD><D0BC>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>һ<EFBFBD>ڵ<EFBFBD>
|
|||
|
|
if (this.DropDownList1.SelectedItem.Text == "<22><>ʼ")
|
|||
|
|
{
|
|||
|
|
string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeAddr='<27><>ʼ'");
|
|||
|
|
if (ExsistID.Trim().Length > 0)
|
|||
|
|
{
|
|||
|
|
ZWL.Common.MessageBox.Show(this, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ڵ㣬<DAB5>벻Ҫ<EBB2BB>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ӣ<EFBFBD>");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if (this.DropDownList1.SelectedItem.Text == "<22><><EFBFBD><EFBFBD>")
|
|||
|
|
{
|
|||
|
|
string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeAddr='<27><><EFBFBD><EFBFBD>'");
|
|||
|
|
if (ExsistID.Trim().Length > 0)
|
|||
|
|
{
|
|||
|
|
ZWL.Common.MessageBox.Show(this, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ㣬<DAB5>벻Ҫ<EBB2BB>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ӣ<EFBFBD>");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (this.DropDownList1.SelectedItem.Text == "<22>м<EFBFBD><D0BC><EFBFBD>" || this.DropDownList1.SelectedItem.Text == "<22><>ʼ")
|
|||
|
|
{
|
|||
|
|
string ExsistID = this.txtNextNode.Text.Trim();
|
|||
|
|
if (ExsistID.Trim().Length <= 0)
|
|||
|
|
{
|
|||
|
|
ZWL.Common.MessageBox.Show(this, "<22>м<EFBFBD><D0BC>κͿ<CEBA>ʼ<EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>һ<EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>ţ<EFBFBD>");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//<2F>жϽڵ<CFBD><DAB5><EFBFBD><EFBFBD>ŵ<EFBFBD>Ψһ<CEA8><D2BB>
|
|||
|
|
string NodeSerils = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeSerils='" + this.txtNodeSerils.Text.Trim() + "'");
|
|||
|
|
if (NodeSerils.Trim().Length > 0)
|
|||
|
|
{
|
|||
|
|
ZWL.Common.MessageBox.Show(this, "<22>ýڵ<C3BD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3>벻Ҫ<EBB2BB>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ӣ<EFBFBD>");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ZWL.BLL.ERPNWorkFlowNode Model = new ZWL.BLL.ERPNWorkFlowNode();
|
|||
|
|
|
|||
|
|
Model.WorkFlowID = int.Parse(Request.QueryString["WorkFlowID"].ToString());
|
|||
|
|
Model.NodeSerils=this.txtNodeSerils.Text.ToString().Trim();
|
|||
|
|
Model.NodeName = this.txtNodeName.Text.ToString().Trim();
|
|||
|
|
Model.NodeAddr=this.DropDownList1.SelectedItem.Text.ToString();
|
|||
|
|
Model.NextNode = this.txtNextNode.Text.ToString().Trim();
|
|||
|
|
Model.IFCanJump = this.DropDownList2.SelectedItem.Text.ToString();
|
|||
|
|
Model.IFCanView = this.DropDownList3.SelectedItem.Text.ToString();
|
|||
|
|
Model.IFCanEdit = this.DropDownList4.SelectedItem.Text.ToString();
|
|||
|
|
Model.IFCanDel = this.DropDownList5.SelectedItem.Text.ToString();
|
|||
|
|
Model.JieShuHours = int.Parse(this.txtJieShuHours.Text.Trim());
|
|||
|
|
Model.PSType = this.DropDownList6.SelectedItem.Text.ToString();
|
|||
|
|
Model.SPType = this.DropDownList7.SelectedItem.Text.ToString();
|
|||
|
|
Model.SPDefaultList = this.txtSPDefaultList.Text.ToString().Trim();
|
|||
|
|
Model.CanWriteSet="";
|
|||
|
|
Model.SecretSet="";
|
|||
|
|
Model.ConditionSet="";
|
|||
|
|
|
|||
|
|
Model.Add();
|
|||
|
|
|
|||
|
|
//дϵͳ<CFB5><CDB3>־
|
|||
|
|
ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
|
|||
|
|
MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
|
|||
|
|
MyRiZhi.DoSomething = "<22>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ӽڵ㶨<DAB5><E3B6A8><EFBFBD><EFBFBD>Ϣ(" + this.txtNodeName.Text + ")";
|
|||
|
|
MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
|
|||
|
|
MyRiZhi.Add();
|
|||
|
|
|
|||
|
|
ZWL.Common.MessageBox.ShowAndRedirect(this, "<22>ڵ㶨<DAB5><E3B6A8><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ӳɹ<D3B3><C9B9><EFBFBD>", "NWorkFlowNode.aspx?WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString());
|
|||
|
|
}
|
|||
|
|
}
|