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