36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.OracleClient;
|
|
using System.Linq;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.Model.Entity;
|
|
|
|
namespace WX.CRM.DAL.Base
|
|
{
|
|
public class RESOURCEMOBILE_DAL
|
|
{
|
|
public List<RES_RESOURCEMOBILE> GetMobile(string resid)
|
|
{
|
|
|
|
OracleConnection conn = new OracleConnection(OracleHelper.AYCRMConn);
|
|
if (conn.State == ConnectionState.Closed)
|
|
conn.Open();
|
|
try
|
|
{
|
|
using (OracleTransaction trans = conn.BeginTransaction())
|
|
{
|
|
OracleParameter[] p = new[] {
|
|
new OracleParameter{ ParameterName="V_RESID", OracleType = OracleType.VarChar,Value=resid },
|
|
new OracleParameter{ParameterName="p_sqlData",OracleType=OracleType.Cursor,Direction = ParameterDirection.Output}
|
|
};
|
|
var ds = OracleHelper.DataQueray(trans, CommandType.StoredProcedure, "PACK_GETMOBILE.GETMOBILE", p);
|
|
trans.Commit();
|
|
return ds.Tables[0].ToList<WX.CRM.Model.Entity.RES_RESOURCEMOBILE>();
|
|
}
|
|
}
|
|
catch { throw; }
|
|
finally { conn.Close(); }
|
|
}
|
|
}
|
|
}
|