72 lines
1.9 KiB
C#
72 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using EAS.Services;
|
|
using SOH.Entities;
|
|
|
|
namespace SOH.BLL
|
|
{
|
|
[ServiceObject("客户信息公用方法")]
|
|
[ServiceBind(typeof(Its_khComm))]
|
|
public class ts_khComm : Its_khComm
|
|
{
|
|
public List<Entities.ts_khlx> Getkhlx()
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
return db.ts_khlxs.ToList();
|
|
}
|
|
}
|
|
|
|
public List<Entities.ts_khly> Getkhly()
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
return db.ts_khlys.ToList();
|
|
}
|
|
}
|
|
|
|
public List<Entities.ts_khzt> Getkhzt()
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
return db.ts_khzts.ToList();
|
|
}
|
|
}
|
|
|
|
|
|
public List<ts_quyu> Getquyu()
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
return db.ts_quyus.ToList();
|
|
}
|
|
}
|
|
|
|
public List<ts_hangye> Gethangye()
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
return db.ts_hangyes.ToList();
|
|
}
|
|
}
|
|
|
|
public DataTable GetXsy()
|
|
{
|
|
using (var db = new DbEntities())
|
|
{
|
|
string sql1 = "select czy.czym,ygzd.xm from t_ygzd ygzd left join t_czygl czy on "+
|
|
"ygzd.bm = czy.ygbm left join czyrole czyrole on czy.czym = czyrole.czyid "+
|
|
"left join Role ro on czyrole.roleid = ro.id where ro.RoleNmae like '%销售%' and ygzd.zhuxiao=0" +
|
|
"group by czy.czym,ygzd.xm";
|
|
DataTable dt = db.DataAccessor.QueryDataTable(sql1);
|
|
|
|
|
|
return dt;
|
|
}
|
|
}
|
|
}
|
|
}
|