埃德蒙顿华人社区-Edmonton China

 找回密码
 注册
查看: 1206|回复: 7

[招聘信息] 有偿找一个懂C#的人解决一个问题

[复制链接]
鲜花(1) 鸡蛋(0)
发表于 2015-3-25 19:49 | 显示全部楼层 |阅读模式
老杨团队,追求完美;客户至上,服务到位!
如题,需要完成一个search功能,能够搜索两个table的信息,显示在gridview里面,目前只能显示一个table的信息,懂的请回复。谢谢~~~
鲜花(0) 鸡蛋(0)
发表于 2015-3-26 11:31 | 显示全部楼层
我周末可以帮看看,我邮箱是: uakevin.w@gmail.com
鲜花(35) 鸡蛋(0)
发表于 2015-3-26 16:48 | 显示全部楼层
Write a select statement with a join between those two tables, then put this result to a data model. Using grid view to display this model . That is simple. You can search via google . Lot of example you can find.
鲜花(2) 鸡蛋(0)
发表于 2015-3-26 17:47 | 显示全部楼层
老杨团队 追求完美
There are two tables such as AA and BB, assume there is empid field in AA, and there is empid field in BB, and your grid view's name is gdv, so:
9 }/ s, t, T; w, R5 _' E1 .sql statement is:- k4 O0 G9 n/ @( l8 j( E
select AA.empid, AA.XX, BB.XX from AA inner join BB on AA.empid=BB.empid- w/ J# a+ r, A2 U7 R9 j) U& c
2. show data in grid view# O* r5 M# t: m1 Y
then used DataTable get the result, for example Datatable name is dtResult:
% V$ R3 Y5 D# O7 X0 M8 Ucode is :
3 Q+ j: l8 A4 D/ K. q, Ugdv.datasource=dtResult;
6 v* ~6 m3 V& W+ ?gdv.DataBind();
! K5 w9 p" }' d! j2 y+ V3 j& X1 f9 x- C/ I

, \7 N  j' E4 R! j* E$ k, E1 Z8 G2 z7 ?) c# |9 k7 H

# b; d# Q( x/ E& U. F  U* ]8 u
0 L; L' \/ X7 Q# X) t6 E9 K; [
鲜花(1) 鸡蛋(0)
 楼主| 发表于 2015-3-27 23:51 | 显示全部楼层
calgaryNW 发表于 2015-3-26 18:473 S1 r$ h4 i# Z2 m1 Z
There are two tables such as AA and BB, assume there is empid field in AA, and there is empid field  ...

+ M" h9 V$ K2 }" ZThx. I am going to try it.
鲜花(172) 鸡蛋(12)
发表于 2015-3-30 12:34 | 显示全部楼层
这不是sql的问题吗?
鲜花(1) 鸡蛋(0)
 楼主| 发表于 2015-3-30 14:14 | 显示全部楼层
老杨团队,追求完美;客户至上,服务到位!
abear 发表于 2015-3-30 13:34
) a. N: j% j/ C6 P7 n$ X( D  A这不是sql的问题吗?

3 v& j! L' ]3 p" P6 o! c0 X不是的。已经有人帮忙解决了。谢啦
鲜花(1) 鸡蛋(0)
 楼主| 发表于 2015-3-30 14:14 | 显示全部楼层
calgaryNW 发表于 2015-3-26 18:47* I8 Y2 P, ^# _) u5 X/ Y1 f) ]% N  E
There are two tables such as AA and BB, assume there is empid field in AA, and there is empid field  ...

; |4 U% t' P( I2 |" v谢谢啦,已经解决了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系我们|小黑屋|手机版|Archiver|埃德蒙顿中文网

GMT-7, 2024-11-17 18:47 , Processed in 0.231607 second(s), 18 queries , Gzip On, APC On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表