string sql = "";
sql += @"
select
- CONVERT(CHAR(19), a1.ps_date, 20) as ps_date, a2.ct_code, a2.ct_name, a1.ps_prname, cast(a1.ps_qty as int) ps_qty,
+ CONVERT(CHAR(19), a1.ps_date, 20) as ps_date, a2.ct_code, a2.ct_name+'('+a5.ct_phone+')' as ct_name, a1.ps_prname, cast(a1.ps_qty as int) ps_qty,
cast(
a1.ps_up
+
on a3.pe_id= a1.pe_id and a3.ps_no= a1.ps_no
join ac a4
on a4.pe_id= a1.pe_id and a4.ac_fncd2 not in ('01', '00')
+ join ct a5
+ on a5.ct_code= a2.ct_code
where
a1.ps_prcode in (
select pr_code from pr where kind_code= '1099'
)
and a1.ps_date between '" + selected + @"' and dateadd(day, 1, '" + selected + @"')
order by
- a1.pe_id desc;
-
- create table disposable_earn_point_status(
- pe_id varchar,
- ps_no varchar,
- is_earn bit default 0,
- udate datetime default getdate()
- );
+ a1.pe_id desc
";
SqlCommand cmd_select = new SqlCommand(sql, conn);
listView1.FullRowSelect = true;
listView1.Columns.Add("구매일시", 160);
- listView1.Columns.Add("회원명", 70);
+ listView1.Columns.Add("회원명", 105);
listView1.Columns.Add("상품명", 170);
listView1.Columns.Add("갯수", 50);
- listView1.Columns.Add("적립대상금액", 100);
+ listView1.Columns.Add("대상금액", 70);
listView1.Columns.Add("적립여부", 70);
listView1.Columns.Add("pe_id", 70);
listView1.Columns.Add("ps_no", 70);