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

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

            try
            {
                lastInsertId = b.Insert("Approve_Employee_Order", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
        public int Create(Approve_Employee_OrderVO vo)
        {
            int id;

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

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