Exemplo n.º 1
0
        private CivInfoBO ReadRecord(SqlCeDataReader reader)
        {
            CivInfoBO result = new CivInfoBO();

            result.Name  = reader.GetString(0);
            result.Value = reader.GetString(1);
            return(result);
        }
Exemplo n.º 2
0
        private void CreateCIVInfoTable()
        {
            if (IsAvailable)
            {
                CivInfoDAO.Instance.CreateTable();

                CivInfoBO info = new CivInfoBO();
                info.Name  = "Version";
                info.Value = XmlFactory.SaveToString(_version, typeof(CIVVersion), new XmlFactorySettings());

                CivInfoDAO.Instance.Insert(info);
            }
        }
Exemplo n.º 3
0
 public void Insert(CivInfoBO civInfoBO)
 {
     using (SqlCeCommand cmd = new SqlCeCommand("INSERT INTO CivInfo (name, value) VALUES (@name, @value)", DataBaseFactory.Instance.GetConnection()))
     {
         cmd.Parameters.Add(new SqlCeParameter("@name", SqlDbType.NVarChar)
         {
             Value = civInfoBO.Name
         });
         cmd.Parameters.Add(new SqlCeParameter("@value", SqlDbType.NText)
         {
             Value = civInfoBO.Value
         });
         cmd.ExecuteNonQuery();
     }
 }