protected void Page_Load(object sender, EventArgs e) { var count = Code.MemberManage.Instance.Count(b => b.Id > 0); if (count == 0) { var m = new Code.Member() { Name = "hubro" }; int n = Code.MemberManage.Instance.Add(m); var c = new CRL.ParameCollection(); c["UserId"] = n; Code.ProductDataManage.Instance.Update(b => b.Id > 0, c); } }
protected void Button1_Click(object sender, EventArgs e) { //返回筛选值 var query = Code.ProductDataManage.Instance.GetLambdaQuery(); query.Top(10); var member = new Code.Member(); member.Id = 11; query.Join<Code.Member>((a, b) => a.UserId == member.Id && b.Id > 0, CRL.LambdaQuery.JoinType.Left ).Select((a, b) => new { BarCode1 = a.BarCode, Name1 = b.Name }); var list = query.ToDynamic(); txtOutput.Visible = true; txtOutput.Text = query.PrintQuery(); foreach (dynamic item in list) { var str = string.Format("{0}______{1}<br>", item.BarCode1, item.Name1);//动态对象 Response.Write(str); } }
protected void Button1_Click(object sender, EventArgs e) { //返回筛选值 var query = Code.ProductDataManage.Instance.GetLambdaQuery(); query.Top(10); var member = new Code.Member(); member.Id = 11; query.Join <Code.Member>((a, b) => a.UserId == member.Id && b.Id > 0, CRL.LambdaQuery.JoinType.Left ).Select((a, b) => new { BarCode1 = a.BarCode, Name1 = b.Name, a.ProductName }); var list = query.ToDynamic(); txtOutput.Visible = true; txtOutput.Text = query.PrintQuery(); foreach (dynamic item in list) { var str = string.Format("{0}______{1}<br>", item.BarCode1, item.Name1, item.ProductName);//动态对象 Response.Write(str); } }