Ejemplo n.º 1
0
    public List<Workflow> getWorkflow(int RequestId)
    {
        List<Workflow> _Workflows = new List<Workflow>();
        Query = "SELECT workflow.Id, workflow.roleid, workflow.userid, workflow.datetime FROM workflow WHERE workflow.requestid = " + RequestId;
        try
        {
            Data.SqlCommand cm = new Data.SqlCommand();
            cm.CommandText = Query;
            Data.SqlDataReader rd = cm.ExecuteReader();
            while (rd.Read())
            {
                Workflow _Workflow = new Workflow();
                _Workflow.Id = rd.GetInt16(0);
                _Workflow.User = getUser(rd.GetInt16(2));
                _Workflow.Role = _Workflow.getRole(rd.GetInt16(1));
                _Workflow.DateTime = rd.GetString(3);
                _Workflows.Add(_Workflow);
            }
            rd.Close();
        }
        catch (Exception)
        {

            throw;
        }
        return (_Workflows);
    }