Esempio n. 1
0
        public void InsertTest()
        {
            Format format = new Format();

            format.Description = "Bananas";
            Assert.IsTrue(FormatManager.Insert(format) > 0);
        }
Esempio n. 2
0
        public void InsertTest()
        {
            Format format = new Format {
                Description = "JKFL"
            };

            Assert.AreNotEqual(0, FormatManager.Insert(format));
        }
Esempio n. 3
0
        public void InsertTest()
        {
            Format format = new Format();

            format.Description = "Cartrivision";


            bool result = FormatManager.Insert(format);

            Assert.IsTrue(result);
        }
Esempio n. 4
0
 public ActionResult Create(Format format)
 {
     try
     {
         // TODO: Add insert logic here
         FormatManager.Insert(format);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Esempio n. 5
0
 public ActionResult Create(Format format)
 {
     try
     {
         // TODO: Add insert logic here
         FormatManager.Insert(format);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         ViewBag.Message = ex.Message;
         return(View(format));
     }
 }
Esempio n. 6
0
        protected void btnInsert_Click(object sender, EventArgs e)
        {
            try
            {
                item = new Format();

                //Assign the property values
                item.Description = txtDescription.Text;

                //use the manager to add a row
                int results = FormatManager.Insert(item);
                Response.Write("Inserted " + results + " rows...");
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
Esempio n. 7
0
 // POST: api/Format
 public void Post([FromBody] Format format)
 {
     FormatManager.Insert(format);
 }
Esempio n. 8
0
 // POST: api/Format
 public void Post([FromBody] Format program)
 {
     FormatManager.Insert(program);
 }