using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using CoreFS.CA06; using DbHelp = Core.StlMes.Client.Sale.DbHelp; namespace Core.StlMes.Client.Sale.SaleFundMgt.FundDAL.InterfaceInfoDAL { public class SlmBaseCustomerDAL : BaseDAL.BaseDAL { public SlmBaseCustomerDAL(OpeBase ob) : base(ob) { } public DataSet GetBaseCustomberInfo(string sqlCondition) { string sql = @"select a.customer_no, a.customer_nm, a.bigarea, c.basename, a.region_no, d.region_nm, a.user_grp, a.org, a.py, a.validflag, a.create_time, a.create_name, b.sale_org, b.custm_use, a.ABRVITION from slm_base_customer a left join slm_base_custm_use b on a.customer_no = b.customer_no and b.validflag = '1' left join Com_Base_Info c on a.bigarea = c.basecode left join SEL_ADMIN_REGION d on a.region_no = d.region_no where a.validflag = '1' {0} "; sql = string.Format(sql, sqlCondition); return base.ExecuteReaderForSaleFund(sql); } public DataSet GetJsBaseCustomberInfo() { string sql = @"select a.customer_no,a.customer_nm,a.bigarea,a.py,a.create_name,a.create_time,abrvition from slm_base_customer a where a.validflag = '1' and exists (select 1 from Slm_Base_Custm_Use b where a.customer_no = b.customer_no and b.custm_use = '100202') "; return base.ExecuteReaderForSaleFund(sql); } public DataSet GetBaseCustomberInfoBySaleOrg(string saleOrg) { string sqlConditon = string.Format(" and b.sale_org = '{0}' ", saleOrg); return GetBaseCustomberInfo(sqlConditon); } public DataSet GetBaseCustomberInfoBySaleOrgAndCustUse(string saleOrg, string custUse) { string sqlConditon = string.Format(" and b.sale_org = '{0}' and b.custm_use = '{1}' ", saleOrg, custUse); return GetBaseCustomberInfo(sqlConditon); } public DataSet GetBaseCustomerInfo() { string sql = "SELECT A.CUSTOMER_NO,A.CUSTOMER_NM FROM SLM_BASE_CUSTOMER A "; return base.ExecuteReaderForSaleFund(sql); } } }