Ejemplo n.º 1
0
        public EmployeePhysicalExaminationVO GetByID(int id)
        {
            EmployeePhysicalExaminationVO vo = new EmployeePhysicalExaminationVO();
            DataTable dt = Select("ID=" + id + "");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new EmployeePhysicalExaminationVO()) as EmployeePhysicalExaminationVO;
            }
            return(vo);
        }
Ejemplo n.º 2
0
        public int Create(EmployeePhysicalExaminationVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
Ejemplo n.º 3
0
        public int Insert(EmployeePhysicalExaminationVO vo)
        {
            int lastInsertId = 0;

            try
            {
                lastInsertId = b.Insert("Employee_PhysicalExamination", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
Ejemplo n.º 4
0
        public int Update(EmployeePhysicalExaminationVO vo)
        {
            int AssetID = 0;

            try
            {
                b.Update("Employee_PhysicalExamination", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo));
                AssetID = vo.Id;
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            return(AssetID);
        }