作者:郑凯丰
开发工具:VS、SQL Server、WPF、XAML
编写日期:2019年6月26日
代码:
- 首先我们先去数据库里面把查询的代码编写好,然后再出来拿数据
例如:
–查询员工基本信息
IF(@type='UserControl_Loaded_SelectStaff')
BEGIN
SELECT ROW_NUMBER () over(order by t_staff.staff_id) as number,
t_staff.staff_id,
RTRIM(t_staff.staff_number) AS staff_number,
RTRIM(t_staff.staff_name) AS staff_name,
t_staff.as_branch_id,
RTRIM(t_detailed_attribute_gather_1.detailed_attribute_gather_name) AS branch,
RTRIM(t_staff.phone_number) AS phone_number,
t_staff.as_work_status_id,
RTRIM(t_detailed_attribute_gather.detailed_attribute_gather_name) AS work_status,
t_staff.as_gender_id,
RTRIM(t_detailed_attribute_gather_2.detailed_attribute_gather_name) AS gender,
RTRIM( t_staff.id_card) AS id_card,
t_staff.birth,
RTRIM( t_staff.age) AS age,
RTRIM(t_staff.address) AS address,
RTRIM(t_staff.e_mail) AS e_mail,
t_staff.entry_date,