Esempio n. 1
0
        public void setstatusTest()
        {
            int     id     = 3;
            int     status = 3;
            PlanDAO pDAO   = new PlanDAO();
            Plan    actual = pDAO.showPlanInfo(id);
            int     temp   = actual.status;

            actual.status = status;
            pDAO.setStatus(id, status);
            Plan expect = pDAO.showPlanInfo(id);

            Assert.AreEqual(actual.status, expect.status);
            pDAO.setStatus(id, temp);
        }
Esempio n. 2
0
 //********************************************************************************************************************
 //Изменение
 //********************************************************************************************************************
 public ActionResult SetPlanStatus(int id, int status)
 {
     if (pDAO.setStatus(id, status))
     {
         return(RedirectToAction("ShowPlanInfo", new { id = id }));
     }
     else
     {
         return(View("Index"));
     }
 }