public static bool SaveListOfWordsInDatabase(ProbabilityBussinessObjectLayer.ProbabilityCommon CommControler)
        {
            bool Success = false;

            SqlConnection con = new SqlConnection();

            con.ConnectionString = "Data Source=(localdb)\\Projects;Initial Catalog=ProbabilityCalculator;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False";

            string     Query = "insert into tblMinMax (MinProb,MaxProb,AverageProb) values ('" + CommControler.MiniMumProbability + "','" + CommControler.MaximumProbability + "','" + CommControler.AverageProbability + "')";
            SqlCommand cmd   = new SqlCommand(Query, con);

            cmd.CommandType = CommandType.Text;

            try
            {
                con.Open();
                cmd.ExecuteNonQuery();

                con.Close();
                con     = null;
                Success = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Success);
        }
Exemplo n.º 2
0
 public bool SaveListOfWordsInDatabase(ProbabilityBussinessObjectLayer.ProbabilityCommon CommControler)
 {
     return(ProbabilityDataAccessLayer.SaveListOfWordsInDatabase(CommControler));
 }