Ejemplo n.º 1
0
        public void DeleteSysInfo(String dataName)
        {
            SysInfo si = GetSysInfo(dataName);

            if (si != null)
            {
                Delete(SysInfoTableName, si.ID);
            }
        }
Ejemplo n.º 2
0
        public void SaveSysInfo(String dataName, String fieldName, Object value)
        {
            SysInfo si = GetSysInfo(dataName);

            if (si == null)
            {
                si          = new SysInfo();
                si.DataName = dataName;
            }

            si.SetValue(fieldName, value);
            SaveSysInfo(si);
        }
Ejemplo n.º 3
0
        public void SaveSysInfo(SysInfo sysInfo)
        {
            if (sysInfo.DataName == null)
            {
                throw new Exception("Cannot save sysInfo without a data name");
            }
            String filter = "data_name='" + sysInfo.DataName + "'";

            sysInfo.SerializeDataValue();

            if (Count(SysInfoTableName, filter) == 0)
            {
                Insert(SysInfoTableName, sysInfo);
            }
            else
            {
                Update(SysInfoTableName, sysInfo, filter);
            }
        }
Ejemplo n.º 4
0
        public SysInfo GetSysInfo(String dataName)
        {
            SysInfo si = SelectRow <SysInfo>(SysInfoTableName, "*", dataName);

            return(si);
        }