public PR_SalaryChangeVO GetByID(int id) { PR_SalaryChangeVO vo = new PR_SalaryChangeVO(); DataTable dt = Select("ID=" + id + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObj(dt.Rows[0], new PR_SalaryChangeVO()) as PR_SalaryChangeVO; } return(vo); }
public PR_SalaryChangeVO GetMaxDateByRankID(int RankId) { PR_SalaryChangeVO vo = new PR_SalaryChangeVO(); DataTable dt = b.SelectByQuery("SELECT Max(StartDate) From PR_Salary_Change Where RankID=" + RankId + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObj(dt.Rows[0], new PR_SalaryChangeVO()) as PR_SalaryChangeVO; } return(vo); }
public int Create(PR_SalaryChangeVO vo) { int id = 0; if (!dao.isExist(vo.Id.ToString())) { id = dao.Insert(vo); } else { id = dao.Update(vo); } return(id); }
public int Insert(PR_SalaryChangeVO vo) { int lastInsertId = 0; try { lastInsertId = b.Insert("PR_Salary_Change", b.ConvertColName(vo), b.ConvertValueList(vo)); } catch (Exception ex) { throw ex; } return(lastInsertId); }
public int Update(PR_SalaryChangeVO vo) { int ID = 0; try { b.Update("PR_Salary_Change", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo)); ID = vo.Id; } catch (Exception ex) { throw ex; } return(ID); }