Beispiel #1
0
        public EmployeeRelativeVO GetByID(int id)
        {
            EmployeeRelativeVO vo = new EmployeeRelativeVO();
            DataTable          dt = Select("ID=" + id + "");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new EmployeeRelativeVO()) as EmployeeRelativeVO;
            }
            return(vo);
        }
Beispiel #2
0
        public int Create(EmployeeRelativeVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
Beispiel #3
0
        public int Insert(EmployeeRelativeVO vo)
        {
            int lastInsertId = 0;

            try
            {
                lastInsertId = b.Insert("Employee_Relative", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
Beispiel #4
0
        public int Update(EmployeeRelativeVO vo)
        {
            int empSpouseID = 0;

            try
            {
                b.Update("Employee_Relative", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo));
                empSpouseID = vo.Id;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(empSpouseID);
        }