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

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new RegularMotorCarCheckInfoVO()) as RegularMotorCarCheckInfoVO;
            }
            return(vo);
        }
Exemple #2
0
        public int UpdateInfo_Detail(int infoId, RegularMotorCarCheckInfoVO 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);
        }
Exemple #3
0
        public int Create(RegularMotorCarCheckInfoVO vo)
        {
            int id;

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

            try
            {
                lastInsertId = b.Insert("Regular_Motor_Car_Check_Info", b.ConvertColName(vo), b.ConvertValueList(vo));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lastInsertId);
        }
        public int Update(RegularMotorCarCheckInfoVO vo)
        {
            int deviceID = 0;

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