public EmployeeApprovalDetailVO GetByID(int id)
        {
            EmployeeApprovalDetailVO vo = new EmployeeApprovalDetailVO();
            DataTable dt = Select("ID=" + id + "");

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new EmployeeApprovalDetailVO()) as EmployeeApprovalDetailVO;
            }
            return(vo);
        }
        public int Insert(EmployeeApprovalDetailVO vo)
        {
            int lastInsertId = 0;

            try
            {
                lastInsertId = b.Insert("Employee_Approval_Detail", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
Exemplo n.º 3
0
        public int Create(EmployeeApprovalDetailVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
        public int Update(EmployeeApprovalDetailVO vo)
        {
            int detailID = 0;

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