Ejemplo n.º 1
0
            public override StandardValuesCollection GetStandardValues(
                ITypeDescriptorContext context)
            {
                string name  = context.PropertyDescriptor.Name;
                string field = null;

                if (name == "User")
                {
                    field = "RUser";
                }
                else if (name == "TypeSize")
                {
                    field = "TypeSize";
                }
                else if (name == "Client")
                {
                    field = "Client";
                }
                else if (name == "SG")
                {
                    field = "SolidGroup";
                }
                else if (name == "Result")
                {
                    field = "Result";
                }
                List <string> L  = new List <string>();
                SelectionPars sp = context.Instance as SelectionPars;

                L.Add(null);
                Select S = new Select(string.Format("SELECT DISTINCT {0} FROM Tubes where DT >= @DT0 and DT <= @DT1 order by {0}", field));

                S.AddParam("@DT0", System.Data.SqlDbType.DateTime, sp.DT0);
                S.AddParam("@DT1", System.Data.SqlDbType.DateTime, sp.DT1);
                while (S.Read())
                {
                    L.Add(Convert.ToString(S[0]));
                }
                S.Dispose();
                return(new StandardValuesCollection(L));
            }
Ejemplo n.º 2
0
 public ParSet()
 {
     LWinPars  = new L_WinPars();
     Selection = new SelectionPars();
 }