Beispiel #1
0
        public void InsertTest()
        {
            Format format = new Format();

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

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

            format.Description = "Cartrivision";


            bool result = FormatManager.Insert(format);

            Assert.IsTrue(result);
        }
Beispiel #4
0
 public ActionResult Create(Format format)
 {
     try
     {
         // TODO: Add insert logic here
         FormatManager.Insert(format);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 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));
     }
 }
Beispiel #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);
            }
        }
Beispiel #7
0
 // POST: api/Format
 public void Post([FromBody] Format format)
 {
     FormatManager.Insert(format);
 }
Beispiel #8
0
 // POST: api/Format
 public void Post([FromBody] Format program)
 {
     FormatManager.Insert(program);
 }