public string getStep(string id) { string step = null; string sql = "select IsEnd from FlowDoc where ID=" + Convert.ToInt32(id); Sqlselete ss = new Sqlselete(); int end = Convert.ToInt32(ss.getScalar(sql)); if (end > 0) { step = "完成"; } else { string sqlstr = "select * from FlowPath where DocID=" + Convert.ToInt32(id); DataSet ds = ss.Getds(sqlstr); //Response.Write("<script>alert('" + dr["IsApprove"].ToString() + "')</script>"); foreach (DataRow dr in ds.Tables[0].Rows) { if (Convert.ToInt32(dr["IsApprove"]) != 2) { string sql1 = "select Name from FlowAction where ID in (select ActionId from FlowStep where Num=" + Convert.ToInt32(dr["Num"]) + " and FlowID=" + Convert.ToInt32(dr["FlowID"]) + ")"; step = new Sqlselete().getScalar(sql1).ToString(); break; } } } return(step); }
public void Bind() { Sqlselete ss = new Sqlselete(); int userid = Convert.ToInt32(ss.SelectEmpByUserName(Session["UserName"].ToString())); string sql = "select * from FlowDoc where UserID=" + userid; DataSet ds = ss.Getds(sql); this.GridView1.DataSource = ds.Tables[0]; this.GridView1.DataBind(); }