103 lines
4.9 KiB
C#
103 lines
4.9 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_NWorkFlowNodeModify : System.Web.UI.Page
|
|||
|
|
{
|
|||
|
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (!Page.IsPostBack)
|
|||
|
|
{
|
|||
|
|
ZWL.Common.PublicMethod.CheckSession();
|
|||
|
|
ZWL.BLL.ERPNWorkFlowNode Model = new ZWL.BLL.ERPNWorkFlowNode();
|
|||
|
|
Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
|
|||
|
|
this.txtNodeSerils.Text=Model.NodeSerils.ToString();
|
|||
|
|
this.txtNodeName.Text=Model.NodeName.ToString();
|
|||
|
|
this.DropDownList1.SelectedValue=Model.NodeAddr.ToString();
|
|||
|
|
this.txtNextNode.Text=Model.NextNode.ToString();
|
|||
|
|
this.DropDownList2.SelectedValue=Model.IFCanJump.ToString();
|
|||
|
|
this.DropDownList3.SelectedValue = Model.IFCanView.ToString();
|
|||
|
|
this.DropDownList4.SelectedValue = Model.IFCanEdit.ToString();
|
|||
|
|
this.DropDownList5.SelectedValue = Model.IFCanDel.ToString();
|
|||
|
|
this.txtJieShuHours.Text=Model.JieShuHours.ToString();
|
|||
|
|
this.DropDownList6.SelectedValue = Model.PSType.ToString();
|
|||
|
|
this.DropDownList7.SelectedValue = Model.SPType.ToString();
|
|||
|
|
this.txtSPDefaultList.Text=Model.SPDefaultList.ToString();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
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><>ʼ' and ID!="+Request.QueryString["ID"].ToString());
|
|||
|
|
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>' and ID!=" + Request.QueryString["ID"].ToString());
|
|||
|
|
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() + "' and ID!=" + Request.QueryString["ID"].ToString());
|
|||
|
|
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.ID = int.Parse(Request.QueryString["ID"].ToString());
|
|||
|
|
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.Update();
|
|||
|
|
|
|||
|
|
//дϵͳ<CFB5><CDB3>־
|
|||
|
|
ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
|
|||
|
|
MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
|
|||
|
|
MyRiZhi.DoSomething = "<22>û<EFBFBD><C3BB>Ľڵ㶨<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>ijɹ<C4B3><C9B9><EFBFBD>", "NWorkFlowNode.aspx?WorkFlowID="+Request.QueryString["WorkFLowID"].ToString());
|
|||
|
|
}
|
|||
|
|
}
|