Ejemplo n.º 1
0
        public IList<RowsourceEntity> ChemicalUseRowsource()
        {
            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();

            List<string> values = new List<string>() { "10", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0", "C" };
            foreach (string s in values)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                //rowsource.Key = s;
                rowsource.Value = s;
                rowsources.Add(rowsource);
            }
            return rowsources;
        }
Ejemplo n.º 2
0
        public IList<RowsourceEntity> F33xRowsource()
        {
            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();

            List<string> values = new List<string>() { "-10", "-9", "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0" };
            foreach (string s in values)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                //rowsource.Key = s;
                rowsource.Value = s;
                rowsources.Add(rowsource);
            }
            return rowsources;
        }
Ejemplo n.º 3
0
        public IList<RowsourceEntity> ProductionSystemRowsource()
        {
            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();

            RowsourceEntity rowsource = new RowsourceEntity();
            rowsource.Key = 1;
            rowsource.Value = "Net, Cages and Pens";
            rowsources.Add(rowsource);

            rowsource = new RowsourceEntity();
            rowsource.Key = 2;
            rowsource.Value = "Ponds";
            rowsources.Add(rowsource);

            rowsource = new RowsourceEntity();
            rowsource.Key = 3;
            rowsource.Value = "Raceways or Tanks";
            rowsources.Add(rowsource);

            rowsource = new RowsourceEntity();
            rowsource.Key = 4;
            rowsource.Value = "Other";
            rowsources.Add(rowsource);

            return rowsources;
        }
Ejemplo n.º 4
0
        public IList<RowsourceEntity> RecommendationType()
        {
            DataTable dt = DB.GetDataTable(new SQLBuilder("Select r.Id as [Key], r.Description as Value from RecommendationType r order by r.Description"));

            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();
            foreach (DataRow dr in dt.Rows)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                //TODO: Find out why this isn't working
                //Framework.EntityPopulate(rowsource, dr);
                rowsource.Key = Convert.ToInt32(dr["Key"]);
                rowsource.Value = dr["Value"].ToString();
                rowsources.Add(rowsource);
            }
            return rowsources;
        }
Ejemplo n.º 5
0
        public IList<RowsourceEntity> MethodAutocomplete(string filter)
        {
            DataTable dt = DB.GetDataTable(new SQLBuilder("Select m.Id as [Key], m.Method as Value from Method m where m.Method like @0 order by m.Method", "%" + filter.ToString() + "%"));

            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();
            foreach (DataRow dr in dt.Rows)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                //TODO: Figure out why the Framework.EntityPopulate methods isn't working--temporarily replacing it with direct calls to populate rowsource
                //Framework.EntityPopulate(rowsource, dr);
                rowsource.Key = Convert.ToInt32(dr["Key"]);
                rowsource.Value = dr["Value"].ToString();
                rowsources.Add(rowsource);
            }
            return rowsources;
        }
Ejemplo n.º 6
0
        public IList<RowsourceEntity> FactorType()
        {
            //excluding 3.1 and 3.2.
            DataTable dt = DB.GetDataTable(new SQLBuilder("Select Id as [Key], Prefix + ' : ' + isnull(Description,'') as Value from FactorType Where criteriaId <> 3 order by case when criteriaId = 4 then 10 else criteriaId end, SortOrder"));

            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();
            foreach (DataRow dr in dt.Rows)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                Framework.EntityPopulate(rowsource, dr);
                rowsources.Add(rowsource);
            }
            return rowsources;
        }
Ejemplo n.º 7
0
        public IList<RowsourceEntity> FactorScore(int factorTypeId)
        {
            DataTable dt = DB.GetDataTable(new SQLBuilder("Select Id as [Key], isnull(Description,'') as Value from FactorScore where FactorTypeId = @0 order by number", factorTypeId.ToString()));

            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();
            foreach (DataRow dr in dt.Rows)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                Framework.EntityPopulate(rowsource, dr);
                rowsources.Add(rowsource);
            }
            return rowsources;
        }
Ejemplo n.º 8
0
        public IList<RowsourceEntity> DataQuality()
        {
            List<RowsourceEntity> rowsources = new List<RowsourceEntity>();

            List<string> values = new List<string>() { "0", "2.5", "5", "7.5", "10" };
            foreach (string s in values)
            {
                RowsourceEntity rowsource = new RowsourceEntity();
                //rowsource.Key = s;
                rowsource.Value = s;
                rowsources.Add(rowsource);
            }
            return rowsources;
        }