public OTRequestInfoVO GetByID(int id) { OTRequestInfoVO vo = new OTRequestInfoVO(); DataTable dt = Select("ID=" + id + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObj(dt.Rows[0], new OTRequestInfoVO()) as OTRequestInfoVO; } return(vo); }
public int Create(OTRequestInfoVO vo) { int id; if (!dao.isExist(vo.Id.ToString())) { id = dao.Insert(vo); } else { id = dao.Update(vo); } return(id); }
public int Insert(OTRequestInfoVO vo) { int lastInsertId = 0; try { lastInsertId = b.Insert("OT_Request_Info", b.ConvertColName(vo), b.ConvertValueList(vo)); } catch (Exception ex) { throw ex; } return(lastInsertId); }
public int Update(OTRequestInfoVO vo) { int infoID = 0; try { b.Update("OT_Request_Info", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo)); infoID = vo.Id; } catch (Exception ex) { throw ex; } return(infoID); }