OATest/Flow/FlowCustom.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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;
using NS_DBOP;
public partial class Flow_FlowCustom : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DataSet ds = new DBoperate().ExecuteQuery("select * from FlowType", 0, 0, "table1");
foreach (DataRow dr in ds.Tables[0].Rows)
{
this.drpFlowType.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString()));
}
this.drpFlowType.Items.Insert(0, "请选择");
if (Request.QueryString["ID"] != null)
{
DataSet dsf = new DBoperate().ExecuteQuery("select * from Flow where ID=" + Request.QueryString["ID"], 0, 0, "flow");
foreach (DataRow drf in dsf.Tables[0].Rows)
{
this.txtName.Text = drf["Name"].ToString();
this.drpFlowType.SelectedItem.Value = drf["TypeID"].ToString();
this.txtContent.Text = drf["Des"].ToString();
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
string name = this.txtName.Text;
//int userId = new DBoperate().ExecuteScalar("select Employeeid from Employee where username=" + Session["UserName"]);
int userID = Convert.ToInt32(new DBoperate().ExecuteScalar("select Employeeid from Employee where username='yuguomin'"));
string typeID = this.drpFlowType.SelectedItem.Value;
string Des = this.txtContent.Text;
if (Request.QueryString["ID"] != null)
{
string strsql = "update Flow set Name='" + name + "',TypeID=" + typeID
+ ",Des='" + Des + "',UserID=" + userID + "where ID=" + Request.QueryString["ID"];
int result = new DBoperate().ExecuteUpdate(strsql);
if (result > 0)
{
Response.Write("<script language=javascript>alert('保存成功!');window.location.href='FlowM.aspx'</script>");
}
else
{
Response.Write("<script language=javascript>alert('保存失败!')</script>");
}
}
else
{
后面还有 17 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
