Пример #1
0
    public List <DefectBase> Enum(DefectsFilter f, int maxrecs = 400)
    {
        string where = PrepareQueryForEnum(f, true);
        List <DefectBase> ls = new List <DefectBase>();

        foreach (DataRow r in GetRecords(where, maxrecs))
        {
            DefectBase d = new DefectBase();
            d.Load(r);
            ls.Add(d);
        }
        return(ls);
    }
Пример #2
0
    public List <DefectBase> EnumUnPlan(int userid)
    {
        string            w_where1 = DefectDispo.PlanableDefectFilter();
        string            w_where2 = DefectSeverity.PlanableDefectFilter();
        List <DefectBase> ls       = new List <DefectBase>();

        string where = string.Format(" WHERE (({0} = {1}) AND ({2} is null) {3} {4}) ORDER BY {5} DESC", _AsUser, userid, _Order, w_where1, w_where2, _ID);
        foreach (DataRow r in GetRecords(where))
        {
            DefectBase d = new DefectBase();
            d.Load(r);
            d._id = r[_ID].ToString();
            ls.Add(d);
        }
        return(ls);
    }
Пример #3
0
    public List <DefectBase> EnumPlanLim(int userid, int max)    //zero for unlimited number
    {
        string            w_where  = DefectDispo.PlanableDefectFilter();
        string            w_where2 = DefectSeverity.PlanableDefectFilter();
        List <DefectBase> ls       = new List <DefectBase>();

        string where = string.Format(" WHERE (({0} = {1}) AND ({2} is not null) {3} {5}) ORDER BY {4}.{2} DESC", _AsUser, userid, _Order, w_where, _Tabl, w_where2);
        foreach (DataRow r in GetRecords(where, max))
        {
            DefectBase d = new DefectBase();
            d.Load(r);
            d._id = r[_ID].ToString();
            ls.Add(d);
        }
        return(ls);
    }