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

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new LeaveRequestVO()) as LeaveRequestVO;
            }
            return(vo);
        }
Esempio n. 2
0
        public int UpdateInfo_Detail(int infoId, LeaveRequestVO vo, List <object> detalVoList, List <String> queryList, List <String> deleteList)
        {
            int id = 0;

            try
            {
                id = dao.UpdateInfo_Detail(infoId, vo, detalVoList, queryList, deleteList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(id);
        }
Esempio n. 3
0
        public int Create(LeaveRequestVO vo)
        {
            int id;

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

            try
            {
                lastInsertId = b.Insert("Leave_Request", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
        public int Update(LeaveRequestVO vo)
        {
            int ID = 0;

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