Beispiel #1
0
 protected void SetParameters(TableCommand Command, ParameterType ParamType)
 {
     foreach (string ParamKey in _Parameters.Keys)
     {
         ParameterStruct Param = _Parameters[ParamKey];
         if ((ParamType == ParameterType.Select && Param.Select) ||
             (ParamType == ParameterType.Update && Param.Update) ||
             (ParamType == ParameterType.Delete && Param.Delete) ||
             (ParamType == ParameterType.Relation && Param.Relation || ParamType == ParameterType.Relation && Param.Select))
         {
             string paramformat = "";
             if (Param.Parameter is DateParameter)
             {
                 paramformat = Select.DateFormat;
             }
             Command.AddParameter(ParamKey, Param.Parameter, paramformat, Dao.PoeColAspas(Param.Name), Condition.Equal, false);
         }
     }
 }
Beispiel #2
0
        private string[] GetParametersNames(ParameterType ParamType)
        {
            List <string> RetVal = new List <string>();

            foreach (string ParamKey in Parameters.Keys)
            {
                ParameterStruct Param = Parameters[ParamKey];
                if ((ParamType == ParameterType.Select && Param.Select) ||
                    (ParamType == ParameterType.Update && Param.Update) ||
                    (ParamType == ParameterType.Delete && Param.Delete) ||
                    (ParamType == ParameterType.Relation && Param.Relation)
                    )
                {
                    if (RetVal.Count > 0)
                    {
                        RetVal.Add("AND");
                    }
                    RetVal.Add(Dao.PoeColAspas(ParamKey));
                }
            }
            return(RetVal.ToArray());
        }