Ejemplo n.º 1
0
 public ActionResult pj(ppp pp)
 {
     if (pp != null)
     {
         return(GetJson(pp));
     }
     return(Content("no data"));
 }
Ejemplo n.º 2
0
        private void testToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GC.Collect();
            var llll = rap.Query <SalesInvoiceViewRowSchema>(x => x.CustomerName == "ruth" && x.Serial.Between(1600, 1630), 0, 100);

            KVHFtest();
            var ind = rap.Query <SalesInvoiceViewRowSchema>(x =>
                                                            x.Date.Year.In(2000)
                                                            &&
                                                            x.Date.Month.In(4));

            var id  = new int[] { 20, 30, 40 };
            var iin = rap.Query <SalesInvoiceViewRowSchema>(x => x.Serial.In(
                                                                // new int[] { 20,30, 40}
                                                                id
                                                                //20,30,40
                                                                ));
            var p = new ppp[2];

            p[0] = new ppp();
            p[1] = new ppp();
            var pp        = new ppp();
            var d1        = DateTime.Parse("2001-1-1");
            var d2        = DateTime.Parse("2010-1-1");
            var ooooooooo = rap.Query <SalesInvoiceViewRowSchema>(x => x.Date.Between("2001-1-1", "2010-1-1") && x.Status == 2);

            ooooooooo = rap.Query <SalesInvoiceViewRowSchema>(x => x.Date.Between(d1, d2) && x.Status == 2);
            ooooooooo = rap.Query <SalesInvoiceViewRowSchema>(x => x.Serial.Between(1, 3));

            int cc = rap.Count <SalesInvoiceViewRowSchema>(x => x.Serial < pp.i);
            var tt = p[1].i;

            cc = rap.Count <SalesInvoiceViewRowSchema>(x => x.Serial < tt);

            var t  = rap.Query <SalesInvoiceViewRowSchema>(x => false);
            var ss = rap.FullTextSearch("woodland -oak");

            int c = rap.Count <SalesInvoiceViewRowSchema>(x => x.Serial < 100);

            c = rap.Count <SalesInvoiceViewRowSchema>(x => x.Serial != 100);
            c = rap.Count("SalesInvoice", "serial != 100");
            var q = rap.Query <SalesInvoiceViewRowSchema>(x => x.Serial < 100, 0, 10, "serial desc");
            //var p = rap.Query("SalesInvoice");
            //var pp = rap.Query(typeof(SalesInvoiceView));
            //var ppp = rap.Query(typeof(SalesItemRowsView.RowSchema));
            //var pppp = rap.Query(typeof(SalesInvoiceView), (SalesInvoiceView.RowSchema r) => r.Serial < 10);
            //var ppppp = rap.Query(typeof(SalesInvoiceView.RowSchema), (SalesInvoiceView.RowSchema r) => r.Serial < 10);
            //var pppppp = rap.Query<SalesInvoiceView.RowSchema>("serial <10");
            //Guid g = new Guid("82997e60-f8f4-4b37-ae35-02d033512673");
            var qq = rap.Query <SalesInvoiceViewRowSchema>(x => x.docid == new Guid("82997e60-f8f4-4b37-ae35-02d033512673"));

            dataGridView1.DataSource = q.Rows;

            //int i = rap.ViewDelete<SalesInvoiceViewRowSchema>(x => x.Serial == 0);
            //var qqq= rap.Query<SalesInvoiceViewRowSchema>(x => );
            //SalesInvoiceViewRowSchema s = new SalesInvoiceViewRowSchema();
            //s.docid = Guid.NewGuid();
            //s.CustomerName = "hello";
            //rap.ViewInsert<SalesInvoiceViewRowSchema>(s.docid, s);
            //q= rap.Query<SalesInvoiceView.RowSchema>("serial <100");
            //string s = q.Rows[0].CustomerName;

            //perftest();
        }