Example #1
0
        public IList<Bug> GetBugList(string sprint)
        {
            List<Bug> bugs = new List<Bug>();

            Options options = new Options();

            using (MySqlConnection con = CreateSqlConnection())
            {
                con.Open();

                using (MySqlCommand com = new MySqlCommand(options.BugSelectQuery, con))
                {
                    com.Parameters.AddWithValue("@sprintName", sprint);

                    using (MySqlDataReader reader = com.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            Bug bug = new Bug();
                            bug.ID = reader.GetInt64(0);
                            bug.Title = reader.GetString(1);
                            bug.Estimate = reader.GetString(2);
                            bug.Priority = reader.GetString(3);

                            if (!reader.IsDBNull(4))
                                bug.Importance = reader.GetInt64(4);

                            bug.Feature = reader.GetString(5);
                            bug.Product = reader.GetString(6);

                            bugs.Add(bug);
                        }
                    }
                }

                con.Close();
            }

            return bugs;
        }
Example #2
0
        public ActionResult Update(Options model)
        {
            TempData["InfoMessage"] = "Options saved";

            return RedirectToAction("Index");
        }
Example #3
0
        public ActionResult Index()
        {
            Options model = new Options();

            return View(model);
        }