using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Reflection; using System.Text; using MESClassLibrary.BLL.Log; namespace MESClassLibrary.DAL.PunchAndWeld { public class PunchAdressDAL { public DataTable SearchInfo(string deviceNo ,int i) { try { string sql = @"SELECT * from tb_PunchAddress where DeviceNo=@DeviceNo and RW=@RW order by ID"; SqlParameter[] param = null; param = new SqlParameter[2]; param[0] = new SqlParameter("@DeviceNo", SqlDbType.VarChar); param[0].Value = deviceNo; param[1] = new SqlParameter("@RW", SqlDbType.Int); param[1].Value = i; return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0]; } catch (Exception ex) { LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); return null; } } } }