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