22,209
社区成员
发帖
与我相关
我的任务
分享
public void ModifyNumPool(object obj)
{
sm_NumberPool numpool = obj as sm_NumberPool;
int result = -1;
int allotFalg = 0;
if (numpool.AgentId > 1)
{
allotFalg = 1;
}
if (numpool.Type != 3)
{
string sql = "update wb_NumberPool set callFalg = @callFlag,calltime = @calltime,agentId = @agentId,allotTime = getdate(),allotFalg = @allotFalg,ch = @ch where id = @id";
SqlParameter[] par = new SqlParameter[]{
new SqlParameter("@callFlag",numpool.CallFalg),
new SqlParameter("@calltime",numpool.Calltime),
new SqlParameter("@agentId",numpool.AgentId),
new SqlParameter("@allotFalg",allotFalg),
new SqlParameter("@ch",numpool.Ch),
new SqlParameter("@id",numpool.Id),
};
try
{
result = DBHelper.ExecuteNonQuery(sql, par);
}
catch (Exception ex)
{
Log.WriteLog(true, EnumData.LogName.SqlErr.ToString(), ex.ToString() + sql);
}
}
}