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