Пример #1
0
        public void Load(int iID)
        {
            CDbState dbDt = new CDbState();
            string   tmpDat;

            tmpDat = dbDt.GetByID(iID);

            Clear();
            if (tmpDat.Length > 0)
            {
                LoadVals(tmpDat);
            }

            dbDt = null;
        }
Пример #2
0
        public int Save()
        {
            CDbState dbDt = new CDbState();
            string   tmpDat;
            int      retVal;

            tmpDat = GetDataString();

            if (base.ID > 0)
            {
                dbDt.SavePrev(tmpDat);
                retVal = base.ID;
            }
            else
            {
                retVal  = dbDt.SaveNew(tmpDat);
                base.ID = retVal;
            }

            dbDt = null;

            return(retVal);
        }
Пример #3
0
        public static void Delete(int cID)
        {
            CDbState dbDt = new CDbState();

            dbDt.Delete(cID);
        }
Пример #4
0
        public static string GetAbbrev(int stateID)
        {
            CDbState dbDt = new CDbState();

            return(dbDt.GetAbbrev(stateID));
        }
Пример #5
0
        public static string GetName(int stateID)
        {
            CDbState dbDt = new CDbState();

            return(dbDt.GetName(stateID));
        }
Пример #6
0
        public static SqlDataReader GetList()
        {
            CDbState dbDt = new CDbState();

            return(dbDt.GetList());
        }