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

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

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

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

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