C#调用OpenERP传入或条件
-
多谢诸位关注!
以下代码仅仅是为了测试OR条件。
现在代码的效果是ID>=70 AND ID<=70,得到的结果数是1,请问怎么才传入OR条件?
另外,怎么传入括号?例如:(ID > 10 and ID <20) OR (ID > 30 and ID < 40)。
ArrayList altFilters = new ArrayList();
object[,] aryFilters = new object[2, 3];
aryFilters[0, 0] = "id";
aryFilters[0, 1] = ">=";
aryFilters[0, 2] = "70";
aryFilters[1, 0] = "id";
aryFilters[1, 1] = "<=";
aryFilters[1, 2] = "70";
altFilters.Add(aryFilters);
object aryIDs = objOE.Execute(objOE.DBName, Convert.ToInt64(objOE.UserId), txtPassword.Text,
OpenERPClient.OpenERPService.Object, strObjectName, txtMethodName.Text, altFilters.ToArray());
int[] aryResult = (int[])aryIDs;
MsgBox.ShowMsg(aryResult.Length.ToString()); -
ArrayList altFilters ..
ArrayList aryFilters<br />altFilters = new ArrayList();<br />altFilters.Add("|");<br /><br />aryFilters = new ArrayList();<br />aryFilters.Add("id");<br />aryFilters.Add(">=");<br />aryFilters.Add(20);<br />altFilters.Add(aryFilters);<br /><br />aryFilters = new ArrayList();<br />aryFilters.Add("id");<br />aryFilters.Add("<=");<br />aryFilters.Add(70);<br />altFilters.Add(aryFilters);<br />