Пример #1
0
        public List <FieldPreValueSource> GetAllPrevalueSources()
        {
            List <FieldPreValueSource> l = new List <FieldPreValueSource>();

            string sql = "SELECT * From UFPrevalueSources ORDER BY name ASC";

            IRecordsReader rr = sqlHelper.ExecuteReader(sql);

            while (rr.Read())
            {
                FieldPreValueSource pv = FieldPreValueSource.CreateFromDataReader(rr);
                pv.Settings = settings.GetSettings(pv.Id);
                l.Add(pv);
            }

            rr.Dispose();
            return(l);
        }
Пример #2
0
        public List <Workflow> GetActiveWorkFlows()
        {
            string sql = "SELECT * from UFworkflows where Active = 1 ORDER by Name ASC";

            IRecordsReader  rr = sqlHelper.ExecuteReader(sql);
            List <Workflow> l  = new List <Workflow>();

            while (rr.Read())
            {
                Workflow wf = Workflow.CreateFromDataReader(rr);
                wf.Settings = settings.GetSettings(wf.Id);

                //if the type is missing, it will deactivate, the type will be missing if 3rd party dll is gone
                //this way we avoid non-existing workflows from trying to execute
                //the UI should reflect it this.
                if (wf.Active)
                {
                    l.Add(wf);
                }
            }
            rr.Dispose();

            return(l);
        }