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

            if (dt.Rows.Count > 0)
            {
                vo = b.ConvertObj(dt.Rows[0], new StateDivisionVO()) as StateDivisionVO;
            }
            return(vo);
        }
        public StateDivisionVO GetStateDivisionIDByName(string stateDivisionName)
        {
            StateDivisionVO vo = new StateDivisionVO();

            DataTable dt = SelectByDivisionName("StateDivisionName=N'" + stateDivisionName + "'");

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

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

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