private void serverSideSumQueryToolStripMenuItem_Click(object sender, EventArgs e) { //string prod1 = "prod 1"; objclass c = new objclass() { val = "prod 3" }; //decimal i = 20; //var q = rap.Count(typeof(SalesItemRowsView), // (LineItem l) => (l.Product == prod1 || l.Product == prod3) && l.Price.Between(10,i) // ); DateTime dt = FastDateTime.Now; var qq = rap.ServerSide <LineItem>(Views.ServerSide.Sum_Products_based_on_filter_args, //"product = \"prod 1\"" //(LineItem l) => (l.Product == c.val || l.Product == prod3 ) x => x.Product == c.val || x.Product == prod3 ).ToList(); dataGridView1.DataSource = qq; toolStripStatusLabel2.Text = "Query time (sec) = " + FastDateTime.Now.Subtract(dt).TotalSeconds; toolStripStatusLabel1.Text = "Count = " + qq.Count.ToString("#,0"); }
private void serverSideSumQueryToolStripMenuItem_Click(object sender, EventArgs e) { //string prod1 = "prod 1"; objclass c = new objclass() { val = "prod 3" }; //decimal i = 20; //var q = rap.Count(typeof(SalesItemRowsView), // (LineItem l) => (l.Product == prod1 || l.Product == prod3) && l.Price.Between(10,i) // ); DateTime dt = FastDateTime.Now; var qq = rap.ServerSide<LineItem>(Views.ServerSide.Sum_Products_based_on_filter, //"product = \"prod 1\"" //(LineItem l) => (l.Product == c.val || l.Product == prod3 ) x => x.Product == c.val || x.Product == prod3 ).ToList(); dataGridView1.DataSource = qq; toolStripStatusLabel2.Text = "Query time (sec) = " + FastDateTime.Now.Subtract(dt).TotalSeconds; toolStripStatusLabel1.Text = "Count = " + qq.Count.ToString("#,0"); }