1 2 3 4 5 6 7
| CreationDate = Convert.ToDateTime(((Label)GridView1.Rows[i].FindControl("Label1")).Text);
/// number of Outstandings
SqlCommand oCommand = new SqlCommand("SELECT Count(*) as co FROM RequestGroup, Request WHERE RequestGroup.CreateTime=@CreationDate AND Request.GroupId=RequestGroup.RequestGroupId AND Request.Status='Outstanding' GROUP BY RequestGroup.RequestGroupId", mycn);
oCommand.Parameters.Add("@CreationDate", DbType.DateTime).Value = CreationDate;
SqlDataReader myda = oCommand.ExecuteReader(); |
Partager