private void BingDatas() { if (Label3.Text != "") { reptmMy.DataSource = DB.CarryOutSqlGeDataTable("SELECT * FROM tblProjectCreate WHERE UserId ='" + Label3.Text + "'"); reptmMy.DataBind(); Repeater1.DataSource = getTable.GetAllDataFromtblProjectInvestInfo("UserId ='" + Label3.Text + "'"); Repeater1.DataBind(); RpemUserInfor.DataSource = getTable.GetAllDataFromtblUserInfo("UserId ='" + Label3.Text + "'"); RpemUserInfor.DataBind(); } }
protected void rpItem_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Delete") { string sql = " DELETE FROM [XcXm].[dbo].[tblProjectInvestInfo] WHERE PiiID='" + e.CommandArgument + "'"; int Result = DB.CarryOutSqlSentence(sql); if (Result == 1) { MessaegBox("删除成功!"); } else if (Result == 0) { MessaegBox("信息已经被其他管理员删除!"); } else { MessaegBox("系统故障!"); } } if (e.CommandName == "OK") { string sql = " UPDATE [XcXm].[dbo].[tblProjectInvestInfo] SET PiiState=30 WHERE PiiID='" + e.CommandArgument + "'"; int Result = DB.CarryOutSqlSentence(sql); DataTable td = getTable.GetAllDataFromtblProjectInvestInfo("PiiID =" + e.CommandArgument); string ProjectName = td.Rows[0]["InsertProjectName"].ToString(); string UserId = td.Rows[0]["UserId"].ToString(); SendMessage(UserId, ProjectName, "已经"); if (Result == 1) { MessaegBox("审核成功!"); } else if (Result == 0) { MessaegBox("其他管理员已审核!"); } else { MessaegBox("系统故障!"); } } if (e.CommandName == "NotOK") { string sql = " UPDATE [XcXm].[dbo].[tblProjectInvestInfo] SET PiiState=-30 WHERE PiiID='" + e.CommandArgument + "'"; int Result = DB.CarryOutSqlSentence(sql); DataTable td = getTable.GetAllDataFromtblProjectInvestInfo("PiiID =" + e.CommandArgument); string ProjectName = td.Rows[0]["InsertProjectName"].ToString(); string UserId = td.Rows[0]["UserId"].ToString(); SendMessage(UserId, ProjectName, "未能"); if (Result == 1) { MessaegBox("审核成功!"); } else if (Result == 0) { MessaegBox("其他管理员已审核!"); } else { MessaegBox("系统故障!"); } } wucPager.Bind(); }