/// <summary> ///按subjectStr寻找最近一次complete或incomplete的case,并且做这一票的Emp要在职,在线 /// </summary> /// <param name="subjectStr"></param> /// <returns></returns> private int?FindRecordByRequest(Record record, string subjectStr) { try { OleDbConnection con = null; if (record.M_requestID.Length > 0) { con = recordDao.BeginKeyword(); } else { con = recordDao.Begin(); } int?asignId = recordDao.FindRecordByRequestIDDAO(con, subjectStr); recordDao.Commit(); return(asignId); } catch (Exception) { recordDao.RollBack(); throw; } finally { recordDao.Close(); } }
public void TestFindRecordByRequestIDDAO() { RecordDAO recordDao = new RecordDAO(); OleDbConnection con = recordDao.Begin(); int? id = recordDao.FindRecordByRequestIDDAO(con, "Consol - C1900007772"); recordDao.Commit(); recordDao.Close(); }
/// <summary> ///按subjectStr寻找最近一次complete或incomplete的case,并且做这一票的Emp要在职,在线 /// </summary> /// <param name="subjectStr"></param> /// <returns></returns> private int?FindRecordByRequest(string subjectStr) { try { OleDbConnection con = recordDao.Begin(); int? asignId = recordDao.FindRecordByRequestIDDAO(con, subjectStr); recordDao.Commit(); return(asignId); } catch (Exception) { recordDao.RollBack(); throw; } finally { recordDao.Close(); } }