Exemple #1
0
        public ScheduleVO GetByID(int id)
        {
            ScheduleVO vo = new ScheduleVO();
            DataTable  dt = Select(String.Format("ID={0}", id));

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

            try
            {
                lastInsertId = b.Insert("FP_Scheduling", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
Exemple #3
0
        public int Create(ScheduleVO vo)
        {
            int id;

            if (!dao.isExist(vo.Id.ToString()))
            {
                id = dao.Insert(vo);
            }
            else
            {
                id = dao.Update(vo);
            }
            return(id);
        }
Exemple #4
0
        public int Update(ScheduleVO vo)
        {
            int vehiclePartID = 0;

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