public List <K3CloudMaterial> GetNotExistK3CloudMaterial() { List <K3CloudMaterial> K3CloudMaterialList = new List <K3CloudMaterial>(); string strSQL = "select distinct product_no,pro_name,specification from tb_TradeEntry where not exists(select 1 from T_BD_MATERIAL where FNUMBER = tb_TradeEntry.product_no) order by product_no"; using (SqlDataReader sdr = SqlHelper.ExecuteReader(strcon, CommandType.Text, strSQL)) { while (sdr.Read()) { K3CloudMaterial KM = new K3CloudMaterial(); KM.FNumber = sdr["product_no"].ToString(); KM.FName = sdr["pro_name"].ToString(); KM.FDes = sdr["specification"].ToString(); K3CloudMaterialList.Add(KM); } } return(K3CloudMaterialList); }
public List <K3CloudMaterial> GetNotExistsK3CloudStockMaterial() { List <K3CloudMaterial> K3CloudMaterialList = new List <K3CloudMaterial>(); string strSQL = "select distinct product_no,pro_name,specification from v_EDB_MaterialErrorList order by product_no"; using (SqlDataReader sdr = SqlHelper.ExecuteReader(strcon, CommandType.Text, strSQL)) { while (sdr.Read()) { K3CloudMaterial KM = new K3CloudMaterial(); KM.FNumber = sdr["product_no"].ToString(); KM.FName = sdr["pro_name"].ToString(); KM.FDes = sdr["specification"].ToString(); K3CloudMaterialList.Add(KM); } } return(K3CloudMaterialList); }